Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.
/ ff-libc Public archive

C library that provides a set of operations for elements of Galois field.

License

Notifications You must be signed in to change notification settings

artem-burashnikov/ff-libc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ff-libc

Build status MIT License

Overview

This is a C library which prorvides arithmetic operations in finite fields, also known as Galois fields.

Project structure

ff-libc/
├── src/
│   └── (source files)
│
├── tests/
│    └── (test files)
│
├── CMakeLists.txt
├── LICENSE
└── README.md

Features

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

Getting Started

Prerequisites

  • CMake (version 3.10 or higher)
  • GCC

Building

Open the terminal and follow these steps:

  1. Clone the repository:

    git clone git@github.com:artem-burashnikov/ff-libc.git
  2. Navigate to the project root:

    cd ff-libc
  3. Generate Makefile using CMake:

    mkdir build && cd build;
    cmake ..
  4. Build a static library:

    cmake --build . --clean-first

Licenses

The project is licensed under an MIT License.