public class ESDHPrivateKeySpec
extends javax.crypto.spec.DHPrivateKeySpec
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).
KeySpec,
DHPublicKeySpec| Constructor and Description |
|---|
ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q)
Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p,
base generator g and prime factor q.
|
ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
java.math.BigInteger j)
Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p,
base generator g, prime factor q and subgroup factor j.
|
ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
java.math.BigInteger j,
byte[] seed,
int pgenCounter)
Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p,
base generator g, prime factor q, subgroup factor j and the seed and counter used in the system
parameter generation process.
|
ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
byte[] seed,
int pgenCounter)
Creates a Diffie-Hellman private key specification based on given private value x, prime modulus p,
base generator g, prime factor q and the seed and counter used in the system
parameter generation process.
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger |
getJ()
Returns the subgroup factor j.
|
long |
getL()
This method overrides the method of the super class and always
returns 0 since we don't use parameter L in ESDH.
|
int |
getPGenCounter()
Returns the counter used in the system parameter generation process.
|
java.math.BigInteger |
getQ()
Returns the prime factor q.
|
byte[] |
getSeed()
Returns the seed used in the system parameter generation process.
|
public ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q)
x - the public valuep - the prime modulusg - the base generatorq - the prime factorpublic ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
java.math.BigInteger j)
x - the public valuep - the prime modulusg - the base generatorq - the prime factorj - the subgroup factorpublic ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
byte[] seed,
int pgenCounter)
x - the public valuep - the prime modulusg - the base generatorq - the prime factorseed - the the seed used in the system parameter generation processpgenCounter - the counter used in the system parameter generation processpublic ESDHPrivateKeySpec(java.math.BigInteger x,
java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger q,
java.math.BigInteger j,
byte[] seed,
int pgenCounter)
x - the public valuep - the prime modulusg - the base generatorq - the prime factorj - the subgroup factorseed - the the seed used in the system parameter generation processpgenCounter - the counter used in the system parameter generation processpublic long getL()
public java.math.BigInteger getQ()
public java.math.BigInteger getJ()
public byte[] getSeed()
public int getPGenCounter()