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

CODEX_Ciphers::ElGamalSchnorrCipherText Class Reference

Serializable encapsulation of an ElGamal ciphertext with a Schnorr signature to prove plaintext knowledge. More...

#include <ElGamal.h>

Inheritance diagram for CODEX_Ciphers::ElGamalSchnorrCipherText:

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

Collaboration graph
[legend]
List of all members.

Public Methods

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

 ElGamalSchnorrCipherText (BIGNUM *c1, BIGNUM *c2, BIGNUM *h, BIGNUM *z)
 Constructor taking signed ciphertext as four BIGNUMs.

 ElGamalSchnorrCipherText (const CODEX_ASN1::BigNumber &c1, const CODEX_ASN1::BigNumber &c2, const CODEX_ASN1::BigNumber &h, const CODEX_ASN1::BigNumber &z)
 Constructor taking signed ciphertext as four BigNumbers.

 ElGamalSchnorrCipherText (const ElGamalSchnorrCipherText &aCT)
 Copy constructor.

virtual ~ElGamalSchnorrCipherText ()
 Destructor.

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

const CODEX_ASN1::BigNumberh () const
 
Returns:
hash value from Schnorr signature


const CODEX_ASN1::BigNumberz () const
 
Returns:
Schnorr exponent


bool verify (const CODEX_ASN1::BigNumber &g, const CODEX_ASN1::BigNumber &p, const CODEX_ASN1::Base &id, const HashFunction &hashFunc) const
 Tests the validity of a ElGamalSchnorrCipherText.

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 with a Schnorr signature to prove plaintext knowledge.

By including the identity of the encrypting party in the signature, the ciphertext can be verified to have come from a particular principal.

Definition at line 94 of file ElGamal.h.


Member Function Documentation

bool ElGamalSchnorrCipherText::verify const CODEX_ASN1::BigNumber   g,
const CODEX_ASN1::BigNumber   p,
const CODEX_ASN1::Base   id,
const HashFunction   hashFunc
const
 

Tests the validity of a ElGamalSchnorrCipherText.

The ciphertext is used as part of the public key for the Schnorr signature.

Parameters:
g  The generator from the public key used to encipher the plaintext
p  The modulus of the public key
id  A serializable object identifying the participant claiming to have generated the ciphertext
hashFunc  A secure hash function matching that used to generate the Schnorr signature

Definition at line 71 of file ElGamalSchnorrCipherText.cc.

References CODEX_Ciphers::ElGamalCipherText::c1(), CODEX_Ciphers::ElGamalCipherText::c2(), h(), CODEX_ASN1::Base::marshal(), CODEX_ASN1::BigNumber::marshal(), CODEX_ASN1::BigNumber::value(), and z().


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