diff options
author | Tomas Mraz <tomas@openssl.org> | 2024-04-25 19:26:08 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-05-09 09:32:02 +0200 |
commit | a70ca93cdbc0ed36bf783b9eadc4cea35986b139 (patch) | |
tree | b8bc38fb95c90a0003b2a8018a88d4956e9654f2 /include/crypto/bn.h | |
parent | 5dbb2a8ca2c1ba42dfb9445b5ea76adccbdb9744 (diff) |
Add ossl_bn_priv_rand_range_fixed_top() and use it for EC/DSA
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(cherry picked from commit 13b3ca5c998e6db4f7251a56c43541cb1a422bd0)
(Merged from https://github.com/openssl/openssl/pull/24317)
Diffstat (limited to 'include/crypto/bn.h')
-rw-r--r-- | include/crypto/bn.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/bn.h b/include/crypto/bn.h index a080a3b462..94a624f064 100644 --- a/include/crypto/bn.h +++ b/include/crypto/bn.h @@ -89,6 +89,8 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); int ossl_bn_mask_bits_fixed_top(BIGNUM *a, int n); int ossl_bn_is_word_fixed_top(const BIGNUM *a, BN_ULONG w); +int ossl_bn_priv_rand_range_fixed_top(BIGNUM *r, const BIGNUM *range, + unsigned int strength, BN_CTX *ctx); #define BN_PRIMETEST_COMPOSITE 0 #define BN_PRIMETEST_COMPOSITE_WITH_FACTOR 1 |