org.bouncycastle.pqc.legacy.crypto.gmss
Class GMSSSigner
java.lang.Object
|
+--org.bouncycastle.pqc.legacy.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 |
GMSSSigner(GMSSDigestProvider digest)
The standard constructor tries to generate the MerkleTree Algorithm
identifier with the corresponding OID. |
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 interface MessageSigner
- Following copied from interface:
org.bouncycastle.pqc.crypto.MessageSigner
- 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 interface MessageSigner
- 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 interface MessageSigner
- Parameters:
message
- the messagesignature
- the signature associated with the message- Returns:
- true if the signature has been verified, false otherwise.