- java.lang.Object
-
- java.security.KeyPairGeneratorSpi
-
- com.ibm.crypto.hdwrCCA.provider.DilithiumKeyPairGenerator
-
public class DilithiumKeyPairGenerator extends java.security.KeyPairGeneratorSpi
This class generates CRSTALS-Dilithium public/private key pairs via hardware. An application can specify the size, the key label, the storage type and usage type of the key pair to be generated via an instance of the DilithiumKeyParameterSpec class.
-
-
Constructor Summary
Constructors Constructor Description DilithiumKeyPairGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.KeyPair
generateKeyPair()
Generates a CRYSTALS-Dilithium key pair via hardware.void
initialize(int keysize, java.security.SecureRandom random)
CRYSTALS-Dilithium does not support key size specifications.void
initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
Initializes this KeyPairGenerator for given parameters and secure random source.
-
-
-
Method Detail
-
initialize
public void initialize(int keysize, java.security.SecureRandom random)
CRYSTALS-Dilithium does not support key size specifications.- Specified by:
initialize
in classjava.security.KeyPairGeneratorSpi
-
initialize
public void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
Initializes this KeyPairGenerator for given parameters and secure random source.- Overrides:
initialize
in classjava.security.KeyPairGeneratorSpi
- Parameters:
params
- the AlgorithmParameterSpec for this object.random
- the SecureRandom object for generating random numbers.- Throws:
java.security.InvalidAlgorithmParameterException
- thrown when parameter set is not recognized.
-
generateKeyPair
public java.security.KeyPair generateKeyPair()
Generates a CRYSTALS-Dilithium key pair via hardware.- Specified by:
generateKeyPair
in classjava.security.KeyPairGeneratorSpi
- Returns:
- a KeyPair contains a pair of generated CRYSTALS-Dilithium keys
- Throws:
java.lang.IllegalArgumentException
- in the key label formal is not valid
-
-