Class GMSSSigner

  • All Implemented Interfaces:
    MessageSigner

    public class GMSSSigner
    extends java.lang.Object
    implements MessageSigner
    This class implements the GMSS signature scheme.
    • Constructor Summary

      Constructors 
      Constructor Description
      GMSSSigner​(GMSSDigestProvider digest)
      The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] generateSignature​(byte[] message)
      Signs a message.
      void init​(boolean forSigning, CipherParameters param)
      initialise the signer for signature generation or signature verification.
      boolean verifySignature​(byte[] message, byte[] signature)
      This function verifies the signature of the message that has been updated, with the aid of the public key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GMSSSigner

        public GMSSSigner​(GMSSDigestProvider digest)
        The standard constructor tries to generate the MerkleTree Algorithm identifier with the corresponding OID.
        Parameters:
        digest - the digest to use
    • Method Detail

      • init

        public void init​(boolean forSigning,
                         CipherParameters param)
        Description copied from interface: MessageSigner
        initialise the signer for signature generation or signature verification.
        Specified by:
        init in interface MessageSigner
        Parameters:
        forSigning - true if we are generating a signature, false otherwise.
        param - key parameters for signature generation.
      • generateSignature

        public byte[] generateSignature​(byte[] message)
        Signs a message.
        Specified by:
        generateSignature in interface MessageSigner
        Parameters:
        message - the message to be signed.
        Returns:
        the signature.
      • verifySignature

        public boolean verifySignature​(byte[] message,
                                       byte[] signature)
        This function verifies the signature of the message that has been updated, with the aid of the public key.
        Specified by:
        verifySignature in interface MessageSigner
        Parameters:
        message - the message
        signature - the signature associated with the message
        Returns:
        true if the signature has been verified, false otherwise.