aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint/big_ops2.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-01 12:38:20 -0500
committerJack Lloyd <[email protected]>2018-12-01 12:38:20 -0500
commit0d64fbfce766ab6940fe0955f2f79b914e1b1111 (patch)
treeaf18404149eb7f12f851f5243ce954eb7716f118 /src/lib/math/bigint/big_ops2.cpp
parent94598a96533900ccd933a9ac23c890555724aa51 (diff)
Unroll mod_sub for 6 words also, helps P-384 quite a bit
Diffstat (limited to 'src/lib/math/bigint/big_ops2.cpp')
-rw-r--r--src/lib/math/bigint/big_ops2.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/math/bigint/big_ops2.cpp b/src/lib/math/bigint/big_ops2.cpp
index 5e4ee949c..815771294 100644
--- a/src/lib/math/bigint/big_ops2.cpp
+++ b/src/lib/math/bigint/big_ops2.cpp
@@ -128,6 +128,8 @@ BigInt& BigInt::mod_sub(const BigInt& s, const BigInt& mod, secure_vector<word>&
#else
if(mod_sw == 4)
bigint_mod_sub_n<4>(mutable_data(), s.data(), mod.data(), ws.data());
+ else if(mod_sw == 6)
+ bigint_mod_sub_n<6>(mutable_data(), s.data(), mod.data(), ws.data());
else
bigint_mod_sub(mutable_data(), s.data(), mod.data(), mod_sw, ws.data());
#endif