Comments and whitespace checkin

pull/368/head
Jeffrey Walton 2017-01-20 21:33:27 -05:00
parent f2132a81c1
commit 0f83589852
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 549 additions and 545 deletions

View File

@ -1,5 +1,6 @@
// gfpcrypt.h - written and placed in the public domain by Wei Dai
// deterministic signatures added by by Douglas Roark
// RFC6979 deterministic signatures (DL_Algorithm_DSA_RFC6979) added by by Douglas Roark
// ECGDSA (DL_Algorithm_GDSA_ISO15946) added by Jeffrey Walton
//! \file gfpcrypt.h
//! \brief Classes and functions for schemes based on Discrete Logs (DL) over GF(p)
@ -396,8 +397,11 @@ private:
//! \class DL_Algorithm_GDSA_ISO15946
//! \brief German Digital Signature Algorithm
//! \tparam T FieldElement type or class
//! \sa Erwin Hess, Marcus Schafheutle, and Pascale Serf <A HREF="http://www.teletrust.de/fileadmin/files/oid/ecgdsa_final.pdf">The
//! Digital Signature Scheme ECGDSA (October 24, 2006)</A>
//! \details The Digital Signature Scheme ECGDSA does not define the algorithm over integers. Rather, the
//! signature algorithm is only defined over elliptic curves. However, The library design is such that the
//! generic algorithm reside in \header gfpcrypt.h.
//! \sa Erwin Hess, Marcus Schafheutle, and Pascale Serf <A HREF="http://www.teletrust.de/fileadmin/files/oid/ecgdsa_final.pdf">
//! The Digital Signature Scheme ECGDSA (October 24, 2006)</A>
template <class T>
class DL_Algorithm_GDSA_ISO15946 : public DL_ElgamalLikeSignatureAlgorithm<T>
{
@ -423,8 +427,8 @@ public:
return false;
const Integer& rInv = r.InverseMod(q);
Integer u1 = (rInv * e) % q;
Integer u2 = (rInv * s) % q;
const Integer u1 = (rInv * e) % q;
const Integer u2 = (rInv * s) % q;
// verify x(G^u1 + P_A^u2) mod q
return r == params.ConvertElementToInteger(publicKey.CascadeExponentiateBaseAndPublicElement(u1, u2)) % q;
}