public class AsconKeyGenerator extends KeyGeneratorSpi
An application uses
KeyGenerator keyGen = KeyGenerator.getInstance("Ascon-128", "IAIK");
for creating a KeyGenerator object for the Ascon algorithm. For actually
generating the requested secret key from the KeyGenerator object
just created, an application calls the generateKey method after
having initialized the generator with some random seed or relying on the
default system-provided source of randomness:
SecretKey key = keyGen.generateKey();
KeyGenerator,
KeyGeneratorSpi,
SecretKey| Modifier and Type | Class and Description |
|---|---|
static class |
AsconKeyGenerator.Ascon128KeyGenerator
Ascon KeyGenerator for generating 128 bit keys.
|
static class |
AsconKeyGenerator.Ascon80pqKeyGenerator
Ascon KeyGenerator for generating 160 bit keys.
|
| Constructor and Description |
|---|
AsconKeyGenerator()
Default Constructor for creating an AsconKeyGenerator object.
|
| Modifier and Type | Method and Description |
|---|---|
protected SecretKey |
engineGenerateKey()
Actually generates a secret key from this KeyGenerator object.
|
protected void |
engineInit(AlgorithmParameterSpec algorithmParameterSpec,
SecureRandom secureRandom)
Initializes this key generator with given algorithm parameters and random seed.
|
protected void |
engineInit(int keysize,
SecureRandom secureRandom)
Initializes this key generator with the given keysize and the given random seed
|
protected void |
engineInit(SecureRandom secureRandom)
Initializes the key generator with the given random seed.
|
public AsconKeyGenerator()
protected void engineInit(SecureRandom secureRandom)
engineInit in class KeyGeneratorSpisecureRandom - the random seedKeyGenerator.init(java.security.SecureRandom)protected void engineInit(AlgorithmParameterSpec algorithmParameterSpec, SecureRandom secureRandom)
engineInit in class KeyGeneratorSpialgorithmParameterSpec - the algorithm parameterssecureRandom - the random seedKeyGenerator.init(java.security.SecureRandom)protected void engineInit(int keysize,
SecureRandom secureRandom)
engineInit in class KeyGeneratorSpikeysize - the size of the key to be createdsecureRandom - the random seedKeyGenerator.init(java.security.SecureRandom)protected SecretKey engineGenerateKey()
engineGenerateKey in class KeyGeneratorSpiKeyGenerator.generateKey()Copyright © 2022–2023 Stiftung SIC. All rights reserved.