Class ECKeyPairGenerator

java.lang.Object
java.security.KeyPairGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.ECKeyPairGenerator

public final class ECKeyPairGenerator extends KeyPairGeneratorSpi
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 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 class KeyPairGeneratorSpi
      Parameters:
      params - the parameter set used to generate the keys
      random - the source of randomness for this generator
      Throws:
      InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator
    • initialize

      public void initialize(int keysize, SecureRandom random) throws InvalidParameterException
      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 class KeyPairGeneratorSpi
      Parameters:
      keysize - the key size of the key to be generated
      random - the source of randomness for this generator
      Throws:
      InvalidParameterException - when a parameter is not recognized
    • generateKeyPair

      public KeyPair 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 class KeyPairGeneratorSpi
      Returns:
      the newly generated Elliptic Curve key pair