summaryrefslogtreecommitdiff
path: root/dh2.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-10-26 00:38:51 -0400
committerJeffrey Walton <noloader@gmail.com>2016-10-26 00:38:51 -0400
commitc77029f142e053ee6b1735144abe82baf4bd96d9 (patch)
tree5b7ecf1cd592aa3a3c6577eb584f9d59214f0ee2 /dh2.h
parent374105198d4472f511f23300aaa6912079173c3e (diff)
downloadcryptopp-git-c77029f142e053ee6b1735144abe82baf4bd96d9.tar.gz
Updated documentation for Crypto++ 1.0 algorithms
Diffstat (limited to 'dh2.h')
-rw-r--r--dh2.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/dh2.h b/dh2.h
index 85db8861..83f7552e 100644
--- a/dh2.h
+++ b/dh2.h
@@ -1,7 +1,6 @@
// dh2.h - written and placed in the public domain by Wei Dai
-//! \file
-//! \headerfile dh2.h
+//! \file dh2.h
//! \brief Classes for Diffie-Hellman authenticated key exchange
#ifndef CRYPTOPP_DH2_H
@@ -11,12 +10,25 @@
NAMESPACE_BEGIN(CryptoPP)
-/// <a href="http://www.weidai.com/scan-mirror/ka.html#DH2">Unified Diffie-Hellman</a>
+//! \class DH2
+//! \brief Unified Diffie-Hellman
+//! \details A Diffie-Hellman domain is a set of parameters that must be shared
+//! by two parties in a key agreement protocol, along with the algorithms
+//! for generating key pairs and deriving agreed values.
+//! \sa AuthenticatedKeyAgreementDomain, <a href="http://www.weidai.com/scan-mirror/ka.html#DH2">Unified Diffie-Hellman</a>
+//! \since Crypto++ 1.0
class DH2 : public AuthenticatedKeyAgreementDomain
{
public:
+
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~DH2() {}
+#endif
+
+ //! \brief Construct a DH2
DH2(SimpleKeyAgreementDomain &domain)
: d1(domain), d2(domain) {}
+ //! \brief Construct a DH2
DH2(SimpleKeyAgreementDomain &staticDomain, SimpleKeyAgreementDomain &ephemeralDomain)
: d1(staticDomain), d2(ephemeralDomain) {}
@@ -52,10 +64,6 @@ public:
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
bool validateStaticOtherPublicKey=true) const;
-#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- virtual ~DH2() {}
-#endif
-
protected:
SimpleKeyAgreementDomain &d1, &d2;
};