Class QTESLASigner
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.qtesla.QTESLASigner
- All Implemented Interfaces:
MessageSigner
Signer for the qTESLA algorithm (https://qtesla.org/)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
generateSignature
(byte[] message) Generate a signature directly for the passed in message.void
init
(boolean forSigning, CipherParameters param) Initialise the signer.boolean
verifySignature
(byte[] message, byte[] signature) Verify the signature against the passed in message.
-
Constructor Details
-
QTESLASigner
public QTESLASigner()
-
-
Method Details
-
init
Initialise the signer.- Specified by:
init
in interfaceMessageSigner
- Parameters:
forSigning
- true if we are generating a signature, false otherwise.param
- ParametersWithRandom containing a private key for signature generation, public key otherwise.
-
generateSignature
public byte[] generateSignature(byte[] message) Generate a signature directly for the passed in message.- Specified by:
generateSignature
in interfaceMessageSigner
- Parameters:
message
- the message to be signed.- Returns:
- the signature generated.
-
verifySignature
public boolean verifySignature(byte[] message, byte[] signature) Verify the signature against the passed in message.- Specified by:
verifySignature
in interfaceMessageSigner
- Parameters:
message
- the message that was supposed to have been signed.signature
- the signature of the message- Returns:
- true if the signature passes, false otherwise.
-