diff options
author | tb <> | 2023-03-11 15:29:03 +0000 |
---|---|---|
committer | tb <> | 2023-03-11 15:29:03 +0000 |
commit | 41f7f65096b8335fece23db719c013b6f69b9f15 (patch) | |
tree | b33c50310114b7cefaab3359699921ac74dd8db9 /src/lib/libcrypto/dsa/dsa_pmeth.c | |
parent | 35110baf921b6dce1cf276a12a23a1e226a410dd (diff) | |
download | openbsd-41f7f65096b8335fece23db719c013b6f69b9f15.tar.gz openbsd-41f7f65096b8335fece23db719c013b6f69b9f15.tar.bz2 openbsd-41f7f65096b8335fece23db719c013b6f69b9f15.zip |
Fix an off-by-one in dsa_check_key()
The private key is a random number in [1, q-1], so 1 must be allowed.
Since q is at least an 160-bit prime and 2^159 + 1 is not prime (159
is not a power of 2), the probability that this is hit is < 2^-159,
but a tiny little bit wrong is still wrong.
Found while investigating a report by bluhm
ok jsing
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_pmeth.c')
0 files changed, 0 insertions, 0 deletions