Package org.bouncycastle.pqc.crypto.xmss
Class XMSSSigner
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.xmss.XMSSSigner
-
- All Implemented Interfaces:
MessageSigner,StateAwareMessageSigner
@Deprecated public class XMSSSigner extends java.lang.Object implements StateAwareMessageSigner
Deprecated.useXMSSSignerinstead.
-
-
Constructor Summary
Constructors Constructor Description XMSSSigner()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte[]generateSignature(byte[] message)Deprecated.sign the passed in message (usually the output of a hash function).AsymmetricKeyParametergetUpdatedPrivateKey()Deprecated.Return the current version of the private key with the updated state.longgetUsagesRemaining()Deprecated.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.
-
-
-
Method Detail
-
init
public void init(boolean forSigning, CipherParameters param)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.1.9 - 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: XMSSSignatureSpi.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
-
getUsagesRemaining
public long getUsagesRemaining()
Deprecated.
-
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
-
getUpdatedPrivateKey
public AsymmetricKeyParameter 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.
-
-