gnu.crypto.key.dss

Class DSSKeyPairGenerator

public class DSSKeyPairGenerator extends Object implements IKeyPairGenerator

A key-pair generator for asymetric keys to use in conjunction with the DSS (Digital Signature Standard).

References:
Digital Signature Standard (DSS), Federal Information Processing Standards Publication 186. National Institute of Standards and Technology.

Version: $Revision: 1.2 $

Field Summary
static StringDSS_PARAMETERS
Property name of an optional DSAParameterSpec instance to use for this generator's p, q, and g values.
static DSAParameterSpecKEY_PARAMS_1024
static DSAParameterSpecKEY_PARAMS_512
static DSAParameterSpecKEY_PARAMS_768
static StringMODULUS_LENGTH
Property name of the length (Integer) of the modulus (p) of a DSS key.
static StringSOURCE_OF_RANDOMNESS
Property name of an optional SecureRandom instance to use.
static StringUSE_DEFAULTS
Property name of the Boolean indicating wether or not to use defaults.
Method Summary
KeyPairgenerate()
Stringname()
voidsetup(Map attributes)

Configures this instance.

Field Detail

DSS_PARAMETERS

public static final String DSS_PARAMETERS
Property name of an optional DSAParameterSpec instance to use for this generator's p, q, and g values. The default is to generate these values or use pre-computed ones, depending on the value of the USE_DEFAULTS attribute.

KEY_PARAMS_1024

public static final DSAParameterSpec KEY_PARAMS_1024

KEY_PARAMS_512

public static final DSAParameterSpec KEY_PARAMS_512

KEY_PARAMS_768

public static final DSAParameterSpec KEY_PARAMS_768

MODULUS_LENGTH

public static final String MODULUS_LENGTH
Property name of the length (Integer) of the modulus (p) of a DSS key.

SOURCE_OF_RANDOMNESS

public static final String SOURCE_OF_RANDOMNESS
Property name of an optional SecureRandom instance to use. The default is to use a classloader singleton from PRNG.

USE_DEFAULTS

public static final String USE_DEFAULTS
Property name of the Boolean indicating wether or not to use defaults.

Method Detail

generate

public KeyPair generate()

name

public String name()

setup

public void setup(Map attributes)

Configures this instance.

Parameters: attributes the map of name/value pairs to use.

Throws: IllegalArgumentException if the designated MODULUS_LENGTH value is not greater than 512, less than 1024 and not of the form 512 + 64j.

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