MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / MontgomeryRepresentation

Method MontgomeryRepresentation

extra/yassl/taocrypt/src/integer.cpp:3794–3801  ·  view source on GitHub ↗

modulus must be odd

Source from the content-addressed store, hash-verified

3792
3793// modulus must be odd
3794MontgomeryRepresentation::MontgomeryRepresentation(const Integer &m)
3795 : ModularArithmetic(m),
3796 u((word)0, modulus.reg_.size()),
3797 workspace(5*modulus.reg_.size())
3798{
3799 RecursiveInverseModPower2(u.reg_.get_buffer(), workspace.get_buffer(),
3800 modulus.reg_.get_buffer(), modulus.reg_.size());
3801}
3802
3803const Integer& MontgomeryRepresentation::Multiply(const Integer &a,
3804 const Integer &b) const

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
get_bufferMethod · 0.45

Tested by

no test coverage detected