XMSSMTSigner instead.@Deprecated public class XMSSMTSigner extends java.lang.Object implements StateAwareMessageSigner
| Constructor and Description |
|---|
XMSSMTSigner()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateSignature(byte[] message)
Deprecated.
sign the passed in message (usually the output of a hash function).
|
AsymmetricKeyParameter |
getUpdatedPrivateKey()
Deprecated.
Return the current version of the private key with the updated state.
|
long |
getUsagesRemaining()
Deprecated.
|
void |
init(boolean forSigning,
CipherParameters param)
Deprecated.
Initialise for signing or verification.
|
boolean |
verifySignature(byte[] message,
byte[] signature)
Deprecated.
verify the message message against the signature value.
|
public void init(boolean forSigning,
CipherParameters param)
ParametersWithRandom wrapper is accepted
and unwrapped before either branch is entered, the way LMSSigner.init accepts it, so a
caller that wraps its key once and drives both sides is not refused by the verification
one; the random the wrapper carries is not used. The randomizer r is derived from the key
itself - r = PRF(SK_PRF, toByte(idx, 32)), RFC 8391 sec. 4.2.7 - so a SecureRandom supplied
here has nothing to drive and is discarded, the way SPHINCS256Signer discards it. On the
signing side accepting the wrapper is what BC itself needs:
XMSSMTSignatureSpi.engineInitSign(PrivateKey, SecureRandom) wraps the key whenever a random
is supplied, so initSign(key, random) used to fail on the cast.init in interface MessageSignerforSigning - true for signing, false for verification.param - the key, optionally wrapped in ParametersWithRandom.public byte[] generateSignature(byte[] message)
MessageSignergenerateSignature in interface MessageSignermessage - the message to be signed.public boolean verifySignature(byte[] message,
byte[] signature)
MessageSignerverifySignature in interface MessageSignermessage - the message that was supposed to have been signed.signature - the signature of the messagepublic long getUsagesRemaining()
public AsymmetricKeyParameter getUpdatedPrivateKey()
StateAwareMessageSignerNote: calling this method will effectively disable the Signer from being used for further signature generation without another call to init().
getUpdatedPrivateKey in interface StateAwareMessageSigner