gnu.crypto.key.dh

Class GnuDHKeyPairGenerator

Implemented Interfaces:
IKeyPairGenerator

public class GnuDHKeyPairGenerator
extends Object
implements IKeyPairGenerator

An implementation of a Diffie-Hellman keypair generator.

Reference:

  1. Diffie-Hellman Key Agreement Method
    Eric Rescorla.
Version:
$Revision: 1.2 $

Field Summary

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

Method Summary

KeyPair
generate()
String
name()
void
setup(Map attributes)

Field Details

DH_PARAMETERS

public static final String DH_PARAMETERS
Property name of an optional DHGenParameterSpec instance to use for this generator.

EXPONENT_SIZE

public static final String EXPONENT_SIZE
Property name of the size in bits (Integer) of the private exponent (x).

PRIME_SIZE

public static final String PRIME_SIZE
Property name of the size in bits (Integer) of the public prime (p).

SOURCE_OF_RANDOMNESS

public static final String SOURCE_OF_RANDOMNESS

Method Details

generate

public KeyPair generate()
Specified by:
generate in interface IKeyPairGenerator

name

public String name()
Specified by:
name in interface IKeyPairGenerator

setup

public void setup(Map attributes)
Specified by:
setup in interface IKeyPairGenerator

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.