]> 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, 2 May 2024 07:23:07 +0000 (09:23 +0200)
commit1c3286a3c7a4361ab57536e7e752850e42d71650
tree82f17bdfd745b57f4ba6d2946380f97d5951adca
parentd99332f612a4ccead17ba5d63c3976aa6bcb68b6
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>
(Merged from https://github.com/openssl/openssl/pull/24265)

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