1 #ifndef CRYPTOPP_GF2_32_H 2 #define CRYPTOPP_GF2_32_H 6 NAMESPACE_BEGIN(CryptoPP)
12 typedef word32 Element;
13 typedef int RandomizationParameter;
15 GF2_32(word32 modulus=0x0000008D) : m_modulus(modulus) {}
20 bool Equal(Element a, Element b)
const 23 Element Identity()
const 26 Element Add(Element a, Element b)
const 29 Element& Accumulate(Element &a, Element b)
const 32 Element Inverse(Element a)
const 35 Element Subtract(Element a, Element b)
const 38 Element& Reduce(Element &a, Element b)
const 41 Element Double(Element a)
const 44 Element MultiplicativeIdentity()
const 47 Element Multiply(Element a, Element b)
const;
49 Element
Square(Element a)
const 50 {
return Multiply(a, a);}
52 bool IsUnit(Element a)
const 55 Element MultiplicativeInverse(Element a)
const;
57 Element Divide(Element a, Element b)
const 58 {
return Multiply(a, MultiplicativeInverse(b));}
GF(2^32) with polynomial basis.
interface for random number generators
virtual word32 GenerateWord32(word32 a=0, word32 b=0xffffffffL)
generate a random 32 bit word in the range min to max, inclusive