summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_mod_words.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_mod_words.c b/src/lib/libcrypto/bn/bn_mod_words.c
index 7c07b49fab..93c6567364 100644
--- a/src/lib/libcrypto/bn/bn_mod_words.c
+++ b/src/lib/libcrypto/bn/bn_mod_words.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mod_words.c,v 1.4 2025/09/01 15:18:55 jsing Exp $ */ 1/* $OpenBSD: bn_mod_words.c,v 1.5 2025/09/01 15:35:25 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -75,16 +75,14 @@ bn_mod_mul_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b,
75{ 75{
76 if (n == 4) { 76 if (n == 4) {
77 bn_mul_comba4(t, a, b); 77 bn_mul_comba4(t, a, b);
78 bn_montgomery_reduce_words(r, t, m, m0, n);
79 } else if (n == 6) { 78 } else if (n == 6) {
80 bn_mul_comba6(t, a, b); 79 bn_mul_comba6(t, a, b);
81 bn_montgomery_reduce_words(r, t, m, m0, n);
82 } else if (n == 8) { 80 } else if (n == 8) {
83 bn_mul_comba8(t, a, b); 81 bn_mul_comba8(t, a, b);
84 bn_montgomery_reduce_words(r, t, m, m0, n);
85 } else { 82 } else {
86 bn_montgomery_multiply_words(r, a, b, m, t, m0, n); 83 bn_mul_words(t, a, n, b, n);
87 } 84 }
85 bn_montgomery_reduce_words(r, t, m, m0, n);
88} 86}
89#endif 87#endif
90 88