Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

LUCDIF Class Reference

. More...

#include <luc.h>

Inheritance diagram for LUCDIF:

PK_SimpleKeyAgreementDomain List of all members.

Public Methods

 LUCDIF (const Integer &p,const Integer &g)
 LUCDIF (RandomNumberGenerator &rng,unsigned int pbits)
 LUCDIF (BufferedTransformation &domainParams)
void DEREncode (BufferedTransformation &domainParams)const
bool ValidateDomainParameters (RandomNumberGenerator &rng)const
 return whether the domain parameters stored in this object are valid. More...

unsigned int AgreedValueLength ()const
 return length of agreed value produced. More...

unsigned int PrivateKeyLength ()const
 return length of private keys in this domain. More...

unsigned int PublicKeyLength ()const
 return length of public keys in this domain. More...

void GenerateKeyPair (RandomNumberGenerator &rng,byte *secretKey,byte *publicKey)const
 generate private/public key pair. More...

bool Agree (byte *agreedValue,const byte *secretKey,const byte *otherPublicKey,bool validateOtherPublicKey=true)const
 derive agreed value from your private key and couterparty's public key, return false in case of failure. More...

const IntegerPrime ()const
const IntegerGenerator ()const

Detailed Description

.

Definition at line 228 of file luc.h.


Constructor & Destructor Documentation

LUCDIF::LUCDIF ( const Integer & p,
const Integer & g )
 

Definition at line 358 of file luc.cpp.

LUCDIF::LUCDIF ( RandomNumberGenerator & rng,
unsigned int pbits )
 

Definition at line 363 of file luc.cpp.

LUCDIF::LUCDIF ( BufferedTransformation & bt )
 

Definition at line 370 of file luc.cpp.


Member Function Documentation

bool LUCDIF::Agree ( byte * agreedValue,
const byte * privateKey,
const byte * otherPublicKey,
bool validateOtherPublicKey = true ) const [virtual]
 

derive agreed value from your private key and couterparty's public key, return false in case of failure.

Note: If you have previously validated the public key, use validateOtherPublicKey=false to save time. /*! Preconditions: \begin{itemize} \item size of agreedValue == AgreedValueLength() \item length of privateKey == PrivateKeyLength() \item length of otherPublicKey == PublicKeyLength() \end{itemize}

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 399 of file luc.cpp.

unsigned int LUCDIF::AgreedValueLength ( ) const [inline, virtual]
 

return length of agreed value produced.

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 238 of file luc.h.

Referenced by Agree().

void LUCDIF::DEREncode ( BufferedTransformation & bt ) const
 

Definition at line 378 of file luc.cpp.

void LUCDIF::GenerateKeyPair ( RandomNumberGenerator & rng,
byte * privateKey,
byte * publicKey ) const [virtual]
 

generate private/public key pair.

Preconditions: \begin{itemize} \item size of privateKey == PrivateKeyLength() \item size of publicKey == PublicKeyLength() \end{itemize}

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 391 of file luc.cpp.

const Integer & LUCDIF::Generator ( ) const [inline]
 

Definition at line 246 of file luc.h.

const Integer & LUCDIF::Prime ( ) const [inline]
 

Definition at line 245 of file luc.h.

unsigned int LUCDIF::PrivateKeyLength ( ) const [inline, virtual]
 

return length of private keys in this domain.

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 239 of file luc.h.

Referenced by Agree(), and GenerateKeyPair().

unsigned int LUCDIF::PublicKeyLength ( ) const [inline, virtual]
 

return length of public keys in this domain.

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 240 of file luc.h.

Referenced by Agree(), and GenerateKeyPair().

bool LUCDIF::ValidateDomainParameters ( RandomNumberGenerator & rng ) const [virtual]
 

return whether the domain parameters stored in this object are valid.

Reimplemented from PK_SimpleKeyAgreementDomain.

Definition at line 386 of file luc.cpp.


The documentation for this class was generated from the following files:
Generated at Mon Jan 15 01:16:53 2001 for Crypto++ by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000