Giter Club home page Giter Club logo

galois-field's Introduction

Simple Galois field library in C++

A very simple Galois field library for GF(2^8) and GF(p)

Short description

There are two separate libraries: the first one (gf2.h) is for handling typical GF(2^8) which is commonly used for standard Reed-Solomon coding. The second one (gfn.h) if for GF(p), where p is any 16-bit prime number.

Data representation

Galois (finite) field elements are represented as polynomial. For GF(2^8) there are polynomials of a degree lower than 8 and with coefficients being integers modulo 2 (they can have values either 0 or 1). These are stored as 8-bit bytes, where every bit is a polynomial coefficient. The LSB represents a coefficient for x^0, while the MSB - for x^7. This is a very common approach.

GF(p) is in fact GF(p^1). This means there are polynomials of a degree 0 with coefficients being integers modulo p. Effectively, all elements are just numbers.

Capabilites

  • Addition
  • Subtraction
  • Multiplication (using lookup tables or typical calculation)
  • Division
  • Power
  • Inverse
  • Prime number generation

Contributing

Any contributions are appreciated.

Authors

  • Piotr Wilkoń - Initial work - sq8vps

License

This project is licensed under the GPLv3 License - see the LICENSE.md file for details

galois-field's People

Contributors

sq8vps avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.