#include <ElGamal.h>
Inheritance diagram for CODEX_Ciphers::ElGamalPrivateKey:


Public Member Functions | |
| ElGamalPrivateKey () | |
| Default constructor, for creating an object to be unmarshalled. | |
| ElGamalPrivateKey (BIGNUM *x) | |
| Create an ElGamalPrivateKey from a BIGNUM. | |
| ElGamalPrivateKey (const CODEX_ASN1::BigNumber &x) | |
| Create an ElGamalPrivateKey from a BigNumber. | |
| ElGamalPrivateKey (const ElGamalPrivateKey &aKey) | |
| Copy constructor. | |
| virtual | ~ElGamalPrivateKey () |
| Destructor. | |
| const CODEX_ASN1::SecureBigNumber & | x () const |
| This object as a SecureBigNumber. | |
| BIGNUM * | decrypt (const ElGamalCipherText &cipherText, const ElGamalPublicKey &publicKey) const |
| Decrypt a message. | |
| ElGamalSignature * | sign (const BIGNUM *message, const ElGamalPublicKey &publicKey) const |
| Sign a message. | |
| void | toFile (const char *fname) const |
| Writes the private key to a file. | |
| void * | fromFile (const char *fname) |
| Reads the private key from a file. | |
| bool | operator== (const BigNumber &aBN) const |
| Equality operator. | |
| bool | operator!= (const BigNumber &aBN) const |
| Inequality operator. | |
| bool | operator< (const BigNumber &aBN) const |
| Less-than operator. | |
| bool | operator> (const BigNumber &aBN) const |
| Less-than operator. | |
| const BIGNUM * | value () const |
| BIGNUM structure. | |
| const ASN1_INTEGER * | asn1 () const |
| ASN1_INTEGER corresponding to the BIGNUM. | |
| int | marshal (unsigned char **pp) const |
| This function creates a serialized representation of the object, which is returned through the argument pp. | |
| void * | unmarshal (void *bogus, unsigned char **pp, long length) |
| This function takes a serialized representation of the object and recreates the object representation. | |
| bool | initialized () const |
Protected Attributes | |
| BIGNUM * | m_value |
| BigNumber as an OpenSSL BIGNUM. | |
| ASN1_INTEGER * | m_asn1 |
| BigNumber as an ASN.1 integer. | |
| bool | m_initialized |
| Has this object been initialized yet, or is it still blank? | |
This is just an extension of a SecureBigNumber.
Definition at line 370 of file ElGamal.h.
|
||||||||||||
|
Decrypt a message.
Definition at line 49 of file ElGamalPrivateKey.cc. |
|
|
Reads the private key from a file.
Definition at line 266 of file ElGamalPrivateKey.cc. References CODEX_ASN1::BigNumber::unmarshal(). |
|
|
|
||||||||||||
|
Sign a message.
Definition at line 120 of file ElGamalPrivateKey.cc. |
|
|
Writes the private key to a file.
Definition at line 244 of file ElGamalPrivateKey.cc. References CODEX_ASN1::BigNumber::marshal(). |
|
||||||||||||||||
|
This function takes a serialized representation of the object and recreates the object representation. This must be overridden by the concrete derived class.
Implements CODEX_ASN1::Base. Definition at line 152 of file BigNumber.cc. References CODEX_ASN1::BigNumber::m_asn1, and CODEX_ASN1::BigNumber::m_value. Referenced by fromFile(), CODEX_Client::Client::fromFile(), CODEX_Server::QuorumBuilderAct::handler(), CODEX_KeyService::VerifyWriteCallback::operator()(), CODEX_KeyService::ClientWriteCallback::operator()(), CODEX_KeyService::ClientCreateCallback::operator()(), CODEX_Ciphers::VarRSACipherText::unmarshal(), CODEX_Ciphers::VarRSABlindPlainText::unmarshal(), CODEX_Ciphers::VarRSABlindCipherText::unmarshal(), CODEX_Ciphers::TranslationCertificate::unmarshal(), CODEX_KeyService::KeyInfo::unmarshal(), CODEX_Server::ServerSignature::unmarshal(), CODEX_Ciphers::RSAPublicKey::unmarshal(), CODEX_Ciphers::RSAPrivateKey::unmarshal(), CODEX_Client::ReadKeyMsg::unmarshal(), CODEX_Ciphers::PolCredBase::unmarshal(), CODEX_VSS::ModExpFunctionalArgs::unmarshal(), CODEX_Client::KeyStoredMsg::unmarshal(), CODEX_Ciphers::ElGamalSignature::unmarshal(), CODEX_Ciphers::ElGamalSchnorrCipherText::unmarshal(), CODEX_Ciphers::ElGamalPublicKey::unmarshal(), CODEX_Ciphers::ElGamalCipherText::unmarshal(), CODEX_ThresholdCrypto::DLProof::unmarshal(), CODEX_Client::BlindKeyMsg::unmarshal(), CODEX_Server::SignedAugmentedEGPublicKey::unmarshal(), and CODEX_Server::AugmentedEGPublicKey::unmarshal(). |
1.4.1