Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_Ciphers::ElGamalCipherText Class Reference

Serializable encapsulation of an ElGamal ciphertext. More...

#include <ElGamal.h>

Inheritance diagram for CODEX_Ciphers::ElGamalCipherText:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Ciphers::ElGamalCipherText:

Collaboration graph
[legend]
List of all members.

Public Methods

 ElGamalCipherText ()
 Default constructor, for creating an object to be unmarshalled.

 ElGamalCipherText (BIGNUM *c1, BIGNUM *c2)
 Constructor taking ciphertext as two BIGNUMs.

 ElGamalCipherText (const CODEX_ASN1::BigNumber &c1, const CODEX_ASN1::BigNumber &c2)
 Constructor taking ciphertext as two BigNumbers.

 ElGamalCipherText (const ElGamalCipherText &aCT)
 Copy constructor.

virtual ~ElGamalCipherText ()
 Destructor.

void operator= (const ElGamalCipherText &aCT)
 Assignment operator.

bool operator< (const ElGamalCipherText &aCT) const
 Less-than operator.

bool operator== (const ElGamalCipherText &aCT) const
 Equality operator.

bool operator!= (const ElGamalCipherText &aCT) const
 Inequality operator.

const CODEX_ASN1::BigNumberc1 () const
 
Returns:
first part of the ciphertext -- g^k mod p


const CODEX_ASN1::BigNumberc2 () const
 
Returns:
second part of the ciphertext -- m y^k mod p


ElGamalCipherText * blind (const ElGamalCipherText &aOther, const CODEX_ASN1::BigNumber &modulus) const
 Blind a ciphertext.

int marshal (unsigned char **pp) const
 Serialize the object.

void * unmarshal (void *bogus, unsigned char **pp, long length)
 Unserialize the object.


Detailed Description

Serializable encapsulation of an ElGamal ciphertext.

The notation (c1,c2) follows that of ElGamal's original paper.

Definition at line 34 of file ElGamal.h.


Member Function Documentation

ElGamalCipherText * ElGamalCipherText::blind const ElGamalCipherText &    aOther,
const CODEX_ASN1::BigNumber   modulus
const
 

Blind a ciphertext.

Parameters:
aOther  Another ciphertext
modulus  The modulus for the group in which ciphertexts live
Returns:
A pointer to a new ciphertext which is the product of the current ciphertext and the one passed in.

Definition at line 90 of file ElGamalCipherText.cc.

References ElGamalCipherText(), m_c1, m_c2, and CODEX_ASN1::BigNumber::value().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 16:33:03 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18