Commit b144ab81 authored by Niels Möller's avatar Niels Möller
Browse files

* dss_keygen.c (dss_nist_gen): Fixed off-by-one bug, discovered by

"Joseph Galbraith" <galb@rt66.com>.

Rev: src/dsa_keygen.c:1.4
parent 4df4684d
......@@ -114,8 +114,7 @@ void dss_nist_gen(mpz_t p, mpz_t q, struct randomness *r, unsigned l)
{
mpz_set(t, s);
mpz_add_ui(t, t, j + k);
/* FIXME: See galb's bug report */
hash(t, buffer + ( (n+1-k) * SHA_DIGESTSIZE));
hash(t, buffer + ( (n-k) * SHA_DIGESTSIZE));
}
bignum_parse_u(p, size, buffer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment