java.lang.Object
java.security.KeyPairGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.ECKeyPairGenerator
This class generates EC public and private key pairs.
An application can specify the key size, key label, storage type and
usage type of the key pair to be generated via an instance of the
AlgorithmParameterSpec
class.
The default key has a size of 256, stored in the CLEAR, and with key
management functionalities if key management is supported by Elliptic Curve
keys. If key management is not supported, then the default usage will be
signature.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates an Elliptic Curve key pair.void
initialize
(int keysize, SecureRandom random) Initializes the key pair generator for a certain key size, using the default parameter set.void
initialize
(AlgorithmParameterSpec params, SecureRandom random) Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
-
Constructor Details
-
ECKeyPairGenerator
public ECKeyPairGenerator()Constructor
-
-
Method Details
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException Initializes the key pair generator using the specified parameter set and user-provided source of randomness.- Overrides:
initialize
in classKeyPairGeneratorSpi
- Parameters:
params
- the parameter set used to generate the keysrandom
- the source of randomness for this generator- Throws:
InvalidAlgorithmParameterException
- if the given parameters are inappropriate for this key pair generator
-
initialize
Initializes the key pair generator for a certain key size, using the default parameter set. The generated keys will be stored in the CLEAR.- Specified by:
initialize
in classKeyPairGeneratorSpi
- Parameters:
keysize
- the key size of the key to be generatedrandom
- the source of randomness for this generator- Throws:
InvalidParameterException
- when a parameter is not recognized
-
generateKeyPair
Generates an Elliptic Curve key pair. The public key will be usable outside this provider. However, the private key will be stored either in a hardware associated file (PKDS) or as a clear token representation (CLEAR), and is therefore only usable by this provider on the machine that generated the key pair.- Specified by:
generateKeyPair
in classKeyPairGeneratorSpi
- Returns:
- the newly generated Elliptic Curve key pair
-