#include <dh2.h>
Inheritance diagram for DH2:

Public Methods | |
| DH2 (const PK_SimpleKeyAgreementDomain &domain) | |
| DH2 (const PK_SimpleKeyAgreementDomain &staticDomain,const PK_SimpleKeyAgreementDomain &ephemeralDomain) | |
| 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 | StaticPrivateKeyLength ()const |
| return length of static private keys in this domain. More... | |
| unsigned int | StaticPublicKeyLength ()const |
| return length of static public keys in this domain. More... | |
| void | GenerateStaticKeyPair (RandomNumberGenerator &rng,byte *privateKey,byte *publicKey)const |
| generate static private/public key pair. More... | |
| unsigned int | EphemeralPrivateKeyLength ()const |
| return length of ephemeral private keys in this domain. More... | |
| unsigned int | EphemeralPublicKeyLength ()const |
| return length of ephemeral public keys in this domain. More... | |
| void | GenerateEphemeralKeyPair (RandomNumberGenerator &rng,byte *privateKey,byte *publicKey)const |
| generate ephemeral private/public key pair. More... | |
| bool | Agree (byte *agreedValue,const byte *staticPrivateKey,const byte *ephemeralPrivateKey,const byte *staticOtherPublicKey,const byte *ephemeralOtherPublicKey,bool validateStaticOtherPublicKey=true)const |
| derive agreed value from your private keys and couterparty's public keys, return false in case of failure. More... | |
Protected Attributes | |
| const PK_SimpleKeyAgreementDomain& | d1 |
| const PK_SimpleKeyAgreementDomain & | d2 |
Definition at line 12 of file dh2.h.
|
|
|
|
|
|
|
|
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 from PK_AuthenticatedKeyAgreementDomain. |
|
|
return length of agreed value produced.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
return length of ephemeral private keys in this domain.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
return length of ephemeral public keys in this domain.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
generate ephemeral private/public key pair. Preconditions: \begin{itemize} \item size of privateKey == EphemeralPrivateKeyLength() \item size of publicKey == EphemeralPublicKeyLength() \end{itemize} Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
generate static private/public key pair. Preconditions: \begin{itemize} \item size of privateKey == StaticPrivateKeyLength() \item size of publicKey == StaticPublicKeyLength() \end{itemize} Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
return length of static private keys in this domain.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
return length of static public keys in this domain.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
return whether the domain parameters stored in this object are valid.
Reimplemented from PK_AuthenticatedKeyAgreementDomain. |
|
|
|
|
|
|
1.2.4 written by Dimitri van Heesch,
© 1997-2000