Giter Site home page Giter Site logo

bch's Introduction

bch

bch is a simple implementation of binary BCH error-correcting code, written in Python 3.6. Polynomial operations are implemented using SymPy library. It was made as a homework project for "Error-Correcting Codes and Cryptography" workshops on Faculty of Mathematics and Information Science of Warsaw University of Technology.

This package was made as an excercise. It shouldn't be used anywhere to secure data.

How to run?

Install Python 3.x

You should have Python 3.x installed on your system. To do this on Fedora OS you need to execute

sudo dnf install python3

Install dependencies

You should have SymPy, NumPy and docopt package installed.

pip3 install --user sympy
pip3 install --user numpy
pip3 install --user docopt

How to use it?

To print help screen execute bch.py script with -h argument.

$ ./bch.py -h
BCH v0.1

Usage:
  bch.py [options] enc CODE_FILE [FILE]
  bch.py [options] dec CODE_FILE [FILE]
  bch.py [options] gen N B D CODE_FILE
  bch.py (-h | --help)
  bch.py --version

Options:
  -b, --block        Interpret input/output as
                       block stream.
  -i, --poly-input   Interpret input as polynomial
                       represented by integer array.
  -o, --poly-output  Interpret output as polynomial
                       represented by integer array.
  -h, --help         Show this screen.
  --version          Show version.
  -d, --debug        Debug mode.
  -v, --verbose      Verbose mode.

As you can see there are few commands:

  • enc - encode file using BCH code
  • dec - decode file using BCH code
  • gen - generate BCH code with given parameters

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.