Comments and whitespace checkin
parent
f2132a81c1
commit
0f83589852
14
gfpcrypt.h
14
gfpcrypt.h
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue