16 table[2] = m_modulus ^ (a<<1);
22 table[3] = m_modulus ^ (a<<1);
25 #if CRYPTOPP_FAST_ROTATE(32) 27 word32 result = table[b&2];
29 for (
int i=29; i>=0; --i)
32 result = (result<<1) ^ table[(b&2) + (result>>31)];
35 return (b&1) ? result ^ a : result;
37 word32 result = table[(b>>30) & 2];
39 for (
int i=29; i>=0; --i)
40 result = (result<<1) ^ table[((b>>i)&2) + (result>>31)];
42 return (b&1) ? result ^ a : result;
57 while (!(g2 & 0x80000000))
71 if (g1 < g0 || ((g0^g1) < g0 && (g0^g1) < g1))
81 v2 = v0; v0 = v1; v1 = v2;
GF(2^32) with polynomial basis.
Utility functions for the Crypto++ library.
Element MultiplicativeInverse(Element a) const
T rotlFixed(T x, unsigned int y)
Performs a left rotate.
#define NAMESPACE_BEGIN(x)
Classes and functions for schemes over GF(2^32)
#define CRYPTOPP_ASSERT(exp)
void Multiply(word *R, word *T, const word *A, const word *B, size_t N)
T rotrFixed(T x, unsigned int y)
Performs a right rotate.
unsigned int BitPrecision(const T &value)
Returns the number of bits required for a value.