Class XMSSMTSigner
java.lang.Object
org.bouncycastle.pqc.crypto.xmss.XMSSMTSigner
- All Implemented Interfaces:
MessageSigner, StateAwareMessageSigner
Deprecated.
XMSS^MT Signer class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSignature(byte[] message) Deprecated.sign the passed in message (usually the output of a hash function).Deprecated.Return the current version of the private key with the updated state.longDeprecated.voidinit(boolean forSigning, CipherParameters param) Deprecated.Initialise for signing or verification.booleanverifySignature(byte[] message, byte[] signature) Deprecated.verify the message message against the signature value.
-
Constructor Details
-
XMSSMTSigner
public XMSSMTSigner()Deprecated.
-
-
Method Details
-
init
Deprecated.Initialise for signing or verification. AParametersWithRandomwrapper 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.- Specified by:
initin interfaceMessageSigner- Parameters:
forSigning- true for signing, false for verification.param- the key, optionally wrapped inParametersWithRandom.
-
generateSignature
public byte[] generateSignature(byte[] message) Deprecated.Description copied from interface:MessageSignersign the passed in message (usually the output of a hash function).- Specified by:
generateSignaturein interfaceMessageSigner- Parameters:
message- the message to be signed.- Returns:
- the signature of the message
-
verifySignature
public boolean verifySignature(byte[] message, byte[] signature) Deprecated.Description copied from interface:MessageSignerverify the message message against the signature value.- Specified by:
verifySignaturein interfaceMessageSigner- Parameters:
message- the message that was supposed to have been signed.signature- the signature of the message
-
getUsagesRemaining
public long getUsagesRemaining()Deprecated. -
getUpdatedPrivateKey
Deprecated.Description copied from interface:StateAwareMessageSignerReturn the current version of the private key with the updated state.Note: calling this method will effectively disable the Signer from being used for further signature generation without another call to init().
- Specified by:
getUpdatedPrivateKeyin interfaceStateAwareMessageSigner- Returns:
- an updated private key object, which can be used for later signature generation.
-
XMSSMTSignerinstead.