|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javax.crypto.spec.DHParameterSpec
Diffie Hellman 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/spec/apidoc/index.html
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 represents a specification for the prime modulus (p), base ganerator (g) and exponent length (l) parameters, as used by the Diffie-Hellman key exchange algorithm according to PKCS#3 (Diffie-Hellman Key Agreement Standard).
AlgorithmParameterSpec,
DHGenParameterSpec| Constructor Summary | |
DHParameterSpec(java.math.BigInteger p,
java.math.BigInteger g)
Creates a Diffie-Hellman parameter specification, based on given prime modulus p and base generator g. |
|
DHParameterSpec(java.math.BigInteger p,
java.math.BigInteger g,
int l)
Creates a Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, and random exponent size l. |
|
| Method Summary | |
java.math.BigInteger |
getG()
Returns the base generator g. |
int |
getL()
Returns the random exponent size l, in bits. |
java.math.BigInteger |
getP()
Returns the prime modulus p. |
java.lang.String |
toString()
Returns a string representation of this Object. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public DHParameterSpec(java.math.BigInteger p,
java.math.BigInteger g)
p - the prime modulusg - the base generator
public DHParameterSpec(java.math.BigInteger p,
java.math.BigInteger g,
int l)
p - the prime modulusg - the base generatorl - the random exponent size in bits| Method Detail |
public java.math.BigInteger getP()
public java.math.BigInteger getG()
public int getL()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||