|
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 |
java.lang.Object gnu.crypto.key.dh.GnuDHKey
A base asbtract class for both public and private Diffie-Hellman keys. It
encapsulates the two DH numbers: p
, and g
.
According to the JDK, cryptographic Keys all have a format.
The format used in this implementation is called Raw, and basically
consists of the raw byte sequences of algorithm parameters. The exact order
of the byte sequences and the implementation details are given in each of
the relevant getEncoded()
methods of each of the private and
public keys.
Reference:
Field Summary | |
protected java.math.BigInteger |
g
The generator g. |
protected java.math.BigInteger |
p
The public prime p. |
protected java.math.BigInteger |
q
The public prime q. |
Fields inherited from interface java.security.Key |
serialVersionUID |
Constructor Summary | |
protected |
GnuDHKey(java.math.BigInteger q,
java.math.BigInteger p,
java.math.BigInteger g)
Trivial protected constructor. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if the designated object is an instance of
DHKey and has the same Diffie-Hellman parameter values as this
one. |
java.lang.String |
getAlgorithm()
|
java.lang.String |
getFormat()
|
javax.crypto.spec.DHParameterSpec |
getParams()
|
java.math.BigInteger |
getQ()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded |
Field Detail |
protected java.math.BigInteger q
protected java.math.BigInteger p
protected java.math.BigInteger g
Constructor Detail |
protected GnuDHKey(java.math.BigInteger q, java.math.BigInteger p, java.math.BigInteger g)
Trivial protected constructor.
q
- a prime divisor of p-1.p
- the public prime.g
- the generator of the group.Method Detail |
public javax.crypto.spec.DHParameterSpec getParams()
getParams
in interface javax.crypto.interfaces.DHKey
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public java.math.BigInteger getQ()
public boolean equals(java.lang.Object obj)
Returns true
if the designated object is an instance of
DHKey
and has the same Diffie-Hellman parameter values as this
one.
obj
- the other non-null DH key to compare to.
true
if the designated object is of the same type and
value as this one.
|
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 |