MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsOverflow

Method IsOverflow

src/crypto/muhash.cpp:126–133  ·  view source on GitHub ↗

Indicates whether d is larger than the modulus. */

Source from the content-addressed store, hash-verified

124
125/** Indicates whether d is larger than the modulus. */
126bool Num3072::IsOverflow() const
127{
128 if (this->limbs[0] <= std::numeric_limits<limb_t>::max() - MAX_PRIME_DIFF) return false;
129 for (int i = 1; i < LIMBS; ++i) {
130 if (this->limbs[i] != std::numeric_limits<limb_t>::max()) return false;
131 }
132 return true;
133}
134
135void Num3072::FullReduce()
136{

Callers 3

MultiplyMethod · 0.95
SquareMethod · 0.95
DivideMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected