|
|||||||||
| 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.ots.merkle.MerkleOTSKeyPairGenerator
This class generates a private and public key for the MerkleOTS (One Time
Signature). The private key is a 2-dimensional byte array of random values
that are generated with a secure random generator. The secure random
generator is initiated before with a seed that can be set with the integer
value startValue. The public key is a 2-dimensional byte array with the hash
values of the private key. A key pair consists of a
MerkleOTSPublicKey and a MerkleOTSPrivateKey.
A MerkleOTS key pair can be generated as follows:
// obtain an instance of the key pair generator KeyPairGenerator kpg = KeyPairGenerator.getInstance( "MerkleOTSwithSHA256andSHA1PRNG", "FlexiPQC"); // set the seed size kpg.initialize(256); // generate the key pair KeyPair keyPair = kpg.generateKeyPair();
MerkleOTSPrivateKey,
MerkleOTSPublicKey| Inner Class Summary | |
static class |
MerkleOTSKeyPairGenerator.SHA1andSHA1PRNG
Merkle OTS key pair generator with SHA1 and SHA1PRNG |
static class |
MerkleOTSKeyPairGenerator.SHA256andSHA1PRNG
Merkle OTS key pair generator with SHA256 and SHA1PRNG |
static class |
MerkleOTSKeyPairGenerator.SHA384andSHA1PRNG
Merkle OTS key pair generator with SHA384 and SHA1PRNG |
static class |
MerkleOTSKeyPairGenerator.SHA512andSHA1PRNG
Merkle OTS key pair generator with SHA512 and SHA1PRNG |
| Constructor Summary | |
protected |
MerkleOTSKeyPairGenerator(java.lang.String oid,
MessageDigest md,
java.lang.String prngName)
Constructor. |
| Method Summary | |
KeyPair |
genKeyPair()
Generate a MerkleOTS key pair, consisting of a MerkleOTSPublicKey
and a MerkleOTSPrivateKey. |
void |
initialize(AlgorithmParameterSpec params,
SecureRandom random)
Initialize the key pair generator. |
void |
initialize(int seedSize,
SecureRandom random)
Initialize the key pair generator with the given seed size and source of randomness. |
| Methods inherited from class de.flexiprovider.api.keys.KeyPairGenerator |
generateKeyPair, initialize, initialize |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
protected MerkleOTSKeyPairGenerator(java.lang.String oid,
MessageDigest md,
java.lang.String prngName)
oid - the OID of the algorithmmd - the message digestprngName - the name of the PRNG| Method Detail |
public void initialize(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
initialize in class KeyPairGeneratorparams - the parametersrandom - the source of randomnessInvalidAlgorithmParameterException - if the parameters are not an instance of
MerkleOTSKeyGenParameterSpec.
public void initialize(int seedSize,
SecureRandom random)
initialize in class KeyPairGeneratorseedSize - the seed size in bits (>= hash length)random - the source of randomnesspublic KeyPair genKeyPair()
MerkleOTSPublicKey
and a MerkleOTSPrivateKey.genKeyPair in class KeyPairGenerator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||