Class MayoSigner

java.lang.Object
org.bouncycastle.pqc.crypto.mayo.MayoSigner
All Implemented Interfaces:
MessageSigner

public class MayoSigner extends Object implements MessageSigner
Implementation of the MAYO digital signature scheme as specified in the MAYO documentation. This class provides functionality for both signature generation and verification.

MAYO is a candidate in the NIST Post-Quantum Cryptography: Additional Digital Signature Schemes project, currently in Round 2 of evaluations. For more details about the NIST standardization process, see: NIST PQC Additional Digital Signatures.

References:

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 Details

    • MayoSigner

      public MayoSigner()
  • Method Details

    • init

      public void init(boolean forSigning, CipherParameters param)
      Initializes the signer for either signature generation or verification.
      Specified by:
      init in interface MessageSigner
      Parameters:
      forSigning - true for signing mode, false for verification
      param - CipherParameters containing:
      Throws:
      IllegalArgumentException - if invalid parameters are provided
    • 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:
    • 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: