Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.crypto.fips.provider
Class DHKeyPairGenerator

    java.lang.Object
      |
      +--java.security.KeyPairGeneratorSpi
            |
            +--com.ibm.crypto.fips.provider.DHKeyPairGenerator

All Implemented Interfaces:
  AlgorithmStatus

public final class DHKeyPairGenerator
extends java.security.KeyPairGeneratorSpi
implements AlgorithmStatus

This class represents the key pair generator for Diffie-Hellman key pairs.

This key pair generator may be initialized in two different ways:

- By providing the size in bits of the prime modulus. This will be used to create a prime modulus and base generator, which will then be used to create the Diffie-Hellman key pair. The default size of the prime modulus is 1024 bits.
- By providing a prime modulus and base generator.

Version:
  1.0, 05/19/03
Author:
  Jan Luehe, John Peck
See Also:
  `java.security.KeyPairGenerator`

Constructor Summary
`DHKeyPairGenerator()`

Method Summary
`java.security.KeyPair` | `generateKeyPair()` Generates a key pair.
`void` | `initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)` Initializes this key pair generator for the specified parameter set and source of randomness.
`void` | `initialize(int keysize, java.security.SecureRandom random)` Initializes this key pair generator for a certain keysize and source of randomness.
`protected java.security.KeyPair` | `internalGenerateKeyPair()` Generates a key pair.
`protected void` | `internalInitialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)` Initializes this key pair generator for the specified parameter set and source of randomness.
`protected void` | `internalInitialize(int keysize, java.security.SecureRandom random)` Initializes this key pair generator for a certain keysize and source of randomness.
`boolean` | `isFipsApproved()` This function allows an application to verify the the algorithm is FIPS approved.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DHKeyPairGenerator

    public DHKeyPairGenerator()

Method Detail

### initialize

    public void initialize(int keysize,
                           java.security.SecureRandom random)

  Initializes this key pair generator for a certain keysize and source of randomness. The keysize is specified as the size in bits of the prime modulus.
  Overrides:
    `initialize` in class `java.security.KeyPairGeneratorSpi`
  Parameters:
    `keysize` - the keysize (size of prime modulus) in bits
    `random` - the source of randomness

### internalInitialize

    protected void internalInitialize(int keysize,
                                      java.security.SecureRandom random)

  Initializes this key pair generator for a certain keysize and source of randomness. The keysize is specified as the size in bits of the prime modulus.
  Parameters:
    `keysize` - the keysize (size of prime modulus) in bits
    `random` - the source of randomness

### isFipsApproved

    public boolean isFipsApproved()

  This function allows an application to verify the the algorithm is FIPS approved.
  Specified by:
    `isFipsApproved` in interface `AlgorithmStatus`
  See Also:
    `AlgorithmStatus.isFipsApproved()`

### initialize

    public void initialize(java.security.spec.AlgorithmParameterSpec params,
                           java.security.SecureRandom random)
                    throws java.security.InvalidAlgorithmParameterException

  Initializes this key pair generator for the specified parameter set and source of randomness.

  The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).

  Overrides:
    `initialize` in class `java.security.KeyPairGeneratorSpi`
  Parameters:
    `params` - the parameter set used to generate the key pair
    `random` - the source of randomness
  Throws:
    `java.security.InvalidAlgorithmParameterException` - if the given parameters are inappropriate for this key pair generator

### internalInitialize

    protected void internalInitialize(java.security.spec.AlgorithmParameterSpec params,
                                      java.security.SecureRandom random)
                               throws java.security.InvalidAlgorithmParameterException

  Initializes this key pair generator for the specified parameter set and source of randomness.

  The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).

  Parameters:
    `params` - the parameter set used to generate the key pair
    `random` - the source of randomness
  Throws:
    `java.security.InvalidAlgorithmParameterException` - if the given parameters are inappropriate for this key pair generator

### generateKeyPair

    public java.security.KeyPair generateKeyPair()

  Generates a key pair.
  Overrides:
    `generateKeyPair` in class `java.security.KeyPairGeneratorSpi`
  Returns:
    the new key pair

### internalGenerateKeyPair

    protected java.security.KeyPair internalGenerateKeyPair()

  Generates a key pair.
  Returns:
    the new key pair

Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD