#include <xtrcrypt.h>
Inheritance diagram for XTR_DH:

Public Methods | |
| XTR_DH (const Integer &p,const Integer &q,const GFP2Element &g) | |
| XTR_DH (RandomNumberGenerator &rng,unsigned int pbits,unsigned int qbits) | |
| XTR_DH (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 *privateKey,byte *publicKey)const |
| generate private/public key pair. More... | |
| bool | Agree (byte *agreedValue,const byte *privateKey,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 Integer& | GetPrime ()const |
| const Integer& | GetSubprime ()const |
| const GFP2Element& | GetGenerator ()const |
Definition at line 14 of file xtrcrypt.h.
|
|
Definition at line 10 of file xtrcrypt.cpp. |
|
|
Definition at line 15 of file xtrcrypt.cpp. |
|
|
Definition at line 20 of file xtrcrypt.cpp. |
|
|
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 56 of file xtrcrypt.cpp. |
|
|
return length of agreed value produced.
Reimplemented from PK_SimpleKeyAgreementDomain. Definition at line 24 of file xtrcrypt.h. Referenced by Agree(). |
|
|
Definition at line 30 of file xtrcrypt.cpp. |
|
|
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 48 of file xtrcrypt.cpp. |
|
|
Definition at line 33 of file xtrcrypt.h. |
|
|
Definition at line 31 of file xtrcrypt.h. |
|
|
Definition at line 32 of file xtrcrypt.h. |
|
|
return length of private keys in this domain.
Reimplemented from PK_SimpleKeyAgreementDomain. Definition at line 25 of file xtrcrypt.h. Referenced by Agree(), and GenerateKeyPair(). |
|
|
return length of public keys in this domain.
Reimplemented from PK_SimpleKeyAgreementDomain. Definition at line 26 of file xtrcrypt.h. Referenced by Agree(), and GenerateKeyPair(). |
|
|
return whether the domain parameters stored in this object are valid.
Reimplemented from PK_SimpleKeyAgreementDomain. Definition at line 40 of file xtrcrypt.cpp. |
1.2.4 written by Dimitri van Heesch,
© 1997-2000