diff --git a/fhmqv.h b/fhmqv.h index 7d2fc1ca..eadacc80 100644 --- a/fhmqv.h +++ b/fhmqv.h @@ -31,7 +31,7 @@ public: virtual ~FHMQV_Domain() {} /// \brief Construct a FHMQV domain - /// \params clientRole flag indicating initiator or recipient + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. FHMQV_Domain(bool clientRole = true) @@ -39,6 +39,7 @@ public: /// \brief Construct a FHMQV domain /// \param params group parameters and options + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. FHMQV_Domain(const GroupParameters ¶ms, bool clientRole = true) @@ -46,6 +47,7 @@ public: /// \brief Construct a FHMQV domain /// \param bt BufferedTransformation with group parameters and options + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. FHMQV_Domain(BufferedTransformation &bt, bool clientRole = true) @@ -57,6 +59,7 @@ public: /// \tparam T2 template parameter used as a constructor parameter /// \param v1 first parameter /// \param v2 second parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1 and v2 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -70,6 +73,7 @@ public: /// \tparam T2 template parameter used as a constructor parameter /// \param v1 first parameter /// \param v2 second parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1 and v2 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -85,6 +89,7 @@ public: /// \param v1 first parameter /// \param v2 second parameter /// \param v3 third parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1, v2 and v3 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -102,6 +107,7 @@ public: /// \param v2 second parameter /// \param v3 third parameter /// \param v4 third parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1, v2, v3 and v4 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. diff --git a/hmqv.h b/hmqv.h index f678e30f..8603d16c 100644 --- a/hmqv.h +++ b/hmqv.h @@ -30,7 +30,7 @@ public: virtual ~HMQV_Domain() {} /// \brief Construct a HMQV domain - /// \params clientRole flag indicating initiator or recipient + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. HMQV_Domain(bool clientRole = true) @@ -38,6 +38,7 @@ public: /// \brief Construct a HMQV domain /// \param params group parameters and options + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. HMQV_Domain(const GroupParameters ¶ms, bool clientRole = true) @@ -45,6 +46,7 @@ public: /// \brief Construct a HMQV domain /// \param bt BufferedTransformation with group parameters and options + /// \param clientRole flag indicating initiator or recipient /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. HMQV_Domain(BufferedTransformation &bt, bool clientRole = true) @@ -56,6 +58,7 @@ public: /// \tparam T2 template parameter used as a constructor parameter /// \param v1 first parameter /// \param v2 second parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1 and v2 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -69,6 +72,7 @@ public: /// \tparam T2 template parameter used as a constructor parameter /// \param v1 first parameter /// \param v2 second parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1 and v2 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -84,6 +88,7 @@ public: /// \param v1 first parameter /// \param v2 second parameter /// \param v3 third parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1, v2 and v3 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -101,6 +106,7 @@ public: /// \param v2 second parameter /// \param v3 third parameter /// \param v4 third parameter + /// \param clientRole flag indicating initiator or recipient /// \details v1, v2, v3 and v4 are passed directly to the GROUP_PARAMETERS object. /// \details clientRole = true indicates initiator, and /// clientRole = false indicates recipient or server. @@ -248,7 +254,7 @@ public: BB = tt.BytePtr(); bbs = tt.SizeInBytes(); } - else if(m_role == RoleClient) + else { Integer a(staticPrivateKey, StaticPrivateKeyLength()); Element A = params.ExponentiateBase(a); @@ -263,11 +269,6 @@ public: BB = staticOtherPublicKey; bbs = StaticPublicKeyLength(); } - else - { - CRYPTOPP_ASSERT(0); - return false; - } // DecodeElement calls ValidateElement at level 1. Level 1 only calls // VerifyPoint to ensure the element is in G*. If the other's PublicKey is