Package org.conscrypt
Class OpenSslMlKemKeyFactory
java.lang.Object
java.security.KeyFactorySpi
org.conscrypt.OpenSslMlKemKeyFactory
- Direct Known Subclasses:
OpenSslMlKemKeyFactory.MlKem,OpenSslMlKemKeyFactory.MlKem1024,OpenSslMlKemKeyFactory.MlKem768
An implementation of a
KeyFactorySpi for ML-KEM keys based on BoringSSL.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classML-KEMstatic classML-KEM-1024static classML-KEM-768 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MlKemAlgorithm(package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PrivateKeyengineGeneratePrivate(KeySpec keySpec) protected PublicKeyengineGeneratePublic(KeySpec keySpec) protected <T extends KeySpec>
TengineGetKeySpec(Key key, Class<T> keySpec) protected KeyengineTranslateKey(Key key) private OpenSslMlKemPrivateKeymakePrivateKeyFromSeed(byte[] seed, MlKemAlgorithm algorithm) private OpenSslMlKemPublicKeymakePublicKeyFromRaw(byte[] raw, MlKemAlgorithm algorithm) (package private) abstract booleansupportsAlgorithm(MlKemAlgorithm algorithm)
-
Field Details
-
x509PreambleMlKem768
static final byte[] x509PreambleMlKem768 -
x509PreambleMlKem1024
static final byte[] x509PreambleMlKem1024 -
pkcs8PreambleMlKem768
static final byte[] pkcs8PreambleMlKem768 -
pkcs8PreambleMlKem1024
static final byte[] pkcs8PreambleMlKem1024 -
defaultAlgorithm
-
-
Constructor Details
-
OpenSslMlKemKeyFactory
-
-
Method Details
-
supportsAlgorithm
-
makePublicKeyFromRaw
private OpenSslMlKemPublicKey makePublicKeyFromRaw(byte[] raw, MlKemAlgorithm algorithm) throws InvalidKeySpecException - Throws:
InvalidKeySpecException
-
engineGeneratePublic
- Specified by:
engineGeneratePublicin classKeyFactorySpi- Throws:
InvalidKeySpecException
-
makePrivateKeyFromSeed
private OpenSslMlKemPrivateKey makePrivateKeyFromSeed(byte[] seed, MlKemAlgorithm algorithm) throws InvalidKeySpecException - Throws:
InvalidKeySpecException
-
engineGeneratePrivate
- Specified by:
engineGeneratePrivatein classKeyFactorySpi- Throws:
InvalidKeySpecException
-
engineGetKeySpec
protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException - Specified by:
engineGetKeySpecin classKeyFactorySpi- Throws:
InvalidKeySpecException
-
engineTranslateKey
- Specified by:
engineTranslateKeyin classKeyFactorySpi- Throws:
InvalidKeyException
-