Package com.google.crypto.tink.signature
Class SlhDsaPrivateKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.signature.SignaturePrivateKey
-
- com.google.crypto.tink.signature.SlhDsaPrivateKey
-
- All Implemented Interfaces:
PrivateKey
public class SlhDsaPrivateKey extends SignaturePrivateKey
Private key for SLH-DSA-SHA2-128S.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SlhDsaPrivateKeycreateWithoutVerification(SlhDsaPublicKey slhDsaPublicKey, SecretBytes privateKeyBytes)booleanequalsKey(Key o)Returns true if the key is guaranteed to be equal toother.SlhDsaParametersgetParameters()Returns the parameters of this key.SecretBytesgetPrivateKeyBytes()SlhDsaPublicKeygetPublicKey()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 SlhDsaPrivateKey createWithoutVerification(SlhDsaPublicKey slhDsaPublicKey, SecretBytes privateKeyBytes) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
getPublicKey
public SlhDsaPublicKey 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
-
getParameters
public SlhDsaParameters getParameters()
Description copied from class:SignaturePrivateKeyReturns the parameters of this key.Returns the same as
getPublicKey().getParameters().- Overrides:
getParametersin classSignaturePrivateKey
-
getPrivateKeyBytes
public SecretBytes getPrivateKeyBytes()
-
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.
-
-