MCPcopy Create free account
hub / github.com/LUX-Core/lux / Verify

Method Verify

src/cryptopp/gfpcrypt.h:214–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 bool Verify(const DL_GroupParameters<T> &params, const DL_PublicKey<T> &publicKey, const Integer &e, const Integer &r, const Integer &s) const
215 {
216 const Integer &q = params.GetSubgroupOrder();
217 if (r>=q || r<1 || s>=q || s<1)
218 return false;
219
220 Integer w = s.InverseMod(q);
221 Integer u1 = (e * w) % q;
222 Integer u2 = (r * w) % q;
223 // verify r == (g^u1 * y^u2 mod p) mod q
224 return r == params.ConvertElementToInteger(publicKey.CascadeExponentiateBaseAndPublicElement(u1, u2)) % q;
225 }
226};
227
228//! \class DL_Algorithm_DSA_RFC6979

Callers

nothing calls this directly

Calls 2

InverseModMethod · 0.80

Tested by

no test coverage detected