summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2024-04-25 19:26:08 +0200
committerTomas Mraz <tomas@openssl.org>2024-05-02 09:23:22 +0200
commit39819ae4cc7fbaadf1e49b9dbb393a4815d3612f (patch)
tree395a3ab3f8f23eee93ee51ee200a0a683d86ea28 /include
parente35181427355e1a6f18011786a3bb07b18217b82 (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> (Merged from https://github.com/openssl/openssl/pull/24265) (cherry picked from commit 13b3ca5c998e6db4f7251a56c43541cb1a422bd0)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/bn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/bn.h b/include/crypto/bn.h
index 8f0664420a..f071adf52b 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