diff options
author | Tomas Mraz <tomas@openssl.org> | 2024-04-25 15:35:36 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-05-09 09:32:02 +0200 |
commit | 5dbb2a8ca2c1ba42dfb9445b5ea76adccbdb9744 (patch) | |
tree | c1dcb1e684f72333a0a1d35e12061c2fb66cfdf1 /include/crypto/bn.h | |
parent | 0df711a25da6e99a7ce0dbaf992acb644252385f (diff) |
Add ossl_bn_is_word_fixed_top()
Also correct some BN_FLG_FIXED_TOP flag handling.
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(cherry picked from commit 2d285fa873028f6cff9484a0cdf690fe05d7fb16)
(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 00544d9d25..a080a3b462 100644 --- a/include/crypto/bn.h +++ b/include/crypto/bn.h @@ -87,6 +87,8 @@ int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); 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); #define BN_PRIMETEST_COMPOSITE 0 #define BN_PRIMETEST_COMPOSITE_WITH_FACTOR 1 |