Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Ciphers::ElGamalKeyPairGenerator Class Reference

Helper object to create an ElGamal public/private key pair. More...

#include <ElGamal.h>

List of all members.

Public Member Functions

 ElGamalKeyPairGenerator (long numBits)
 Constructor taking the number of bits for the prime modulus.
void operator() (ElGamalPublicKey *&pubKey, ElGamalPrivateKey *&privKey, BIGNUM *p=0, BIGNUM *g=0)


Detailed Description

Helper object to create an ElGamal public/private key pair.

Definition at line 454 of file ElGamal.h.


Member Function Documentation

void ElGamalKeyPairGenerator::operator() ElGamalPublicKey *&  pubKey,
ElGamalPrivateKey *&  privKey,
BIGNUM *  p = 0,
BIGNUM *  g = 0
 

Parameters:
pubKey Public key, filled by routine
privKey Private key, filled by routine
p Prime modulus of the form 2q+1 for a prime q. If 0 a new prime is selected and placed in p.
g Generator of the multiplicative subgroup of Z_p. If 0 a new generator is selected and placed in g.
Exceptions:
BignumNullException Some memory allocation failed.
BignumGeneratePrimeException There was an error generating a new prime modulus.
BignumSubException There was an error during subtraction.
BignumContextException Memory allocation failed for a BN_CTX.
BignumRshiftException There was an error while bit-shifting a BIGNUM.
BignumRandRangeException There was an error generating the random exponent.
BignumModMulException There was an error during modular multiplication.
BignumModExpException There was an error during modular exponentiation.

Definition at line 27 of file ElGamalKeyPairGenerator.cc.


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:41:51 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1