summaryrefslogtreecommitdiff
path: root/fhmqv.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-29 10:54:33 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-29 10:54:33 -0500
commit61ec50dabe14c5d4582ac187706ea27645b3562b (patch)
tree18a2eebb7adc8c9556ce132d7081a105fa058d6b /fhmqv.h
parent16ebfa72bf130c4725e652e4d3688d97d3feb0ee (diff)
downloadcryptopp-git-61ec50dabe14c5d4582ac187706ea27645b3562b.tar.gz
Change Doxygen comment style from //! to ///
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
Diffstat (limited to 'fhmqv.h')
-rw-r--r--fhmqv.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/fhmqv.h b/fhmqv.h
index 49120f02..38657ee8 100644
--- a/fhmqv.h
+++ b/fhmqv.h
@@ -4,9 +4,9 @@
#ifndef CRYPTOPP_FHMQV_H
#define CRYPTOPP_FHMQV_H
-//! \file fhmqv.h
-//! \brief Classes for Fully Hashed Menezes-Qu-Vanstone key agreement in GF(p)
-//! \since Crypto++ 5.6.4
+/// \file fhmqv.h
+/// \brief Classes for Fully Hashed Menezes-Qu-Vanstone key agreement in GF(p)
+/// \since Crypto++ 5.6.4
#include "gfpcrypt.h"
#include "algebra.h"
@@ -14,12 +14,12 @@
NAMESPACE_BEGIN(CryptoPP)
-//! \brief Fully Hashed Menezes-Qu-Vanstone in GF(p)
-//! \details This implementation follows Augustin P. Sarr and Philippe Elbaz–Vincent, and Jean–Claude Bajard's
-//! <a href="http://eprint.iacr.org/2009/408">A Secure and Efficient Authenticated Diffie-Hellman Protocol</a>.
-//! Note: this is FHMQV, Protocol 5, from page 11; and not FHMQV-C.
-//! \sa MQV, HMQV, FHMQV, and AuthenticatedKeyAgreementDomain
-//! \since Crypto++ 5.6.4
+/// \brief Fully Hashed Menezes-Qu-Vanstone in GF(p)
+/// \details This implementation follows Augustin P. Sarr and Philippe Elbaz–Vincent, and Jean–Claude Bajard's
+/// <a href="http://eprint.iacr.org/2009/408">A Secure and Efficient Authenticated Diffie-Hellman Protocol</a>.
+/// Note: this is FHMQV, Protocol 5, from page 11; and not FHMQV-C.
+/// \sa MQV, HMQV, FHMQV, and AuthenticatedKeyAgreementDomain
+/// \since Crypto++ 5.6.4
template <class GROUP_PARAMETERS, class COFACTOR_OPTION = typename GROUP_PARAMETERS::DefaultCofactorOption, class HASH = SHA512>
class FHMQV_Domain : public AuthenticatedKeyAgreementDomain
{
@@ -66,14 +66,14 @@ public:
CryptoParameters & AccessCryptoParameters(){return AccessAbstractGroupParameters();}
- //! return length of agreed value produced
+ /// return length of agreed value produced
unsigned int AgreedValueLength() const {return GetAbstractGroupParameters().GetEncodedElementSize(false);}
- //! return length of static private keys in this domain
+ /// return length of static private keys in this domain
unsigned int StaticPrivateKeyLength() const {return GetAbstractGroupParameters().GetSubgroupOrder().ByteCount();}
- //! return length of static public keys in this domain
+ /// return length of static public keys in this domain
unsigned int StaticPublicKeyLength() const{return GetAbstractGroupParameters().GetEncodedElementSize(true);}
- //! generate static private key
+ /// generate static private key
/*! \pre size of privateKey == PrivateStaticKeyLength() */
void GenerateStaticPrivateKey(RandomNumberGenerator &rng, byte *privateKey) const
{
@@ -81,7 +81,7 @@ public:
x.Encode(privateKey, StaticPrivateKeyLength());
}
- //! generate static public key
+ /// generate static public key
/*! \pre size of publicKey == PublicStaticKeyLength() */
void GenerateStaticPublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const
{
@@ -95,7 +95,7 @@ public:
unsigned int EphemeralPrivateKeyLength() const {return StaticPrivateKeyLength() + StaticPublicKeyLength();}
unsigned int EphemeralPublicKeyLength() const{return StaticPublicKeyLength();}
- //! return length of ephemeral private keys in this domain
+ /// return length of ephemeral private keys in this domain
void GenerateEphemeralPrivateKey(RandomNumberGenerator &rng, byte *privateKey) const
{
const DL_GroupParameters<Element> &params = GetAbstractGroupParameters();
@@ -105,14 +105,14 @@ public:
params.EncodeElement(true, y, privateKey+StaticPrivateKeyLength());
}
- //! return length of ephemeral public keys in this domain
+ /// return length of ephemeral public keys in this domain
void GenerateEphemeralPublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const
{
CRYPTOPP_UNUSED(rng);
memcpy(publicKey, privateKey+StaticPrivateKeyLength(), EphemeralPublicKeyLength());
}
- //! derive agreed value from your private keys and couterparty's public keys, return false in case of failure
+ /// 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.
\pre size of agreedValue == AgreedValueLength()
@@ -289,12 +289,12 @@ private:
KeyAgreementRole m_role;
};
-//! \brief Fully Hashed Menezes-Qu-Vanstone in GF(p)
-//! \details This implementation follows Augustin P. Sarr and Philippe Elbaz–Vincent, and Jean–Claude Bajard's
-//! <a href="http://eprint.iacr.org/2009/408">A Secure and Efficient Authenticated Diffie-Hellman Protocol</a>.
-//! Note: this is FHMQV, Protocol 5, from page 11; and not FHMQV-C.
-//! \sa FHMQV, MQV_Domain, HMQV_Domain, AuthenticatedKeyAgreementDomain
-//! \since Crypto++ 5.6.4
+/// \brief Fully Hashed Menezes-Qu-Vanstone in GF(p)
+/// \details This implementation follows Augustin P. Sarr and Philippe Elbaz–Vincent, and Jean–Claude Bajard's
+/// <a href="http://eprint.iacr.org/2009/408">A Secure and Efficient Authenticated Diffie-Hellman Protocol</a>.
+/// Note: this is FHMQV, Protocol 5, from page 11; and not FHMQV-C.
+/// \sa FHMQV, MQV_Domain, HMQV_Domain, AuthenticatedKeyAgreementDomain
+/// \since Crypto++ 5.6.4
typedef FHMQV_Domain<DL_GroupParameters_GFP_DefaultSafePrime> FHMQV;
NAMESPACE_END