javax.crypto.spec
Class DHPrivateKeySpec

java.lang.Object
  |
  +--javax.crypto.spec.DHPrivateKeySpec
All Implemented Interfaces:
KeySpec
Direct Known Subclasses:
ESDHPrivateKeySpec

public class DHPrivateKeySpec
extends Object
implements KeySpec

Diffie Hellman private key 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


This class represents a Diffie Hellman private key specification. A key specification is a transparent representation of the key material constituting the key. A Diffie Hellman private key specification represents the private value x, and the Diffie Hellman parameters p (prime modulus), g (base generator), and l (length of the private value x).

Version:
File Revision 16
See Also:
KeySpec, DHPublicKeySpec

Field Summary
protected  BigInteger g
           
protected  BigInteger p
           
protected  BigInteger x
           
 
Constructor Summary
DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)
          Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p and base generator g.
 
Method Summary
 BigInteger getG()
          Returns the base generator g.
 BigInteger getP()
          Returns the prime modulus p.
 BigInteger getX()
          Returns the private value x.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected BigInteger x

p

protected BigInteger p

g

protected BigInteger g
Constructor Detail

DHPrivateKeySpec

public DHPrivateKeySpec(BigInteger x,
                        BigInteger p,
                        BigInteger g)
Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p and base generator g.
Parameters:
x - the private value
p - the prime modulus
g - the base generator
Method Detail

getX

public BigInteger getX()
Returns the private value x.
Returns:
the private value x

getP

public BigInteger getP()
Returns the prime modulus p.
Returns:
the prime modulus p

getG

public BigInteger getG()
Returns the base generator g.
Returns:
the base generator g

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