Class BCRainbowPrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable

    public class BCRainbowPrivateKey
    extends java.lang.Object
    implements java.security.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:
    Serialized Form
    • Method Detail

      • 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​(java.lang.Object other)
        Compare this Rainbow private key with another object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - the other object
        Returns:
        the result of the comparison
      • hashCode

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

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

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

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key