iaik.security.dh
Class ESDHParameterSpec

java.lang.Object
  |
  +--javax.crypto.spec.DHParameterSpec
        |
        +--iaik.security.dh.ESDHParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class ESDHParameterSpec
extends DHParameterSpec

Ephemeral-Static Diffie Hellman parameter specification.


This class represents a specification for the prime modulus p, base generator g, prime factor q, the subgroup factor j (if available) and the seed seed and pgenCounter pgenCounter (if available), as used by the Ephemral-Static Diffie-Hellman # key exchange algorithm according to RFC 2631.

Version:
File Revision 14
See Also:
AlgorithmParameterSpec, ESDHParameters

Fields inherited from class javax.crypto.spec.DHParameterSpec
g, p
 
Constructor Summary
ESDHParameterSpec(BigInteger p, BigInteger g, BigInteger q)
          Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g and prime factor q.
ESDHParameterSpec(BigInteger p, BigInteger g, BigInteger q, BigInteger j)
          Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q and soubgroup factor j.
ESDHParameterSpec(BigInteger p, BigInteger g, BigInteger q, BigInteger j, byte[] seed, int pgenCounter)
          Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q, soubgroup factor j, the seed and counter used in the system parameter generation process.
ESDHParameterSpec(BigInteger p, BigInteger g, BigInteger q, byte[] seed, int pgenCounter)
          Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q, the seed and counter used in the system parameter generation process.
 
Method Summary
 boolean equals(Object obj)
          Compares two ESDHParameterSpec objects.
 BigInteger getJ()
          Returns the subgroup factor j.
 int 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.
 BigInteger getQ()
          Returns the prime factor q.
 byte[] getSeed()
          Returns the seed used in the system parameter generation process.
 int hashCode()
          Returns a hash code for this object.
 String toString()
          Returns a string representation of this Object.
 
Methods inherited from class javax.crypto.spec.DHParameterSpec
getG, getP
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ESDHParameterSpec

public ESDHParameterSpec(BigInteger p,
                         BigInteger g,
                         BigInteger q)
Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g and prime factor q.
Parameters:
p - the prime modulus
g - the base generator
q - the prime factor

ESDHParameterSpec

public ESDHParameterSpec(BigInteger p,
                         BigInteger g,
                         BigInteger q,
                         BigInteger j)
Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q and soubgroup factor j.
Parameters:
p - the prime modulus
g - the base generator
q - the prime factor
j - the subgroup factor

ESDHParameterSpec

public ESDHParameterSpec(BigInteger p,
                         BigInteger g,
                         BigInteger q,
                         byte[] seed,
                         int pgenCounter)
Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q, the seed and counter used in the system parameter generation process.
Parameters:
p - the prime modulus
g - the base generator
q - the prime factor
seed - the the seed used in the system parameter generation process
pgenCounter - the counter used in the system parameter generation process

ESDHParameterSpec

public ESDHParameterSpec(BigInteger p,
                         BigInteger g,
                         BigInteger q,
                         BigInteger j,
                         byte[] seed,
                         int pgenCounter)
Creates an Ephemeral Static Diffie-Hellman parameter specification, based on given prime modulus p, base generator g, prime factor q, soubgroup factor j, the seed and counter used in the system parameter generation process.
Parameters:
p - the prime modulus
g - the base generator
q - the prime factor
j - the subgroup factor
seed - the the seed used in the system parameter generation process
pgenCounter - the counter used in the system parameter generation process
Method Detail

getQ

public BigInteger getQ()
Returns the prime factor q.
Returns:
the prime factor q

getJ

public BigInteger getJ()
Returns the subgroup factor j.
Returns:
the subgroup factor j

getSeed

public byte[] getSeed()
Returns the seed used in the system parameter generation process.
Returns:
the seed used in the system parameter generation process

getPGenCounter

public int getPGenCounter()
Returns the counter used in the system parameter generation process.
Returns:
the counter used in the system parameter generation process

getL

public int getL()
This method overrides the method of the super class and always returns 0 since we don't use parameter L in ESDH.
Overrides:
getL in class DHParameterSpec
Returns:
0 is returned

equals

public boolean equals(Object obj)
Compares two ESDHParameterSpec objects.
Overrides:
equals in class Object
Parameters:
obj - the other ESDHParameterSpec
Returns:
true, if the two ESDHParameterSpecs are equal, false otherwise

hashCode

public int hashCode()
Returns a hash code for this object.
Overrides:
hashCode in class Object
Returns:
the hash code

toString

public String toString()
Returns a string representation of this Object.
Overrides:
toString in class DHParameterSpec
Returns:
a string representation

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