Class RainbowPrivateKey

  • All Implemented Interfaces:
    ASN1Encodable, Encodable

    public class RainbowPrivateKey
    extends ASN1Object
    Return the key data to encode in the PrivateKeyInfo structure.

    The ASN.1 definition of the key structure is

       RainbowPrivateKey ::= SEQUENCE {
             CHOICE
             {
             oid        OBJECT IDENTIFIER         -- OID identifying the algorithm
             version    INTEGER                    -- 0
             }
         A1inv      SEQUENCE OF OCTET STRING  -- inversed matrix of L1
         b1         OCTET STRING              -- translation vector of L1
         A2inv      SEQUENCE OF OCTET STRING  -- inversed matrix of L2
         b2         OCTET STRING              -- translation vector of L2
         vi         OCTET STRING              -- num of elmts in each Set S
         layers     SEQUENCE OF Layer         -- layers of F
       }
    
       Layer             ::= SEQUENCE OF Poly
    
       Poly              ::= SEQUENCE {
         alpha      SEQUENCE OF OCTET STRING
         beta       SEQUENCE OF OCTET STRING
         gamma      OCTET STRING
         eta        INTEGER
       }
     
    • Constructor Detail

      • RainbowPrivateKey

        public RainbowPrivateKey​(short[][] invA1,
                                 short[] b1,
                                 short[][] invA2,
                                 short[] b2,
                                 int[] vi,
                                 Layer[] layers)
    • 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