GitHunt
AG

A C++ library for algebra over GF(2)

GF2: A C++ library for algebra over GF(2)

Github Actions Build Status
Coverity Static Analysis
Coverage Analysis

What is GF2?

GF2 is a C++ library which maintains the following algebraic structures
over GF(2):

  • WW — binary words of arbitrary finite length;
  • ZZ — binary words as unsigned integers;
  • MP — multivariate polynomials over GF(2);
  • MI — ideals in multivariate polynomials rings over GF(2);
  • Func — various functions on binary words (including Boolean and vectorial Boolean).

GF2 extensively uses C++ templates.

Build

mkdir build
cd build
cmake [-DCMAKE_BUILD_TYPE={Release|Debug|Coverage|ASan|ASanDbg|MemSan|MemSanDbg|Check}] ..
make
[make test]
[make install]

Build types (Release by default):

License

GF2 is released under the terms of the MIT License.
See LICENSE for more information.

Languages

C++97.6%CMake1.3%C1.1%

Contributors

MIT License
Created July 7, 2016
Updated February 3, 2026