Class QTESLASigner

  • All Implemented Interfaces:
    MessageSigner

    public class QTESLASigner
    extends Object
    implements MessageSigner
    Signer for the qTESLA algorithm (https://qtesla.org/)
    • Constructor Detail

      • QTESLASigner

        public QTESLASigner()
    • Method Detail

      • init

        public void init​(boolean forSigning,
                         CipherParameters param)
        Initialise the signer.
        Specified by:
        init in interface MessageSigner
        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 interface MessageSigner
        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 interface MessageSigner
        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.