Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.