Class RainbowSigner

java.lang.Object
org.bouncycastle.pqc.legacy.crypto.rainbow.RainbowSigner
All Implemented Interfaces:
MessageSigner

public class RainbowSigner extends Object implements MessageSigner
It implements the sign and verify functions for the Rainbow Signature Scheme. Here the message, which has to be signed, is updated. The use of different hash functions is possible.

Detailed information about the signature and the verify-method is to be found in the paper of Jintai Ding, Dieter Schmidt: Rainbow, a New Multivariable Polynomial Signature Scheme. ACNS 2005: 164-175 (https://dx.doi.org/10.1007/11496137_12)

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    generateSignature(byte[] message)
    This function signs the message that has been updated, making use of the private key.
    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 Details

    • RainbowSigner

      public RainbowSigner()
  • Method Details

    • 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)
      This function signs the message that has been updated, making use of the private key.

      For computing the signature, L1 and L2 are needed, as well as LES should be solved for each layer in order to find the Oil-variables in the layer.

      The Vinegar-variables of the first layer are random generated.

      Specified by:
      generateSignature in interface MessageSigner
      Parameters:
      message - the message
      Returns:
      the signature of the message.
    • 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 of the message
      Returns:
      true if the signature has been verified, false otherwise.