|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.security.KeyPairGeneratorSpi
|
+--de.flexiprovider.api.keys.KeyPairGenerator
|
+--de.flexiprovider.pqc.hbc.gmss.GMSSKeyPairGenerator
This class implements key pair generation of the generalized Merkle signature scheme (GMSS). The class extends the KeyPairGeneratorSpi class.
The GMSSKeyPairGenerator can be used as follows:
1. get instance of GMSS key pair generator:
KeyPairGenerator kpg =
KeyPairGenerator.getInstance("GMSSwithSHA1",
"FlexiPQC");
2. initialize the KPG with the desired Parameterset
kpg.initialize(parameterset);
3. create GMSS key pair:
KeyPair keyPair = kpg.generateKeyPair();
4. get the encoded private and public keys from the key pair:
encodedPublicKey = keyPair.getPublic().getEncoded();
encodedPrivateKey = keyPair.getPrivate().getEncoded();
The key pair generator can be initialized with an integer value as well. For
this purpose call kpg.initialize(keySize);. The integer
keySize determindes the number of signatures that can be
created. A value less than 10 creates 2^10 signatures, between 11 and 20
creates 2^20 and a keySize greater than 20 creates 2^40 signatures.
To generate an own parameterSpec for the use with GMSS use the following:
1. define int arrays of the desired parameters (defh for the height of the
single layers of the GMSS tree, w for the Winternitz parameters for each
layer, K for the parameter for the AuthPath computation)
int[] defh = {10, 10, 10, 10};
int[] defw = {9, 9, 9, 3};
int[] defk = {2, 2, 2, 2};
2. create a parameterspec
gps = new GMSSParameterSpec(defh.length, defh, defw, defk);
3. initialize the KPG with the desired Parameterset
kpg.initialize(parameterset);
GMSSSignature,
GMSSPrivateKey,
GMSSPublicKey| Inner Class Summary | |
static class |
GMSSKeyPairGenerator.GMSSwithSHA1
GMSSKeyPairGenerator with SHA1 |
static class |
GMSSKeyPairGenerator.GMSSwithSHA224
GMSSKeyPairGenerator with SHA224 |
static class |
GMSSKeyPairGenerator.GMSSwithSHA256
GMSSKeyPairGenerator with SHA256 |
static class |
GMSSKeyPairGenerator.GMSSwithSHA384
GMSSKeyPairGenerator with SHA384 |
static class |
GMSSKeyPairGenerator.GMSSwithSHA512
GMSSKeyPairGenerator with SHA512 |
| Constructor Summary | |
GMSSKeyPairGenerator(java.lang.String oidStr,
java.lang.String mdName,
java.lang.String mdProvName)
The standard constructor tries to generate the GMSS algorithm identifier with the corresponding OID. |
|
| Method Summary | |
KeyPair |
genKeyPair()
Generates the GMSS key pair. |
void |
initialize(AlgorithmParameterSpec algParamSpec)
Initalizes the key pair generator using a parameter set as input |
void |
initialize(AlgorithmParameterSpec algParamSpec,
SecureRandom secureRandom)
Initalizes the key pair generator using a parameter set as input |
void |
initialize(int keySize,
SecureRandom secureRandom)
This method initializes the GMSS KeyPairGenerator using an integer value keySize as input. |
| Methods inherited from class de.flexiprovider.api.keys.KeyPairGenerator |
generateKeyPair, initialize, initialize |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public GMSSKeyPairGenerator(java.lang.String oidStr,
java.lang.String mdName,
java.lang.String mdProvName)
oidStr - string with the oid of the algorithmmdName - name of the message digest for the construction of the
authentication treesmdProvName - provider name of the message digest for the construction of
the the authentication trees and for the OTS| Method Detail |
public KeyPair genKeyPair()
genKeyPair in class KeyPairGeneratorGMSSPrivateKey,
GMSSPublicKey
public void initialize(int keySize,
SecureRandom secureRandom)
keySize as input. It provides a simple use of the GMSS for
testing demands.
A given keysize of less than 10 creates an amount 2^10
signatures. A keySize between 10 and 20 creates 2^20 signatures. Given an
integer greater than 20 the key pair generator creates 2^40 signatures.
initialize in class KeyPairGeneratorkeySize - Assigns the parameters used for the GMSS signatures. There are
3 choices:secureRandom - not used by GMSS, the SHA1PRNG of the SUN Provider is always
used
public void initialize(AlgorithmParameterSpec algParamSpec,
SecureRandom secureRandom)
throws InvalidAlgorithmParameterException
initialize in class KeyPairGeneratoralgParamSpec - an instance of GMSSParameterSpecsecureRandom - not used in GMSSGMSSParameterSpec
public void initialize(AlgorithmParameterSpec algParamSpec)
throws InvalidAlgorithmParameterException
algParamSpec - an instance of GMSSParameterSpecGMSSParameterSpec
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||