Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File 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 Member Functions

 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 BIGNUM%s.
 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 BigNumber%s.
 ElGamalSchnorrCipherText (const ElGamalSchnorrCipherText &aCT)
 Copy constructor.
virtual ~ElGamalSchnorrCipherText ()
 Destructor.
void operator= (const ElGamalSchnorrCipherText &aCT)
 Assignment operator.
const CODEX_ASN1::BigNumberh () const
 Hash value from Schnorr signature.
const CODEX_ASN1::BigNumberz () const
 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.
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
 First part of the ciphertext -- g^k mod p.
const CODEX_ASN1::BigNumberc2 () const
 Second part of the ciphertext -- m y^k mod p.
ElGamalCipherTextblind (const ElGamalCipherText &aOther, const CODEX_ASN1::BigNumber &modulus) const
 Blind a ciphertext.
bool initialized () const

Protected Attributes

bool m_initialized
 Has this object been initialized yet, or is it still blank?

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 97 of file ElGamal.h.


Member Function Documentation

ElGamalCipherText * ElGamalCipherText::blind const ElGamalCipherText aOther,
const CODEX_ASN1::BigNumber modulus
const [inherited]
 

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 CODEX_Ciphers::ElGamalCipherText::ElGamalCipherText(), and CODEX_ASN1::BigNumber::value().

bool CODEX_ASN1::Base::initialized  )  const [inline, inherited]
 

Returns:
Has this object been initialized?

Definition at line 175 of file Base.h.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_APSS::SecretManagement::addComputeMsg(), CODEX_APSS::SecretManagement::addEstablishMsg(), CODEX_APSS::SecretManagement::addEstablishResponse(), CODEX_APSS::SecretManagement::addInitMsg(), CODEX_APSS::SecretManagement::addSharing(), CODEX_APSS::SecretManagement::addSubsharing(), CODEX_VSS::Combinatoric< NumT, ThreshT >::apply(), CODEX_Server::ServerState::caKey(), CODEX_KeyService::ClientCreateCallback::ClientCreateCallback(), CODEX_VSS::Combinatoric< NumT, ThreshT >::count(), CODEX_Server::QuorumBuilderAct::handler(), CODEX_APSS::MessageVerifier::handler(), CODEX_KeyService::DelegateResponseVerifier::handler(), CODEX_KeyService::DelegateRequestDistributor::handler(), CODEX_KeyService::ClientMessageVerifier::handler(), CODEX_KeyService::ClientMessageSigner::handler(), CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_KeyService::KeyInfo::marshal(), CODEX_VSS::LabeledShare< ShareType, OneWay >::marshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal(), CODEX_VSS::ModExpFunctionalArgs::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_VSS::ModExpFunctional::operator()(), CODEX_KeyService::ClientReadCallback::operator()(), CODEX_KeyService::ClientCreateCallback::operator()(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator+=(), CODEX_Server::ServerState::readElGamalShares(), CODEX_VSS::Combinatoric< NumT, ThreshT >::recover(), CODEX_APSS::SecretManagement::sendFinished(), CODEX_Server::ServerState::serviceKey(), CODEX_Server::ServerState::setEGShareCallback(), and CODEX_Server::ServerState::setRSAShareCallback().

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::BigNumber::marshal(), CODEX_ASN1::BigNumber::value(), and z().


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