part3
Class EGKeyPair

java.lang.Object
  extended bypart3.EGKeyPair

public class EGKeyPair
extends java.lang.Object

A class to generate an ElGamal key-pair.


Constructor Summary
EGKeyPair(java.math.BigInteger p, java.math.BigInteger g, java.security.SecureRandom rnd)
          A constructor that generates an ElGamal key-pair from the prime p and a generator g for Zp*.
 
Method Summary
 EGPrivateKey getPrivate()
          A method to return the private key of an ElGamal key-pair.
 EGPublicKey getPublic()
          A method to return the public key of an ElGamal key-pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EGKeyPair

public EGKeyPair(java.math.BigInteger p,
                 java.math.BigInteger g,
                 java.security.SecureRandom rnd)
          throws java.lang.Exception
A constructor that generates an ElGamal key-pair from the prime p and a generator g for Zp*.

Throws:
Exception.
java.lang.Exception
Method Detail

getPublic

public EGPublicKey getPublic()
                      throws java.lang.Exception
A method to return the public key of an ElGamal key-pair.

Throws:
Exception.
java.lang.Exception

getPrivate

public EGPrivateKey getPrivate()
                        throws java.lang.Exception
A method to return the private key of an ElGamal key-pair.

Throws:
Exception.
java.lang.Exception