summaryrefslogtreecommitdiffstats
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:16:36 +0200
commit13b3ca5c998e6db4f7251a56c43541cb1a422bd0 (patch)
tree788f2653f7a71314fc32edb5e515be2c7d06e1bc /include
parent2d285fa873028f6cff9484a0cdf690fe05d7fb16 (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)
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 50d89fa67a..308cf57502 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