Class GMSSSigner
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.gmss.GMSSSigner
- All Implemented Interfaces:
MessageSigner
This class implements the GMSS signature scheme.
-
Constructor Summary
ConstructorsConstructorDescriptionGMSSSigner
(GMSSDigestProvider digest) The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
generateSignature
(byte[] message) Signs a message.void
init
(boolean forSigning, CipherParameters param) initialise the signer for signature generation or signature verification.boolean
verifySignature
(byte[] message, byte[] signature) This function verifies the signature of the message that has been updated, with the aid of the public key.
-
Constructor Details
-
GMSSSigner
The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID.- Parameters:
digest
- the digest to use
-
-
Method Details
-
init
Description copied from interface:MessageSigner
initialise the signer for signature generation or signature verification.- Specified by:
init
in interfaceMessageSigner
- Parameters:
forSigning
- true if we are generating a signature, false otherwise.param
- key parameters for signature generation.
-
generateSignature
public byte[] generateSignature(byte[] message) Signs a message.- Specified by:
generateSignature
in interfaceMessageSigner
- Parameters:
message
- the message to be signed.- Returns:
- the signature.
-
verifySignature
public boolean verifySignature(byte[] message, byte[] signature) This function verifies the signature of the message that has been updated, with the aid of the public key.- Specified by:
verifySignature
in interfaceMessageSigner
- Parameters:
message
- the messagesignature
- the signature associated with the message- Returns:
- true if the signature has been verified, false otherwise.
-