Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ElGamalEncryptor Class Reference

ElGamal Encryptor. More...

#include <elgamal.h>

Inheritance diagram for ElGamalEncryptor:

PK_WithPrecomputation PK_Precomputation ElGamalDecryptor List of all members.

Public Methods

 ElGamalEncryptor (const Integer &p,const Integer &g,const Integer &y)
 ElGamalEncryptor (BufferedTransformation &bt)
void DEREncode (BufferedTransformation &bt)const
void Precompute (unsigned int precomputationStorage=16)
void LoadPrecomputation (BufferedTransformation &storedPrecomputation)
 retrieve previously saved precomputation. More...

void SavePrecomputation (BufferedTransformation &storedPrecomputation)const
 save precomputation for later use. More...

void Encrypt (RandomNumberGenerator &rng,const byte *plainText,unsigned int plainTextLength,byte *cipherText)
unsigned int MaxPlainTextLength ()const
unsigned int CipherTextLength ()const
void RawEncrypt (const Integer &k,const Integer &m,Integer &a,Integer &b)const
const IntegerGetModulus ()const
const IntegerGetGenerator ()const
const IntegerGetPublicResidue ()const
const ModExpPrecomputationGetGPC ()const
const ModExpPrecomputationGetYPC ()const

Protected Methods

 ElGamalEncryptor ()
unsigned int ExponentBitLength ()const

Protected Attributes

Integer m_p
Integer m_g
Integer m_y
ModExpPrecomputation m_gpc
ModExpPrecomputation m_ypc

Detailed Description

ElGamal Encryptor.

Definition at line 9 of file elgamal.h.


Constructor & Destructor Documentation

ElGamalEncryptor::ElGamalEncryptor ( const Integer & p,
const Integer & g,
const Integer & y )
 

Definition at line 10 of file elgamal.cpp.

ElGamalEncryptor::ElGamalEncryptor ( BufferedTransformation & bt )
 

Definition at line 15 of file elgamal.cpp.

ElGamalEncryptor::ElGamalEncryptor ( ) [inline, protected]
 

Definition at line 36 of file elgamal.h.


Member Function Documentation

unsigned int ElGamalEncryptor::CipherTextLength ( ) const [inline]
 

Definition at line 24 of file elgamal.h.

void ElGamalEncryptor::DEREncode ( BufferedTransformation & bt ) const
 

Definition at line 27 of file elgamal.cpp.

void ElGamalEncryptor::Encrypt ( RandomNumberGenerator & rng,
const byte * plainText,
unsigned int plainTextLength,
byte * cipherText )
 

Definition at line 54 of file elgamal.cpp.

unsigned int ElGamalEncryptor::ExponentBitLength ( ) const [protected]
 

Definition at line 78 of file elgamal.cpp.

const ModExpPrecomputation & ElGamalEncryptor::GetGPC ( ) const [inline]
 

Definition at line 32 of file elgamal.h.

const Integer & ElGamalEncryptor::GetGenerator ( ) const [inline]
 

Definition at line 29 of file elgamal.h.

const Integer & ElGamalEncryptor::GetModulus ( ) const [inline]
 

Definition at line 28 of file elgamal.h.

const Integer & ElGamalEncryptor::GetPublicResidue ( ) const [inline]
 

Definition at line 30 of file elgamal.h.

const ModExpPrecomputation & ElGamalEncryptor::GetYPC ( ) const [inline]
 

Definition at line 33 of file elgamal.h.

void ElGamalEncryptor::LoadPrecomputation ( BufferedTransformation & bt ) [virtual]
 

retrieve previously saved precomputation.

Reimplemented from PK_Precomputation.

Definition at line 42 of file elgamal.cpp.

unsigned int ElGamalEncryptor::MaxPlainTextLength ( ) const [inline]
 

Definition at line 23 of file elgamal.h.

void ElGamalEncryptor::Precompute ( unsigned int precomputationStorage = 16 ) [virtual]
 

The exact semantics of Precompute() is varies, but typically it means calculate a table of n objects that can be used later to speed up computation.

Reimplemented from PK_Precomputation.

Definition at line 36 of file elgamal.cpp.

void ElGamalEncryptor::RawEncrypt ( const Integer & k,
const Integer & m,
Integer & a,
Integer & b ) const
 

Definition at line 72 of file elgamal.cpp.

void ElGamalEncryptor::SavePrecomputation ( BufferedTransformation & bt ) const [virtual]
 

save precomputation for later use.

Reimplemented from PK_Precomputation.

Definition at line 48 of file elgamal.cpp.


Member Data Documentation

Integer ElGamalEncryptor::m_g [protected]
 

Definition at line 39 of file elgamal.h.

ModExpPrecomputation ElGamalEncryptor::m_gpc [protected]
 

Definition at line 40 of file elgamal.h.

Integer ElGamalEncryptor::m_p [protected]
 

Definition at line 39 of file elgamal.h.

Integer ElGamalEncryptor::m_y [protected]
 

Definition at line 39 of file elgamal.h.

ModExpPrecomputation ElGamalEncryptor::m_ypc [protected]
 

Definition at line 40 of file elgamal.h.


The documentation for this class was generated from the following files:
Generated at Mon Jan 15 01:16:48 2001 for Crypto++ by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000