gf2poly 0.1.0

GF(2) polynomial arithmetic
Documentation
  • Coverage
  • 85.71%
    30 out of 35 items documented5 out of 31 items with examples
  • Size
  • Source code size: 109.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.89 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • 8051Enthusiast/gf2poly
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 8051Enthusiast

gf2poly

This rust crate provides a Gf2Poly type which implements polynomial arithmetic over GF(2). It links against the gf2x C library and care is taken to be asymptotically efficient. For example, multiplication is n log n (because the gf2x implementation is), and as a result, division can also be implemented in n log n. This crate also implements a fast gcd in n log² n time and a basic implementation of factorization.

Building

This crate requires the gf2x library to be installed. It can either be installed through a package manager if you're lucky (but note that this is going to be a slow version because distro maintainers are generally conservative in what CPU features they enable), or it can be compiled using a release from INRIA's gitlab.

gf2poly provides two environment variables for controlling the linking:

  • GF2POLY_STATIC_LIB: If this is 1, gf2x will be linked statically.
  • GF2POLY_LIBRARY_PATH: An additional path for the linker to search for static libraries at compile time.

License

The source files in this repository are licensed under MIT, but note that the gf2x library this crate links against is licensed either under the GPLv3 or the LGPLv2.1+, depending on the version you use.