MCPcopy Create free account
hub / github.com/LUX-Core/lux / AtomicInverseModPower2

Function AtomicInverseModPower2

src/cryptopp/integer.cpp:126–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126static word AtomicInverseModPower2(word A)
127{
128 CRYPTOPP_ASSERT(A%2==1);
129
130 word R=A%8;
131
132 for (unsigned i=3; i<WORD_BITS; i*=2)
133 R = R*(2-R*A);
134
135 CRYPTOPP_ASSERT(R*A==1);
136 return R;
137}
138
139// ********************************************************
140

Callers 1

integer.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected