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

PK_SimpleKeyAgreementDomain Class Reference

abstract base class for domains of simple key agreement protocols. More...

#include <cryptlib.h>

Inheritance diagram for PK_SimpleKeyAgreementDomain:

LUCDIF XTR_DH List of all members.

Public Methods

virtual ~PK_SimpleKeyAgreementDomain ()
virtual bool ValidateDomainParameters (RandomNumberGenerator &rng)const=0
 return whether the domain parameters stored in this object are valid.

virtual unsigned int AgreedValueLength ()const=0
 return length of agreed value produced.

virtual unsigned int PrivateKeyLength ()const=0
 return length of private keys in this domain.

virtual unsigned int PublicKeyLength ()const=0
 return length of public keys in this domain.

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

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


Detailed Description

abstract base class for domains of simple key agreement protocols.

A key agreement domain is a set of parameters that must be shared by two parties in a key agreement protocol, along with the algorithms for generating key pairs and deriving agreed values.

Definition at line 694 of file cryptlib.h.


Constructor & Destructor Documentation

PK_SimpleKeyAgreementDomain::~PK_SimpleKeyAgreementDomain ( ) [inline, virtual]
 

Definition at line 697 of file cryptlib.h.


Member Function Documentation

bool PK_SimpleKeyAgreementDomain::Agree ( byte * agreedValue,
const byte * privateKey,
const byte * otherPublicKey,
bool validateOtherPublicKey = true ) const [pure 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 in LUCDIF, and XTR_DH.

Referenced by DH2::Agree().

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

generate private/public key pair.

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

Reimplemented in LUCDIF, and XTR_DH.

Referenced by DH2::GenerateEphemeralKeyPair(), and DH2::GenerateStaticKeyPair().


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