de.flexiprovider.pqc.rainbow
Class RainbowPrivateKeySpec

java.lang.Object
  |
  +--de.flexiprovider.pqc.rainbow.RainbowPrivateKeySpec
All Implemented Interfaces:
KeySpec, java.security.spec.KeySpec

public class RainbowPrivateKeySpec
extends java.lang.Object
implements KeySpec

This class provides a specification for a RainbowSignature private key.

Author:
Patrick Neugebauer, Marius Senftleben, Tsvetoslava Vateva
See Also:
RainbowPrivateKey, KeySpec

Constructor Summary
protected RainbowPrivateKeySpec(java.lang.String oid, byte[][] A1inv, byte[] b1, byte[][] A2inv, byte[] b2, byte[] vi, byte[][][][] coeff_alpha, byte[][][][] coeff_beta, byte[][][] coeff_gamma, byte[][] coeff_eta)
          Constructor used by the RainbowKeyFactory.
protected RainbowPrivateKeySpec(java.lang.String oid, short[][] A1inv, short[] b1, short[][] A2inv, short[] b2, int[] vi, Layer[] layers)
          Constructor
 
Method Summary
protected  short[][] getA1inv()
          Getter for the inverse matrix of A1.
protected  short[][] getA2inv()
          Getter for the inverse matrix of A2
 java.lang.String getAlgorithm()
           
protected  short[] getb1()
          Getter for the translation part of the private quadratic map L1.
protected  short[] getb2()
          Getter for the translation part of the private quadratic map L2.
protected  Layer[] getLayers()
          Returns the layers contained in the private key
 java.lang.String getOIDString()
           
protected  int[] getVi()
          /** Returns the array of vi-s
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RainbowPrivateKeySpec

protected RainbowPrivateKeySpec(java.lang.String oid,
                                short[][] A1inv,
                                short[] b1,
                                short[][] A2inv,
                                short[] b2,
                                int[] vi,
                                Layer[] layers)
Constructor
Parameters:
oid - the OID of the algorithm
A1inv - the inverse of A1(the matrix part of the affine linear map L1) (n-v1 x n-v1 matrix)
b1 - translation vector, part of the linear affine map L1
A2inv - the inverse of A2(the matrix part of the affine linear map L2) (n x n matrix)
b2 - translation vector, part of the linear affine map L2
vi - the number of Vinegar-variables per layer
layers - the polynomials with their coefficients of private map F

RainbowPrivateKeySpec

protected RainbowPrivateKeySpec(java.lang.String oid,
                                byte[][] A1inv,
                                byte[] b1,
                                byte[][] A2inv,
                                byte[] b2,
                                byte[] vi,
                                byte[][][][] coeff_alpha,
                                byte[][][][] coeff_beta,
                                byte[][][] coeff_gamma,
                                byte[][] coeff_eta)
Constructor used by the RainbowKeyFactory. It constructs internal data types out of these bytes got from ASN.1 decoding.
Parameters:
oid - the OID of the algorithm
A1inv - the inverse of A1(the matrix part of the affine linear map L1) (n-v1 x n-v1 matrix) (in bytes)
b1 - translation vector, part of the linear affine map L1 (in bytes)
A2inv - the inverse of A2(the matrix part of the affine linear map L2) (n x n matrix) (in bytes)
b2 - translation vector, part of the linear affine map L1 (in bytes)
vi - number of Vinegar-variables per layer (in bytes)
coeff_alpha - alpha-coefficients of the polynomials in this layer (in bytes)
coeff_beta - beta-coefficients of the polynomials in this layer (in bytes)
coeff_gamma - gamma-coefficients of the polynomials in this layer (in bytes)
coeff_eta - eta-coefficients of the polynomials in this layer (in bytes)
Method Detail

getAlgorithm

public final java.lang.String getAlgorithm()
Returns:
name of the algorithm - "Rainbow"

getOIDString

public java.lang.String getOIDString()
Returns:
the OID string identifying the algorithm.

getb1

protected short[] getb1()
Getter for the translation part of the private quadratic map L1.
Returns:
b1 the translation part of L1

getA1inv

protected short[][] getA1inv()
Getter for the inverse matrix of A1.
Returns:
the A1inv inverse

getb2

protected short[] getb2()
Getter for the translation part of the private quadratic map L2.
Returns:
b2 the translation part of L2

getA2inv

protected short[][] getA2inv()
Getter for the inverse matrix of A2
Returns:
the A2inv

getLayers

protected Layer[] getLayers()
Returns the layers contained in the private key
Returns:
layers

getVi

protected int[] getVi()
/** Returns the array of vi-s
Returns:
the vi