Class MayoSigner

    • Constructor Summary

      Constructors 
      Constructor Description
      MayoSigner()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] generateSignature​(byte[] message)
      Generates a MAYO signature for the given message using the initialized private key.
      void init​(boolean forSigning, CipherParameters param)
      Initializes the signer for either signature generation or verification.
      boolean verifySignature​(byte[] message, byte[] signature)
      Verifies a MAYO signature against the initialized public key and message.
      • Methods inherited from class java.lang.Object

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

      • MayoSigner

        public MayoSigner()
    • Method Detail

      • generateSignature

        public byte[] generateSignature​(byte[] message)
        Generates a MAYO signature for the given message using the initialized private key. Follows the signature generation process outlined in the MAYO specification document.
        Specified by:
        generateSignature in interface MessageSigner
        Parameters:
        message - The message to be signed
        Returns:
        The signature bytes concatenated with the original message
        See Also:
        MAYO Spec Algorithm 8 and 10
      • verifySignature

        public boolean verifySignature​(byte[] message,
                                       byte[] signature)
        Verifies a MAYO signature against the initialized public key and message. Implements the verification process specified in the MAYO documentation.
        Specified by:
        verifySignature in interface MessageSigner
        Parameters:
        message - The original message
        signature - The signature to verify
        Returns:
        true if the signature is valid, false otherwise
        See Also:
        MAYO Spec Algorithm 9 and 11