diff options
author | Jack Lloyd <[email protected]> | 2018-03-15 12:42:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-15 12:42:45 -0400 |
commit | 680ac534d5365b7d503340b712df83d3ea8c991f (patch) | |
tree | 3b26fd7758013f8d361f666ad0f459fb92694742 /src/lib/math/numbertheory/monty.cpp | |
parent | 16355dfa26222c761b2b35c50e780ad518ccaf3f (diff) |
Add Montgomery multiexponentiation
Diffstat (limited to 'src/lib/math/numbertheory/monty.cpp')
-rw-r--r-- | src/lib/math/numbertheory/monty.cpp | 6 |
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) { |