Class QTESLASigner
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.qtesla.QTESLASigner
-
- All Implemented Interfaces:
MessageSigner
public class QTESLASigner extends java.lang.Object implements MessageSigner
Signer for the qTESLA algorithm (https://qtesla.org/)
-
-
Constructor Summary
Constructors Constructor Description QTESLASigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
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.
-
-
-
Method Detail
-
init
public void init(boolean forSigning, CipherParameters param)
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.
-
-