| 212 | } |
| 213 | |
| 214 | bool Verify(const DL_GroupParameters<T> ¶ms, 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 |
nothing calls this directly
no test coverage detected