IAIK ECC
version 2.18

iaik.security.ecc.ecdsa
Class ECDSAKeyPairGeneratorImpl

java.lang.Object
  extended byjava.security.KeyPairGeneratorSpi
      extended byjava.security.KeyPairGenerator
          extended byiaik.security.ecc.ecdsa.ECDSAKeyPairGeneratorImpl
All Implemented Interfaces:
ECDSAKeyPairGenerator

public class ECDSAKeyPairGeneratorImpl
extends java.security.KeyPairGenerator
implements ECDSAKeyPairGenerator

Implementation of a key pair generator for the ECDSA algorithm It is based on the Algorithm described in the P1363 standard.


Field Summary
static java.lang.String[] DEFAULT_CURVES
          The name of the default curves
static int DEFAULT_KEY_SIZE
          The default key size
static int[] KEY_SIZES
          The key sizes of the default curves
 
Constructor Summary
ECDSAKeyPairGeneratorImpl()
          Do not instantiate this class directly.
 
Method Summary
 java.security.KeyPair generateKeyPair()
          Generates the keys.
 void initialize(java.security.spec.AlgorithmParameterSpec spec)
          Initialize this keypair generator with ecc parameter spec.
 void initialize(ECDSAParams params, java.security.SecureRandom random)
          Implementation of ECDSAKeyPairGenerator Interface
 void initialize(int keysize, java.security.SecureRandom random)
          Parameterizes the engine with a NIST elliptic curve with the keysize 192, 224, 256, 384 or 521 bit.
 
Methods inherited from class java.security.KeyPairGenerator
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CURVES

public static final java.lang.String[] DEFAULT_CURVES
The name of the default curves

See Also:
initialize(int keysize, SecureRandom random)

DEFAULT_KEY_SIZE

public static final int DEFAULT_KEY_SIZE
The default key size

See Also:
Constant Field Values

KEY_SIZES

public static final int[] KEY_SIZES
The key sizes of the default curves

Constructor Detail

ECDSAKeyPairGeneratorImpl

public ECDSAKeyPairGeneratorImpl()
Do not instantiate this class directly. Use the KeyPairGenerator.getInstance method instead.

Method Detail

generateKeyPair

public java.security.KeyPair generateKeyPair()
Generates the keys.

Returns:
the new generated key pair.

initialize

public void initialize(java.security.spec.AlgorithmParameterSpec spec)
                throws java.security.InvalidAlgorithmParameterException
Initialize this keypair generator with ecc parameter spec.

Parameters:
spec - an AlgorithmParameterSpec value, which must be a ECCParameterSpec
Throws:
java.security.InvalidAlgorithmParameterException - if the spec is invalid

initialize

public void initialize(ECDSAParams params,
                       java.security.SecureRandom random)
Implementation of ECDSAKeyPairGenerator Interface

Specified by:
initialize in interface ECDSAKeyPairGenerator
Parameters:
params - the domain parameters.
random - a secure random source, may also be null.
See Also:
ECDSAKeyPairGenerator

initialize

public void initialize(int keysize,
                       java.security.SecureRandom random)
Parameterizes the engine with a NIST elliptic curve with the keysize 192, 224, 256, 384 or 521 bit. This method always uses curves over prime fields.

Parameters:
keysize - the required strength. If no NIST parameters with this size is available the next stronger parameter is taken (or 521)
random - the source of randomness.

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC