Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.crypto.key.dh
Class RFC2631  view RFC2631 download RFC2631.java

java.lang.Object
  extended bygnu.javax.crypto.key.dh.RFC2631

public class RFC2631
extends java.lang.Object

An implementation of the Diffie-Hellman parameter generation as defined in RFC-2631.

Reference:

  1. Diffie-Hellman Key Agreement Method
    Eric Rescorla.


Field Summary
static int DH_PARAMS_COUNTER
           
static int DH_PARAMS_G
           
static int DH_PARAMS_J
           
static int DH_PARAMS_P
           
static int DH_PARAMS_Q
           
static int DH_PARAMS_SEED
           
private  int L
          Length of public modulus p.
private  int m
          Length of private modulus and of q.
private  gnu.java.security.util.PRNG prng
          Our default source of randomness.
private  java.security.SecureRandom rnd
          The optional java.security.SecureRandom instance to use.
private  gnu.java.security.hash.Sha160 sha
          The SHA instance to use.
private static java.math.BigInteger TWO
           
 
Constructor Summary
RFC2631(int m, int L, java.security.SecureRandom rnd)
           
 
Method Summary
 java.math.BigInteger[] generateParameters()
           
private  gnu.java.security.util.PRNG getDefaultPRNG()
           
private  void nextRandomBytes(byte[] buffer)
          Fills the designated byte array with random data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DH_PARAMS_SEED

public static final int DH_PARAMS_SEED
See Also:
Constant Field Values

DH_PARAMS_COUNTER

public static final int DH_PARAMS_COUNTER
See Also:
Constant Field Values

DH_PARAMS_Q

public static final int DH_PARAMS_Q
See Also:
Constant Field Values

DH_PARAMS_P

public static final int DH_PARAMS_P
See Also:
Constant Field Values

DH_PARAMS_J

public static final int DH_PARAMS_J
See Also:
Constant Field Values

DH_PARAMS_G

public static final int DH_PARAMS_G
See Also:
Constant Field Values

TWO

private static final java.math.BigInteger TWO

sha

private gnu.java.security.hash.Sha160 sha
The SHA instance to use.


m

private int m
Length of private modulus and of q.


L

private int L
Length of public modulus p.


rnd

private java.security.SecureRandom rnd
The optional java.security.SecureRandom instance to use.


prng

private gnu.java.security.util.PRNG prng
Our default source of randomness.

Constructor Detail

RFC2631

public RFC2631(int m,
               int L,
               java.security.SecureRandom rnd)
Method Detail

generateParameters

public java.math.BigInteger[] generateParameters()

nextRandomBytes

private void nextRandomBytes(byte[] buffer)

Fills the designated byte array with random data.


getDefaultPRNG

private gnu.java.security.util.PRNG getDefaultPRNG()