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

Method Verify

src/cryptopp/gfpcrypt.h:419–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 }
418
419 bool Verify(const DL_GroupParameters<T> &params, const DL_PublicKey<T> &publicKey, const Integer &e, const Integer &r, const Integer &s) const
420 {
421 const Integer &q = params.GetSubgroupOrder();
422 if (r>=q || r<1 || s>=q || s<1)
423 return false;
424
425 const Integer& rInv = r.InverseMod(q);
426 Integer u1 = (rInv * e) % q;
427 Integer u2 = (rInv * s) % q;
428 // verify x(G^u1 + P_A^u2) mod q
429 return r == params.ConvertElementToInteger(publicKey.CascadeExponentiateBaseAndPublicElement(u1, u2)) % q;
430 }
431};
432
433CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<Integer>;

Callers

nothing calls this directly

Calls 2

InverseModMethod · 0.80

Tested by

no test coverage detected