Bouncy Castle Cryptography Library 1.69

org.bouncycastle.pqc.asn1
Class RainbowPrivateKey

java.lang.Object
  extended byorg.bouncycastle.asn1.ASN1Object
      extended byorg.bouncycastle.pqc.asn1.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 Summary
RainbowPrivateKey(short[][] invA1, short[] b1, short[][] invA2, short[] b2, int[] vi, Layer[] layers)
           
 
Method Summary
 short[] getB1()
          Getter for the translation part of the private quadratic map L1.
 short[] getB2()
          Getter for the translation part of the private quadratic map L2.
static RainbowPrivateKey getInstance(java.lang.Object o)
           
 short[][] getInvA1()
          Getter for the inverse matrix of A1.
 short[][] getInvA2()
          Getter for the inverse matrix of A2
 Layer[] getLayers()
          Returns the layers contained in the private key
 ASN1Integer getVersion()
           
 int[] getVi()
          Returns the array of vi-s
 ASN1Primitive toASN1Primitive()
          Method providing a primitive representation of this object suitable for encoding.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RainbowPrivateKey

public RainbowPrivateKey(short[][] invA1,
                         short[] b1,
                         short[][] invA2,
                         short[] b2,
                         int[] vi,
                         Layer[] layers)
Method Detail

getInstance

public static RainbowPrivateKey getInstance(java.lang.Object o)

getVersion

public ASN1Integer getVersion()

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

toASN1Primitive

public ASN1Primitive toASN1Primitive()
Description copied from class: ASN1Object
Method providing a primitive representation of this object suitable for encoding.

Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object
Returns:
a primitive representation of this object.

Bouncy Castle Cryptography Library 1.69