Package org.conscrypt
Class OpenSslMlDsaKeyFactory
- java.lang.Object
-
- java.security.KeyFactorySpi
-
- org.conscrypt.OpenSslMlDsaKeyFactory
-
- Direct Known Subclasses:
OpenSslMlDsaKeyFactory.MlDsa,OpenSslMlDsaKeyFactory.MlDsa44,OpenSslMlDsaKeyFactory.MlDsa65,OpenSslMlDsaKeyFactory.MlDsa87
@Internal public abstract class OpenSslMlDsaKeyFactory extends java.security.KeyFactorySpi
An implementation of aKeyFactorySpifor MLDSA keys based on BoringSSL.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenSslMlDsaKeyFactory.MlDsaML-DSAstatic classOpenSslMlDsaKeyFactory.MlDsa44ML-DSA-44static classOpenSslMlDsaKeyFactory.MlDsa65ML-DSA-65static classOpenSslMlDsaKeyFactory.MlDsa87ML-DSA-87
-
Field Summary
Fields Modifier and Type Field Description private MlDsaAlgorithmdefaultAlgorithm
-
Constructor Summary
Constructors Modifier Constructor Description privateOpenSslMlDsaKeyFactory(MlDsaAlgorithm defaultAlgorithm)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.security.PrivateKeyengineGeneratePrivate(java.security.spec.KeySpec keySpec)protected java.security.PublicKeyengineGeneratePublic(java.security.spec.KeySpec keySpec)protected <T extends java.security.spec.KeySpec>
TengineGetKeySpec(java.security.Key key, java.lang.Class<T> keySpec)protected java.security.KeyengineTranslateKey(java.security.Key key)(package private) static MlDsaAlgorithmgetMlDsaAlgorithm(OpenSSLKey key)(package private) static intgetPKeyType(MlDsaAlgorithm algorithm)private OpenSslMlDsaPrivateKeymakePrivateKey(OpenSSLKey key)private OpenSslMlDsaPrivateKeymakePrivateKeyFromSeed(byte[] seed, MlDsaAlgorithm algorithm)private OpenSslMlDsaPublicKeymakePublicKey(OpenSSLKey key)private OpenSslMlDsaPublicKeymakePublicKeyFromRaw(byte[] raw, MlDsaAlgorithm algorithm)(package private) abstract booleansupportsAlgorithm(MlDsaAlgorithm algorithm)
-
-
-
Field Detail
-
defaultAlgorithm
private final MlDsaAlgorithm defaultAlgorithm
-
-
Constructor Detail
-
OpenSslMlDsaKeyFactory
private OpenSslMlDsaKeyFactory(MlDsaAlgorithm defaultAlgorithm)
-
-
Method Detail
-
supportsAlgorithm
abstract boolean supportsAlgorithm(MlDsaAlgorithm algorithm)
-
makePublicKeyFromRaw
private OpenSslMlDsaPublicKey makePublicKeyFromRaw(byte[] raw, MlDsaAlgorithm algorithm) throws java.security.spec.InvalidKeySpecException
- Throws:
java.security.spec.InvalidKeySpecException
-
getMlDsaAlgorithm
static MlDsaAlgorithm getMlDsaAlgorithm(OpenSSLKey key)
-
getPKeyType
static int getPKeyType(MlDsaAlgorithm algorithm)
-
makePublicKey
private OpenSslMlDsaPublicKey makePublicKey(OpenSSLKey key) throws java.security.spec.InvalidKeySpecException
- Throws:
java.security.spec.InvalidKeySpecException
-
engineGeneratePublic
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException- Specified by:
engineGeneratePublicin classjava.security.KeyFactorySpi- Throws:
java.security.spec.InvalidKeySpecException
-
makePrivateKeyFromSeed
private OpenSslMlDsaPrivateKey makePrivateKeyFromSeed(byte[] seed, MlDsaAlgorithm algorithm) throws java.security.spec.InvalidKeySpecException
- Throws:
java.security.spec.InvalidKeySpecException
-
makePrivateKey
private OpenSslMlDsaPrivateKey makePrivateKey(OpenSSLKey key) throws java.security.spec.InvalidKeySpecException
- Throws:
java.security.spec.InvalidKeySpecException
-
engineGeneratePrivate
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException- Specified by:
engineGeneratePrivatein classjava.security.KeyFactorySpi- Throws:
java.security.spec.InvalidKeySpecException
-
engineGetKeySpec
protected <T extends java.security.spec.KeySpec> T engineGetKeySpec(java.security.Key key, java.lang.Class<T> keySpec) throws java.security.spec.InvalidKeySpecException- Specified by:
engineGetKeySpecin classjava.security.KeyFactorySpi- Throws:
java.security.spec.InvalidKeySpecException
-
engineTranslateKey
protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException- Specified by:
engineTranslateKeyin classjava.security.KeyFactorySpi- Throws:
java.security.InvalidKeyException
-
-