GnuDHKeyPairGenerator (GNU cryptographic primitives and tools)
Keywords: gnu.crypto.key.dh.GnuDHKeyPairGenerator,GnuDHKeyPairGenerator class

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.key.dh
Class GnuDHKeyPairGenerator

    java.lang.Object
      |
      +--gnu.crypto.key.dh.GnuDHKeyPairGenerator

All Implemented Interfaces:
  IKeyPairGenerator

public class GnuDHKeyPairGenerator
extends java.lang.Object
implements IKeyPairGenerator

An implementation of a Diffie-Hellman keypair generator.

Reference:

1. Diffie-Hellman Key Agreement Method
   Eric Rescorla.

Field Summary
`static java.lang.String` | `DH_PARAMETERS` Property name of an optional `DHGenParameterSpec` instance to use for this generator.
`static java.lang.String` | `EXPONENT_SIZE` Property name of the size in bits (Integer) of the private exponent (x).
`static java.lang.String` | `PRIME_SIZE` Property name of the size in bits (Integer) of the public prime (p).
`static java.lang.String` | `SOURCE_OF_RANDOMNESS` Property name of an optional `SecureRandom` instance to use.

Constructor Summary
`GnuDHKeyPairGenerator()`

Method Summary
`java.security.KeyPair` | `generate()` Generates a new keypair based on the attributes used to configure the instance.
`java.lang.String` | `name()` Returns the canonical name of this keypair generator.
`void` | `setup(java.util.Map attributes)` [Re]-initialises this instance for use with a given set of attributes.

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

Field Detail

### SOURCE_OF_RANDOMNESS

    public static final java.lang.String SOURCE_OF_RANDOMNESS

  Property name of an optional `SecureRandom` instance to use. The default is to use a classloader singleton from `PRNG`.

  See Also:
    Constant Field Values

### DH_PARAMETERS

    public static final java.lang.String DH_PARAMETERS

  Property name of an optional `DHGenParameterSpec` instance to use for this generator.

  See Also:
    Constant Field Values

### PRIME_SIZE

    public static final java.lang.String PRIME_SIZE

  Property name of the size in bits (Integer) of the public prime (p).

  See Also:
    Constant Field Values

### EXPONENT_SIZE

    public static final java.lang.String EXPONENT_SIZE

  Property name of the size in bits (Integer) of the private exponent (x).

  See Also:
    Constant Field Values

Constructor Detail

### GnuDHKeyPairGenerator

    public GnuDHKeyPairGenerator()

Method Detail

### name

    public java.lang.String name()

  Description copied from interface: `IKeyPairGenerator`
  Returns the canonical name of this keypair generator.

  Specified by:
    `name` in interface `IKeyPairGenerator`
  Returns:
    the canonical name of this instance.

### setup

    public void setup(java.util.Map attributes)

  Description copied from interface: `IKeyPairGenerator`
  [Re]-initialises this instance for use with a given set of attributes.

  Specified by:
    `setup` in interface `IKeyPairGenerator`
  Parameters:
    `attributes` - a map of name/value pairs to use for setting up the instance.

### generate

    public java.security.KeyPair generate()

  Description copied from interface: `IKeyPairGenerator`
  Generates a new keypair based on the attributes used to configure the instance.

  Specified by:
    `generate` in interface `IKeyPairGenerator`
  Returns:
    a new keypair.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.