From 5dbb2a8ca2c1ba42dfb9445b5ea76adccbdb9744 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 25 Apr 2024 15:35:36 +0200 Subject: Add ossl_bn_is_word_fixed_top() Also correct some BN_FLG_FIXED_TOP flag handling. Reviewed-by: Paul Dale Reviewed-by: Neil Horman (cherry picked from commit 2d285fa873028f6cff9484a0cdf690fe05d7fb16) (Merged from https://github.com/openssl/openssl/pull/24317) --- include/crypto/bn.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/crypto/bn.h') 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 -- cgit v1.2.3