javax.crypto.spec
Class DHGenParameterSpec

java.lang.Object
  |
  +--javax.crypto.spec.DHGenParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class DHGenParameterSpec
extends Object
implements AlgorithmParameterSpec

Diffie-Hellman generation parameter specification.


Attention:  This is not a SUN implementation!

This class has been developed by IAIK according to the documentation publically available.
For SUNīs documentation of this class see http://java.sun.com/security/JCE1.2/earlyaccess/javax.crypto.spec.DHGenParamaterSpec.html


This class represents a Diffie-Hellman generation parameter specification to be used by a central authority for generating Diffie-Hellman parameters, which subsequently are sent to the entities involved in the key agreement procedure.

The Diffie Hellman algorithm has been the first public-key algorithm. It only can be used for key-agreement, but not for data encrypting and decrypting.

PKCS#3 describes a method for implementing the Diffie Hellman key agreement where two (or more) entities use general Diffie Hellman parameters (an odd prime p, an integer base g satisfying 0 < g < p, and optionally an integer l prescribing the length of the private value), generated from some central authority (which may an entity itself), for creating a shared secret only known by them.

This class specifies the DH generation parameters length of the prime modulus and length of the exponent (private value).

Version:
File Revision 13
See Also:
AlgorithmParameterSpec, DHParameterSpec

Constructor Summary
DHGenParameterSpec(int primeSize, int exponentSize)
          Creates a Diffie-Hellman generation parameter specification, based on given prime size and exponent size.
 
Method Summary
 int getExponentSize()
          Returns the random exponent size in bits.
 int getPrimeSize()
          Returns the prime modulus size in bits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DHGenParameterSpec

public DHGenParameterSpec(int primeSize,
                          int exponentSize)
Creates a Diffie-Hellman generation parameter specification, based on given prime size and exponent size.
Parameters:
primeSize - the prime size in bits
exponentSize - the exponent size in bits
Method Detail

getPrimeSize

public int getPrimeSize()
Returns the prime modulus size in bits.
Returns:
the prime modulus size in bits

getExponentSize

public int getExponentSize()
Returns the random exponent size in bits.
Returns:
the random exponent size in bits

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK