8NAMESPACE_BEGIN(CryptoPP)
10#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
14 CRYPTOPP_UNUSED(source);
17 CRYPTOPP_UNUSED(rng); CRYPTOPP_UNUSED(level);
20 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const {
21 CRYPTOPP_UNUSED(name); CRYPTOPP_UNUSED(valueType); CRYPTOPP_UNUSED(pValue);
26struct NullSimpleKeyAgreementDomain :
public TwoBases<NullCryptoParameters, SimpleKeyAgreementDomain>
31 unsigned int AgreedValueLength()
const {
34 unsigned int PrivateKeyLength()
const {
37 unsigned int PublicKeyLength()
const {
41 CRYPTOPP_UNUSED(rng); CRYPTOPP_UNUSED(privateKey);
44 CRYPTOPP_UNUSED(rng); CRYPTOPP_UNUSED(privateKey); CRYPTOPP_UNUSED(publicKey);
46 bool Agree(
byte *agreedValue,
const byte *privateKey,
const byte *otherPublicKey,
bool validateOtherPublicKey=
true)
const {
47 CRYPTOPP_UNUSED(agreedValue); CRYPTOPP_UNUSED(privateKey);
48 CRYPTOPP_UNUSED(otherPublicKey); CRYPTOPP_UNUSED(validateOtherPublicKey);
53void DH2_TestInstantiations()
55 NullSimpleKeyAgreementDomain dom;
61 const byte *staticSecretKey,
const byte *ephemeralSecretKey,
62 const byte *staticOtherPublicKey,
const byte *ephemeralOtherPublicKey,
63 bool validateStaticOtherPublicKey)
const
65 return d1.
Agree(agreedValue, staticSecretKey, staticOtherPublicKey, validateStaticOtherPublicKey)
virtual void AssignFrom(const NameValuePairs &source)=0
Assign values to this object.
virtual bool Validate(RandomNumberGenerator &rng, unsigned int level) const =0
Check this object for errors.
Interface for crypto parameters.
Unified Diffie-Hellman in GF(p)
bool Agree(byte *agreedValue, const byte *staticPrivateKey, const byte *ephemeralPrivateKey, const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey, bool validateStaticOtherPublicKey=true) const
Derive agreed value.
Interface for retrieving values given their names.
virtual CRYPTOPP_DLL bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const =0
Get a named value.
Interface for random number generators.
virtual bool Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const =0
Derive agreed value.
virtual unsigned int AgreedValueLength() const =0
Provides the size of the agreed value.
Abstract base classes that provide a uniform interface to this library.
Classes for Unified Diffie-Hellman key exchange.
Utility functions for the Crypto++ library.