]> 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:32:02 +0000 (09:32 +0200)
commitfdc3efc371be43d5092bb19823e084f54541cbe3
treed3811b04b8ff612b67e8891e27293a92af9b315d
parenta70ca93cdbc0ed36bf783b9eadc4cea35986b139
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)
crypto/bn/bn_rand.c
crypto/dsa/dsa_ossl.c
crypto/ec/ecdsa_ossl.c
include/crypto/bn.h