Package org.bouncycastle.pqc.crypto.gmss
Class GMSSSigner
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.gmss.GMSSSigner
-
- All Implemented Interfaces:
MessageSigner
public class GMSSSigner extends java.lang.Object implements MessageSigner
This class implements the GMSS signature scheme.
-
-
Constructor Summary
Constructors Constructor Description GMSSSigner(GMSSDigestProvider digest)
The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
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 Detail
-
GMSSSigner
public GMSSSigner(GMSSDigestProvider digest)
The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID.- Parameters:
digest
- the digest to use
-
-
Method Detail
-
init
public void init(boolean forSigning, CipherParameters param)
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.
-
-