Top Description Fields Constructors Methods
org.bouncycastle.pqc.asn1

public Class RainbowPrivateKey

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .DEROctetString, .DERSequence, org.bouncycastle.pqc.legacy.crypto.rainbow.Layer, org.bouncycastle.pqc.legacy.crypto.rainbow.util.RainbowUtil

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
  }

Field Summary

Modifier and TypeField and Description
private byte[]
private byte[]
private byte[][]
private byte[][]
private Layer[]
private ASN1ObjectIdentifier
private ASN1Integer
private byte[]

Constructor Summary

AccessConstructor and Description
private
public
RainbowPrivateKey(short[][] invA1, short[] b1, short[][] invA2, short[] b2, int[] vi, Layer[] layers)

Method Summary

Modifier and TypeMethod and Description
public short[]

Returns:

b1 the translation part of L1
getB1
()

Getter for the translation part of the private quadratic map L1.

public short[]

Returns:

b2 the translation part of L2
getB2
()

Getter for the translation part of the private quadratic map L2.

public static RainbowPrivateKey
public short[][]

Returns:

the A1inv inverse
getInvA1
()

Getter for the inverse matrix of A1.

public short[][]

Returns:

the A2inv
getInvA2
()

Getter for the inverse matrix of A2

public Layer[]

Returns:

layers
getLayers
()

Returns the layers contained in the private key

public ASN1Integer
public int[]

Returns:

the vi
getVi
()

Returns the array of vi-s

public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

b1back to summary
private byte[] b1
b2back to summary
private byte[] b2
invA1back to summary
private byte[][] invA1
invA2back to summary
private byte[][] invA2
layersback to summary
private Layer[] layers
oidback to summary
private ASN1ObjectIdentifier oid
versionback to summary
private ASN1Integer version
viback to summary
private byte[] vi

Constructor Detail

RainbowPrivateKeyback to summary
private RainbowPrivateKey(ASN1Sequence seq)
RainbowPrivateKeyback to summary
public RainbowPrivateKey(short[][] invA1, short[] b1, short[][] invA2, short[] b2, int[] vi, Layer[] layers)

Method Detail

getB1back to summary
public short[] getB1()

Getter for the translation part of the private quadratic map L1.

Returns:short[]

b1 the translation part of L1

getB2back to summary
public short[] getB2()

Getter for the translation part of the private quadratic map L2.

Returns:short[]

b2 the translation part of L2

getInstanceback to summary
public static RainbowPrivateKey getInstance(Object o)
getInvA1back to summary
public short[][] getInvA1()

Getter for the inverse matrix of A1.

Returns:short[][]

the A1inv inverse

getInvA2back to summary
public short[][] getInvA2()

Getter for the inverse matrix of A2

Returns:short[][]

the A2inv

getLayersback to summary
public Layer[] getLayers()

Returns the layers contained in the private key

Returns:Layer[]

layers

getVersionback to summary
public ASN1Integer getVersion()
getViback to summary
public int[] getVi()

Returns the array of vi-s

Returns:int[]

the vi

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.