]> git.ipfire.org Git - thirdparty/openssl.git/commit
Rename BN_generate_dsa_nonce() to ossl_bn_gen_dsa_nonce_fixed_top()
authorTomas Mraz <tomas@openssl.org>
Mon, 29 Apr 2024 15:56:01 +0000 (17:56 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 9 May 2024 07:33:11 +0000 (09:33 +0200)
commit51f93c3fe756d0c3f5fa1e77b6ae0cbd5f4b1992
tree27e3fa420dd0420ad344643950780348c6e3a9c0
parent8e4c17b7cbeba5f08dffe68d4a2b6a31e7c27b9c
Rename BN_generate_dsa_nonce() to ossl_bn_gen_dsa_nonce_fixed_top()

And create a new BN_generate_dsa_nonce() that corrects the BIGNUM top.
We do this to avoid leaking fixed top numbers via the public API.

Also add a slight optimization in ossl_bn_gen_dsa_nonce_fixed_top()
and make it LE/BE agnostic.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(cherry picked from commit 9c85f6cd2d6debe5ef6ef475ff4bf17e0985f7a2)

(Merged from https://github.com/openssl/openssl/pull/24317)

(cherry picked from commit fdc3efc371be43d5092bb19823e084f54541cbe3)
crypto/bn/bn_rand.c
crypto/dsa/dsa_ossl.c
crypto/ec/ecdsa_ossl.c
include/crypto/bn.h