From 6edf03eea73fb615c9f5b08b8473924d4c75c00b Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Fri, 31 Oct 2025 02:16:04 +0100 Subject: [PATCH] crypto/bn/rsaz_exp.h: use constant_time_select_bn in bn_select_words MSVC complained about possible loss of data on assignment, and it seems that constant_time_select_bn is more suitable here than constant_time_select_64, change the call to the former. Fixes: 6d702cebfce3 "Add an extra reduction step to RSAZ mod_exp implementations" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Paul Dale Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/29040) --- crypto/bn/rsaz_exp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/bn/rsaz_exp.h b/crypto/bn/rsaz_exp.h index e5a741a52ba..f1e24700545 100644 --- a/crypto/bn/rsaz_exp.h +++ b/crypto/bn/rsaz_exp.h @@ -63,7 +63,7 @@ static ossl_inline void bn_select_words(BN_ULONG *r, BN_ULONG mask, size_t i; for (i = 0; i < num; i++) { - r[i] = constant_time_select_64(mask, a[i], b[i]); + r[i] = constant_time_select_bn(mask, a[i], b[i]); } } -- 2.47.3