All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.security.rsa.RSAKeyGen

java.lang.Object
   |
   +----cryptix.security.rsa.RSAKeyGen

public class RSAKeyGen
extends Object
This class is an RSA key pair generator.

Copyright (c) 1995, 1996 Systemics Ltd (http://www.systemics.com/) All rights reserved.


Variable Index

 o rand

Constructor Index

 o RSAKeyGen(RandomStream)

Method Index

 o createKey(int)
This function creates a Secret Key.
 o createKey(int, RSAKeyGenObserver)
An observer class is used to monitor progress.
 o createKey(RandomStream, int)
This function creates a Secret Key.
 o createKey(RandomStream, int, RSAKeyGenObserver)
An observer class is used to monitor progress.
 o deriveKeys(BigInteger, BigInteger, BigInteger)
An observer class is used to monitor progress.
 o randomPrime(int, RSAKeyGenObserver)
An observer class is used to monitor progress.

Variables

 o rand
 protected RandomStream rand

Constructors

 o RSAKeyGen
 public RSAKeyGen(RandomStream rand0)
Parameters:
rand0 - the source of random numbers for the prime number generation.

Methods

 o randomPrime
 public BigInteger randomPrime(int bitlen,
                               RSAKeyGenObserver obsrv)
An observer class is used to monitor progress.

 o createKey
 public static final SecretKey createKey(RandomStream rand,
                                         int bitlen)
This function creates a Secret Key.

N.B. this can take a LONG time.

Parameters:
rand - the source of random data for the prime number generation.
bitlen - the bit length of the final n
Returns:
a random RSA SecretKey.
 o createKey
 public static final SecretKey createKey(RandomStream rand,
                                         int bitlen,
                                         RSAKeyGenObserver obsrv)
An observer class is used to monitor progress.

Parameters:
rand - the source of random data for the prime number generation.
bitlen - The bit length of the final n
obsrv - The callback interface.
Returns:
a random RSA SecretKey.
 o createKey
 public SecretKey createKey(int bitlen)
This function creates a Secret Key.

N.B. this can take a LONG time.

Parameters:
bitlen - the bit length of the final n
Returns:
a random RSA SecretKey.
 o createKey
 public SecretKey createKey(int bitlen,
                            RSAKeyGenObserver obsrv)
An observer class is used to monitor progress.

Parameters:
bitlen - The bit length of the final n
obsrv - The callback interface.
Returns:
a random RSA SecretKey.
 o deriveKeys
 protected final SecretKey deriveKeys(BigInteger p,
                                      BigInteger q,
                                      BigInteger e)
An observer class is used to monitor progress.

Parameters:
p - the largest factor of n
q - the other factor of n
e - the initial public exponent (must be odd).
Returns:
a random RSA SecretKey.

All Packages  Class Hierarchy  This Package  Previous  Next  Index