Package org.bouncycastle.pqc.asn1
Class RainbowPrivateKey
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.pqc.asn1.RainbowPrivateKey
- All Implemented Interfaces:
ASN1Encodable
,Encodable
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
ConstructorsConstructorDescriptionRainbowPrivateKey
(short[][] invA1, short[] b1, short[][] invA2, short[] b2, int[] vi, Layer[] layers) -
Method Summary
Modifier and TypeMethodDescriptionshort[]
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
short[][]
getInvA1()
Getter for the inverse matrix of A1.short[][]
getInvA2()
Getter for the inverse matrix of A2Layer[]
Returns the layers contained in the private keyint[]
getVi()
Returns the array of vi-sMethod 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
-
Constructor Details
-
RainbowPrivateKey
public RainbowPrivateKey(short[][] invA1, short[] b1, short[][] invA2, short[] b2, int[] vi, Layer[] layers)
-
-
Method Details
-
getInstance
-
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
Returns the layers contained in the private key- Returns:
- layers
-
getVi
public int[] getVi()Returns the array of vi-s- Returns:
- the vi
-
toASN1Primitive
Description copied from class:ASN1Object
Method providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-