summaryrefslogtreecommitdiffstats
path: root/crypto/bn/rsaz_exp_x2.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/rsaz_exp_x2.c')
-rw-r--r--crypto/bn/rsaz_exp_x2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bn/rsaz_exp_x2.c b/crypto/bn/rsaz_exp_x2.c
index 9969d45e40..6b04486e3f 100644
--- a/crypto/bn/rsaz_exp_x2.c
+++ b/crypto/bn/rsaz_exp_x2.c
@@ -257,6 +257,9 @@ int ossl_rsaz_mod_exp_avx512_x2(BN_ULONG *res1,
from_words52(res1, factor_size, rr1_red);
from_words52(res2, factor_size, rr2_red);
+ bn_reduce_once_in_place(res1, /*carry=*/0, m1, storage, factor_size);
+ bn_reduce_once_in_place(res2, /*carry=*/0, m2, storage, factor_size);
+
err:
if (storage != NULL) {
OPENSSL_cleanse(storage, storage_len_bytes);