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.voidinit(boolean forSigning, CipherParameters param) Initialise the signer.booleanverifySignature(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:
initin 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:
generateSignaturein 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:
verifySignaturein 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.
-