java.lang.Object
java.security.KeyPairGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.DilithiumKeyPairGenerator
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 -
Method Summary
Modifier and TypeMethodDescriptionGenerates a CRYSTALS-Dilithium key pair via hardware.void
initialize
(int keysize, SecureRandom random) CRYSTALS-Dilithium does not support key size specifications.void
initialize
(AlgorithmParameterSpec params, SecureRandom random) Initializes this KeyPairGenerator for given parameters and secure random source.
-
Constructor Details
-
DilithiumKeyPairGenerator
public DilithiumKeyPairGenerator()Creates a new instance of this class.
-
-
Method Details
-
initialize
CRYSTALS-Dilithium does not support key size specifications.- Specified by:
initialize
in classKeyPairGeneratorSpi
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException Initializes this KeyPairGenerator for given parameters and secure random source.- Overrides:
initialize
in classKeyPairGeneratorSpi
- Parameters:
params
- the AlgorithmParameterSpec for this object.random
- the SecureRandom object for generating random numbers.- Throws:
InvalidAlgorithmParameterException
- thrown when parameter set is not recognized.
-
generateKeyPair
Generates a CRYSTALS-Dilithium key pair via hardware.- Specified by:
generateKeyPair
in classKeyPairGeneratorSpi
- Returns:
- a KeyPair contains a pair of generated CRYSTALS-Dilithium keys
- Throws:
IllegalArgumentException
- in the key label formal is not valid
-