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

CODEX_Ciphers::RSAPlaintextPK Class Reference

RSA proof of plaintext knowledge. More...

#include <RSAPlaintextPK.h>

Inheritance diagram for CODEX_Ciphers::RSAPlaintextPK:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef CODEX_ASN1::Array<
CODEX_ASN1::BigNumber
ArrayType
 Shorthand for the arrays of proof values.


Public Methods

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

 RSAPlaintextPK (const CODEX_ASN1::SecureBigNumber &plaintext, const RSAPublicKey &publicKey, const CODEX_ASN1::Base &id, const HashFunction &hashFunc)
 RSAPlaintextPK (const RSAPlaintextPK &aPPK)
 Copy constructor.

virtual ~RSAPlaintextPK ()
 Virtual destructor.

void operator= (const RSAPlaintextPK &aPPK)
 Assignment operator.

bool verify (const RSACipherText &ciphertext, const RSAPublicKey &publicKey, const CODEX_ASN1::Base &id, const HashFunction &hashFunc) const
 Verify a proof.

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.


Detailed Description

RSA proof of plaintext knowledge.

This uses the identity proof of Ohta and Okamoto, which is similar to the Guillou-Quisquater identify proof (an extension of Fiat-Shamir).

See also:
Kazuo Ohta and Tatsuaki Okamoto. A Modification of the Fiat-Shamir Scheme. Advances in Cryptology---CRYPTO '88, Proceedings, LNCS 403:232--243, Springer-Verlag, 1990.

Definition at line 37 of file RSAPlaintextPK.h.


Constructor & Destructor Documentation

RSAPlaintextPK::RSAPlaintextPK const CODEX_ASN1::SecureBigNumber   plaintext,
const RSAPublicKey   publicKey,
const CODEX_ASN1::Base   id,
const HashFunction   hashFunc
 

Parameters:
plaintext  The plaintext of which knowledge is to be proven.
publicKey  The public key under which the plaintext is being encrypted.
id  A serializable object providing identifying information about the prover.
hashFunc  A cryptographically secure hash function.

Definition at line 30 of file RSAPlaintextPK.cc.

References CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::append(), CODEX_Ciphers::RSAPublicKey::e(), CODEX_Ciphers::RSAPublicKey::encrypt(), CODEX_ASN1::Base::initialized(), CODEX_ASN1::Base::marshal(), CODEX_ASN1::BigNumber::marshal(), CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::marshal(), CODEX_Ciphers::RSAPublicKey::n(), CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::size(), and CODEX_ASN1::BigNumber::value().


Member Function Documentation

int RSAPlaintextPK::marshal unsigned char **    pp const [virtual]
 

This function creates a serialized representation of the object, which is returned through the argument pp.

This must be overridden by the concrete derived class.

Parameters:
pp  Serialized form of the object
Returns:
Length of the marshalled data

Implements CODEX_ASN1::Base.

Definition at line 340 of file RSAPlaintextPK.cc.

References CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::marshal().

Referenced by CODEX_Client::WriteKeyMsg::marshal(), and CODEX_Client::ReadKeyMsg::marshal().

void * RSAPlaintextPK::unmarshal void *    bogus,
unsigned char **    pp,
long    length
[virtual]
 

This function takes a serialized representation of the object and recreates the object representation.

This must be overridden by the concrete derived class.

Parameters:
bogus  Included for compatibility with OpenSSL ASN.1 macros
pp  Serialized form of the data
length  Number of bytes of pp to unmarshal
Returns:
success or failure of the unmarshalling

Implements CODEX_ASN1::Base.

Definition at line 355 of file RSAPlaintextPK.cc.

References CODEX_ASN1::Base::m_initialized, and CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::unmarshal().

Referenced by CODEX_Client::WriteKeyMsg::unmarshal(), and CODEX_Client::ReadKeyMsg::unmarshal().


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