MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / MontgomeryRepresentation

Method MontgomeryRepresentation

src/cryptlib/integer.cpp:2238–2245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2236}
2237
2238MontgomeryRepresentation::MontgomeryRepresentation(const Integer &m) // modulus must be odd
2239 : ModularArithmetic(m),
2240 u((word)0, modulus.reg.size),
2241 workspace(5*modulus.reg.size)
2242{
2243 assert(modulus.IsOdd());
2244 RecursiveInverseModPower2(u.reg, workspace, modulus.reg, modulus.reg.size);
2245}
2246
2247Integer MontgomeryRepresentation::Multiply(const Integer &a, const Integer &b) const
2248{

Callers

nothing calls this directly

Calls 2

IsOddMethod · 0.80

Tested by

no test coverage detected