diff options
author | 2018-06-14 18:03:59 +0000 | |
---|---|---|
committer | 2018-06-14 18:03:59 +0000 | |
commit | cca0da51464fc10a97e4b1c0f19cab70435972b8 (patch) | |
tree | 390b9c15e16511ef27bf31aa9ef2a1b4935f1a40 /lib/libcrypto/dsa/dsa_ossl.c | |
parent | In in_pcballoc() finish the inp initialization before adding it to (diff) | |
download | wireguard-openbsd-cca0da51464fc10a97e4b1c0f19cab70435972b8.tar.xz wireguard-openbsd-cca0da51464fc10a97e4b1c0f19cab70435972b8.zip |
Clarify the digest truncation comment in DSA signature generation.
Requested by and ok tb@
Diffstat (limited to 'lib/libcrypto/dsa/dsa_ossl.c')
-rw-r--r-- | lib/libcrypto/dsa/dsa_ossl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libcrypto/dsa/dsa_ossl.c b/lib/libcrypto/dsa/dsa_ossl.c index 9545cff5f8e..2f7268839e9 100644 --- a/lib/libcrypto/dsa/dsa_ossl.c +++ b/lib/libcrypto/dsa/dsa_ossl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_ossl.c,v 1.35 2018/06/14 17:15:41 jsing Exp $ */ +/* $OpenBSD: dsa_ossl.c,v 1.36 2018/06/14 18:03:59 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -118,8 +118,9 @@ dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) goto err; /* - * If the digest length is greater than the size of q use the - * BN_num_bits(dsa->q) leftmost bits of the digest, see FIPS 186-3, 4.2. + * If the digest length is greater than N (the bit length of q), the + * leftmost N bits of the digest shall be used, see FIPS 186-3, 4.2. + * In this case the digest length is given in bytes. */ if (dlen > BN_num_bytes(dsa->q)) dlen = BN_num_bytes(dsa->q); |