Class BCRainbowPrivateKey

java.lang.Object
org.bouncycastle.pqc.jcajce.provider.rainbow.BCRainbowPrivateKey
All Implemented Interfaces:
Serializable, Key, PrivateKey, Destroyable

public class BCRainbowPrivateKey extends Object implements PrivateKey
The Private key in Rainbow consists of the linear affine maps L1, L2 and the map F, consisting of quadratic polynomials. In this implementation, we denote: L1 = A1*x + b1 L2 = A2*x + b2

The coefficients of the polynomials in F are stored in 3-dimensional arrays per layer. The indices of these arrays denote the polynomial, and the variables.

More detailed information about the private key 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)

See Also:
  • Constructor Details

  • Method Details

    • getInvA1

      public short[][] getInvA1()
      Getter for the inverse matrix of A1.
      Returns:
      the A1inv inverse
    • getB1

      public short[] getB1()
      Getter for the translation part of the private quadratic map L1.
      Returns:
      b1 the translation part of L1
    • getB2

      public short[] getB2()
      Getter for the translation part of the private quadratic map L2.
      Returns:
      b2 the translation part of L2
    • getInvA2

      public short[][] getInvA2()
      Getter for the inverse matrix of A2
      Returns:
      the A2inv
    • getLayers

      public Layer[] getLayers()
      Returns the layers contained in the private key
      Returns:
      layers
    • getVi

      public int[] getVi()
      Returns the array of vi-s
      Returns:
      the vi
    • equals

      public boolean equals(Object other)
      Compare this Rainbow private key with another object.
      Overrides:
      equals in class Object
      Parameters:
      other - the other object
      Returns:
      the result of the comparison
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getAlgorithm

      public final String getAlgorithm()
      Specified by:
      getAlgorithm in interface Key
      Returns:
      name of the algorithm - "Rainbow"
    • getEncoded

      public byte[] getEncoded()
      Specified by:
      getEncoded in interface Key
    • getFormat

      public String getFormat()
      Specified by:
      getFormat in interface Key