com.ibm.crypto.hdwrCCA.provider

Class ECKeyPairGenerator

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


  • public final class ECKeyPairGenerator
    extends java.security.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.security.KeyPair generateKeyPair()
      Generates an Elliptic Curve key pair.
      void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
      Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
      void initialize(int keysize, java.security.SecureRandom random)
      Initializes the key pair generator for a certain key size, using the default parameter set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ECKeyPairGenerator

        public ECKeyPairGenerator()
    • Method Detail

      • initialize

        public void initialize(java.security.spec.AlgorithmParameterSpec params,
                               java.security.SecureRandom random)
                        throws java.security.InvalidAlgorithmParameterException
        Initializes the key pair generator using the specified parameter set and user-provided source of randomness.
        Overrides:
        initialize in class java.security.KeyPairGeneratorSpi
        Parameters:
        params - the parameter set used to generate the keys
        random - the source of randomness for this generator
        Throws:
        java.security.InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator
      • initialize

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

        public java.security.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 java.security.KeyPairGeneratorSpi
        Returns:
        the newly generated Elliptic Curve key pair
� Portions Copyright 1997, 2022 IBM Corporation. All rights reserved. � Portions Copyright 1997, 2022, Oracle and/or its affiliates. All rights reserved.