Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
Discrete Log (DL) simple key agreement base implementation. More...
Public Types | |
typedef T | Element |
Public Member Functions | |
CryptoParameters & | AccessCryptoParameters () |
Retrieves a reference to Crypto Parameters. More... | |
unsigned int | AgreedValueLength () const |
Provides the size of the agreed value. More... | |
unsigned int | PrivateKeyLength () const |
Provides the size of the private key. More... | |
unsigned int | PublicKeyLength () const |
Provides the size of the public key. More... | |
void | GeneratePrivateKey (RandomNumberGenerator &rng, byte *privateKey) const |
Generate private key in this domain. More... | |
void | GeneratePublicKey (RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const |
Generate a public key from a private key in this domain. More... | |
bool | Agree (byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const |
Derive agreed value. More... | |
const Element & | GetGenerator () const |
Retrieves a reference to the group generator. More... | |
![]() | |
virtual void | GenerateKeyPair (RandomNumberGenerator &rng, byte *privateKey, byte *publicKey) const |
Generate a private/public key pair. More... | |
![]() | |
CryptoMaterial & | AccessMaterial () |
Retrieves a reference to Crypto Parameters. More... | |
const CryptoMaterial & | GetMaterial () const |
Retrieves a reference to Crypto Parameters. More... | |
virtual const CryptoParameters & | GetCryptoParameters () const |
Retrieves a reference to Crypto Parameters. More... | |
![]() | |
void | BERDecode (BufferedTransformation &bt) |
Loads this object from a BufferedTransformation. More... | |
void | DEREncode (BufferedTransformation &bt) const |
Saves this object to a BufferedTransformation. More... | |
![]() | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. More... | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. More... | |
![]() | |
virtual Clonable * | Clone () const |
Copies this object. More... | |
Discrete Log (DL) simple key agreement base implementation.
T | class or type |
|
inlinevirtual |
Retrieves a reference to Crypto Parameters.
Implements KeyAgreementAlgorithm.
|
inlinevirtual |
Provides the size of the agreed value.
Implements SimpleKeyAgreementDomain.
|
inlinevirtual |
Provides the size of the private key.
Implements SimpleKeyAgreementDomain.
|
inlinevirtual |
Provides the size of the public key.
Implements SimpleKeyAgreementDomain.
|
inlinevirtual |
Generate private key in this domain.
rng | a RandomNumberGenerator derived class |
privateKey | a byte buffer for the generated private key in this domain |
COUNTOF(privateKey) == PrivateKeyLength()
Implements SimpleKeyAgreementDomain.
|
inlinevirtual |
Generate a public key from a private key in this domain.
rng | a RandomNumberGenerator derived class |
privateKey | a byte buffer with the previously generated private key |
publicKey | a byte buffer for the generated public key in this domain |
COUNTOF(publicKey) == PublicKeyLength()
Implements SimpleKeyAgreementDomain.
|
inlinevirtual |
Derive agreed value.
agreedValue | a byte buffer for the shared secret |
privateKey | a byte buffer with your private key in this domain |
otherPublicKey | a byte buffer with the other party's public key in this domain |
validateOtherPublicKey | a flag indicating if the other party's public key should be validated |
validateStaticOtherPublicKey=false
to save time. COUNTOF(agreedValue) == AgreedValueLength()
COUNTOF(privateKey) == PrivateKeyLength()
COUNTOF(otherPublicKey) == PublicKeyLength()
Implements SimpleKeyAgreementDomain.
|
inline |