Class ECParameterGenerator

java.lang.Object
java.security.AlgorithmParameterGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.ECParameterGenerator

public final class ECParameterGenerator extends AlgorithmParameterGeneratorSpi
This class can be used to generate a set of Elliptic Curve parameters to be used with the Elliptic Curve algorithm. In cases where this class has not been explicitly initialized, parameters for the default NIST curve named secp256r1 will be generated.
  • Constructor Details

    • ECParameterGenerator

      public ECParameterGenerator()
      Constructor
  • Method Details

    • engineInit

      protected void engineInit(int size, SecureRandom random)
      Initializes this parameter generator for a certain key size and source of randomness. The source of randomness will be ignored because only standard Elliptic Curve parameters will be generated for the supplied key size.
      Specified by:
      engineInit in class AlgorithmParameterGeneratorSpi
      Parameters:
      size - the key size in number of bits
      random - the source of randomness, which is ignored
      Throws:
      InvalidParameterException - if the key size is not supported
    • engineInit

      protected void engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterException
      Initializes this parameter generator with a set of algorithm-specific parameter generation values and a source of randomness. The source of randomness will be ignored because only standard Elliptic Curve parameters will be generated.
      Specified by:
      engineInit in class AlgorithmParameterGeneratorSpi
      Parameters:
      genParamSpec - the set of algorithm-specific parameter generation values
      random - the source of randomness, which will be ignored
      Throws:
      NullPointerException - if genParamSpec is null
      InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator
    • engineGenerateParameters

      protected AlgorithmParameters engineGenerateParameters()
      Generates Elliptic Curve parameters. If this class has not been explicitly initialized, parameters for the default NIST curve named secp256r1 will be generated.
      Specified by:
      engineGenerateParameters in class AlgorithmParameterGeneratorSpi
      Returns:
      the generated Elliptic Curve parameters