de.flexiprovider.pqc.rainbow
Class RainbowKeyPairGenerator
java.lang.Object
|
+--java.security.KeyPairGeneratorSpi
|
+--de.flexiprovider.api.keys.KeyPairGenerator
|
+--de.flexiprovider.pqc.rainbow.RainbowKeyPairGenerator
- public class RainbowKeyPairGenerator
- extends KeyPairGenerator
This class extends the KeyPairGenerator in the FlexiProvider_API. It is used
as a generator for the private and public key of the Rainbow Signature
Scheme.
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 (http://dx.doi.org/10.1007/11496137_12)
- Author:
- Patrick Neugebauer, Marius Senftleben, Tsvetoslava Vateva
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RainbowKeyPairGenerator
public RainbowKeyPairGenerator()
genKeyPair
public KeyPair genKeyPair()
- This function generates a Rainbow key pair, consisting of a
RainbowPublicKey and a RainbowPrivateKey.
- Overrides:
genKeyPair in class KeyPairGenerator
- Returns:
- the generated key pair
initialize
public void initialize(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
- This function is used for initialization of the
RainbowKeyPairGenerator
making use of RanbowParameterSpec.
- Overrides:
initialize in class KeyPairGenerator
- Parameters:
params - random - source of randomness
initialize
public void initialize(int keysize,
SecureRandom random)
throws InvalidParameterException
- This function initializes the key pair generator with the given key size.
- Overrides:
initialize in class KeyPairGenerator
- Parameters:
keySize - random - the source of randomness
computePublicKey
public 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()
compactPublicKey
public 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.
- Parameters:
coeff_quadratic_to_compact - 3-dimensional array containing a n x n Matrix for each of the
n - v1 polynomials