Detailed information about the key generation is to be found in the paper of Jintai Ding, Dieter Schmidt: Rainbow, a New Multivariable Polynomial Signature Scheme. ACNS 2005: 164-175 (https://dx.doi.org/10.1007/11496137_12)
| Modifier and Type | Field and Description |
|---|---|
| private short[][] | |
| private short[][] | |
| private short[][] | |
| private short[][] | |
| private short[] | |
| private short[] | |
| private boolean | |
| private Layer[] | |
| private int | |
| private short[][] | |
| private short[] | |
| private short[][] | |
| private RainbowKeyGenerationParameters | |
| private SecureRandom | |
| private int[] |
| Access | Constructor and Description |
|---|---|
| public | RainbowKeyPairGenerator()
The standard constructor tries to generate the Rainbow algorithm identifier with the corresponding OID. |
| Modifier and Type | Method and Description |
|---|---|
| private void | compactPublicKey(short[][][]
3-dimensional array containing a n x n Matrix for each of the
n - v1 polynomials coeff_quadratic_to_compact)The quadratic (or mixed) terms of the public key are compacted from a n x n matrix per polynomial to an upper diagonal matrix stored in one integer array of n (n + 1) / 2 elements per polynomial. |
| private void | |
| private void | |
| public AsymmetricCipherKeyPair | generateKeyPair()
Implements org. |
| private void | generateL1()
This function generates the invertible affine linear map L1 = A1*x + b1 The translation part b1, is stored in a separate array. |
| private void | generateL2()
This function generates the invertible affine linear map L2 = A2*x + b2 The translation part b2, is stored in a separate array. |
| public AsymmetricCipherKeyPair | |
| public void | init(KeyGenerationParameters
the parameters the key pair is to be initialised with. param)Implements org. |
| public void | |
| private void | |
| private void | keygen()
This function calls the functions for the random generation of the coefficients and the matrices needed for the private key and the method for computing the public key. |
| A1 | back to summary |
|---|---|
| private short[][] A1 | |
| A1inv | back to summary |
|---|---|
| private short[][] A1inv | |
| A2 | back to summary |
|---|---|
| private short[][] A2 | |
| A2inv | back to summary |
|---|---|
| private short[][] A2inv | |
| b1 | back to summary |
|---|---|
| private short[] b1 | |
| b2 | back to summary |
|---|---|
| private short[] b2 | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| layers | back to summary |
|---|---|
| private Layer[] layers | |
| numOfLayers | back to summary |
|---|---|
| private int numOfLayers | |
| pub_quadratic | back to summary |
|---|---|
| private short[][] pub_quadratic | |
| pub_scalar | back to summary |
|---|---|
| private short[] pub_scalar | |
| pub_singular | back to summary |
|---|---|
| private short[][] pub_singular | |
| rainbowParams | back to summary |
|---|---|
| private RainbowKeyGenerationParameters rainbowParams | |
| sr | back to summary |
|---|---|
| private SecureRandom sr | |
| vi | back to summary |
|---|---|
| private int[] vi | |
| RainbowKeyPairGenerator | back to summary |
|---|---|
| public RainbowKeyPairGenerator() The standard constructor tries to generate the Rainbow algorithm identifier with the corresponding OID. | |
| compactPublicKey | back to summary |
|---|---|
| private void compactPublicKey(short[][][] coeff_quadratic_to_compact) The quadratic (or mixed) terms of the public key are compacted from a n x n matrix per polynomial to an upper diagonal matrix stored in one integer array of n (n + 1) / 2 elements per polynomial. The ordering of elements is lexicographic and the result is updating this.pub_quadratic, which stores the quadratic elements of the public key.
| |
| computePublicKey | back to summary |
|---|---|
| private void computePublicKey() This function computes the public key from the private key. The composition of F with L2 is computed, followed by applying L1 to the composition's result. The singular and scalar values constitute to the public key as is, the quadratic terms are compacted in compactPublicKey() | |
| generateF | back to summary |
|---|---|
| private void generateF() This function generates the private map F, which consists of u-1 layers. Each layer consists of oi polynomials where oi = vi[i+1]-vi[i]. The methods for the generation of the coefficients of these polynomials are called here. | |
| generateKeyPair | back to summary |
|---|---|
| public AsymmetricCipherKeyPair generateKeyPair() Implements org. Doc from org. return an AsymmetricCipherKeyPair containing the generated keys.
| |
| generateL1 | back to summary |
|---|---|
| private void generateL1() This function generates the invertible affine linear map L1 = A1*x + b1 The translation part b1, is stored in a separate array. The inverse of the matrix-part of L1 A1inv is also computed here. This linear map hides the output of the map F. It is on k^(n-v1). | |
| generateL2 | back to summary |
|---|---|
| private void generateL2() This function generates the invertible affine linear map L2 = A2*x + b2 The translation part b2, is stored in a separate array. The inverse of the matrix-part of L2 A2inv is also computed here. This linear map hides the output of the map F. It is on k^(n). | |
| genKeyPair | back to summary |
|---|---|
| public AsymmetricCipherKeyPair genKeyPair() This function generates a Rainbow key pair.
| |
| init | back to summary |
|---|---|
| public void init(KeyGenerationParameters param) Implements org. Doc from org. intialise the key pair generator.
| |
| initialize | back to summary |
|---|---|
| public void initialize(KeyGenerationParameters param) | |
| initializeDefault | back to summary |
|---|---|
| private void initializeDefault() | |
| keygen | back to summary |
|---|---|
| private void keygen() This function calls the functions for the random generation of the coefficients and the matrices needed for the private key and the method for computing the public key. | |