1 #ifndef CRYPTOPP_GF2_32_H 2 #define CRYPTOPP_GF2_32_H 14 typedef word32 Element;
15 typedef int RandomizationParameter;
17 GF2_32(word32 modulus=0x0000008D) : m_modulus(modulus) {}
22 bool Equal(Element a, Element b)
const 25 Element Identity()
const 28 Element Add(Element a, Element b)
const 31 Element& Accumulate(Element &a, Element b)
const 34 Element Inverse(Element a)
const 37 Element Subtract(Element a, Element b)
const 40 Element& Reduce(Element &a, Element b)
const 43 Element Double(Element a)
const 44 {CRYPTOPP_UNUSED(a);
return 0;}
46 Element MultiplicativeIdentity()
const 49 Element Multiply(Element a, Element b)
const;
51 Element
Square(Element a)
const 52 {
return Multiply(a, a);}
54 bool IsUnit(Element a)
const 57 Element MultiplicativeInverse(Element a)
const;
59 Element Divide(Element a, Element b)
const 60 {
return Multiply(a, MultiplicativeInverse(b));}
GF(2^32) with polynomial basis.
Utility functions for the Crypto++ library.
virtual word32 GenerateWord32(word32 min=0, word32 max=0xffffffffUL)
Generate a random 32 bit word in the range min to max, inclusive.
Abstract base classes that provide a uniform interface to this library.
Interface for random number generators.
Classes and functions for secure memory allocations.
Crypto++ library namespace.