diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-06-14 18:04:00 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-06-14 18:04:00 +0000 |
commit | 293be1bd9a559f430e6b6d124139a129db1cd6dd (patch) | |
tree | 5d1234fe3f294ad01bfe78cbeb52da1fb11b1e45 /lib/libcrypto/dsa | |
parent | 4d133d65a07ca2bd6152f6a7eb81d9814201c249 (diff) |
Clarify the digest truncation comment in DSA signature generation.
Requested by and ok tb@
Diffstat (limited to 'lib/libcrypto/dsa')
-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); |