This is a C library which prorvides arithmetic operations in finite fields, also known as Galois fields.
ff-libc/
├── src/
│ └── (source files)
│
├── tests/
│ └── (test files)
│
├── CMakeLists.txt
├── LICENSE
└── README.md
A field can be initialized by defining the underlying structure or by passing an irreducible polynomial along with a field characteristic to the initializer.
Validation (valid irreducible polynomial, valid prime number) of arguments is not performed.
Polynomial can be initialized seperately. Coefficients are stored in little-endian order.
- Basic arithmetic operations modulo Irreducible polynomial:
- GF_elem_sum
- GF_elem_diff
- GF_elem_prod
- GF_elem_div
- GF_elem_get_complement
- GF_elem_get_neutral
- GF_elem_get_unity
- GF_elem_get_inverse
- CMake (version 3.10 or higher)
- GCC
Open the terminal and follow these steps:
-
Clone the repository:
git clone git@github.com:artem-burashnikov/ff-libc.git
-
Navigate to the project root:
cd ff-libc
-
Generate Makefile using CMake:
mkdir build && cd build; cmake ..
-
Build a static library:
cmake --build . --clean-first
The project is licensed under an MIT License.