Package com.google.crypto.tink.signature
Class MlDsaPrivateKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.signature.SignaturePrivateKey
-
- com.google.crypto.tink.signature.MlDsaPrivateKey
-
- All Implemented Interfaces:
PrivateKey
public class MlDsaPrivateKey extends SignaturePrivateKey
Private key for ML-DSA-65.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MlDsaPrivateKeycreateWithoutVerification(MlDsaPublicKey mlDsaPublicKey, SecretBytes privateSeed)booleanequalsKey(Key o)Returns true if the key is guaranteed to be equal toother.MlDsaParametersgetParameters()Returns the parameters of this key.SecretBytesgetPrivateSeed()MlDsaPublicKeygetPublicKey()Returns theSignaturePublicKey, which contains the verify function of the digital signature primitive.-
Methods inherited from class com.google.crypto.tink.signature.SignaturePrivateKey
getIdRequirementOrNull, getOutputPrefix
-
-
-
-
Method Detail
-
createWithoutVerification
public static MlDsaPrivateKey createWithoutVerification(MlDsaPublicKey mlDsaPublicKey, SecretBytes privateSeed) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
getPrivateSeed
public SecretBytes getPrivateSeed()
-
equalsKey
public boolean equalsKey(Key o)
Description copied from class:KeyReturns true if the key is guaranteed to be equal toother.Implementations are required to do this in constant time.
Note: this is allowed to return false even if two keys are guaranteed to represent the same function, but are represented differently. For example, a key is allowed to internally store the number of zero-bytes used as padding when a large number is represented as a byte array, and use this in the comparison.
Note: Tink
Keyobjects should typically not overridehashCode(because it could risk leaking key material). Hence, they typically also should not overrideequals.
-
getParameters
public MlDsaParameters getParameters()
Description copied from class:SignaturePrivateKeyReturns the parameters of this key.Returns the same as
getPublicKey().getParameters().- Overrides:
getParametersin classSignaturePrivateKey
-
getPublicKey
public MlDsaPublicKey getPublicKey()
Description copied from class:SignaturePrivateKeyReturns theSignaturePublicKey, which contains the verify function of the digital signature primitive.- Specified by:
getPublicKeyin interfacePrivateKey- Specified by:
getPublicKeyin classSignaturePrivateKey
-
-