aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory/monty.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-15 12:42:45 -0400
committerJack Lloyd <[email protected]>2018-03-15 12:42:45 -0400
commit680ac534d5365b7d503340b712df83d3ea8c991f (patch)
tree3b26fd7758013f8d361f666ad0f459fb92694742 /src/lib/math/numbertheory/monty.cpp
parent16355dfa26222c761b2b35c50e780ad518ccaf3f (diff)
Add Montgomery multiexponentiation
Diffstat (limited to 'src/lib/math/numbertheory/monty.cpp')
-rw-r--r--src/lib/math/numbertheory/monty.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/math/numbertheory/monty.cpp b/src/lib/math/numbertheory/monty.cpp
index 41c01abb1..33d15de5b 100644
--- a/src/lib/math/numbertheory/monty.cpp
+++ b/src/lib/math/numbertheory/monty.cpp
@@ -301,6 +301,12 @@ Montgomery_Int Montgomery_Int::operator*(const Montgomery_Int& other) const
return Montgomery_Int(m_params, m_params->mul(m_v, other.m_v, ws), false);
}
+Montgomery_Int Montgomery_Int::mul(const Montgomery_Int& other,
+ secure_vector<word>& ws) const
+ {
+ return Montgomery_Int(m_params, m_params->mul(m_v, other.m_v, ws), false);
+ }
+
Montgomery_Int& Montgomery_Int::mul_by(const Montgomery_Int& other,
secure_vector<word>& ws)
{