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

PK_AuthenticatedKeyAgreementDomain Class Reference

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

#include <cryptlib.h>

Inheritance diagram for PK_AuthenticatedKeyAgreementDomain:

DH2 List of all members.

Public Methods

virtual ~PK_AuthenticatedKeyAgreementDomain ()
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 StaticPrivateKeyLength ()const=0
 return length of static private keys in this domain.

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

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

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

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

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

virtual bool Agree (byte *agreedValue,const byte *staticPrivateKey,const byte *ephemeralPrivateKey,const byte *staticOtherPublicKey,const byte *ephemeralOtherPublicKey,bool validateStaticOtherPublicKey=true)const=0
 derive agreed value from your private keys and couterparty's public keys, return false in case of failure. More...


Detailed Description

abstract base class for domains of authenticated key agreement protocols.

In an authenticated key agreement protocol, each party has two key pairs. The long-lived key pair is called the static key pair, and the short-lived key pair is called the ephemeral key pair.

Definition at line 733 of file cryptlib.h.


Constructor & Destructor Documentation

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

Definition at line 736 of file cryptlib.h.


Member Function Documentation

bool PK_AuthenticatedKeyAgreementDomain::Agree ( byte * agreedValue,
const byte * staticSecretKey,
const byte * ephemeralSecretKey,
const byte * staticOtherPublicKey,
const byte * ephemeralOtherPublicKey,
bool validateStaticOtherPublicKey = true ) const [pure virtual]
 

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

Note: The ephemeral public key will always be validated. If you have previously validated the static public key, use validateStaticOtherPublicKey=false to save time. Preconditions: \begin{itemize} \item size of agreedValue == AgreedValueLength() \item length of staticPrivateKey == StaticPrivateKeyLength() \item length of ephemeralPrivateKey == EphemeralPrivateKeyLength() \item length of staticOtherPublicKey == StaticPublicKeyLength() \item length of ephemeralOtherPublicKey == EphemeralPublicKeyLength() \end{itemize}

Reimplemented in DH2.

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

generate ephemeral private/public key pair.

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

Reimplemented in DH2.

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

generate static private/public key pair.

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

Reimplemented in DH2.


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