Giter Club home page Giter Club logo

afit's Introduction

AFIT

The AFIT (Standing for Arithmetic for IT) project has for for aim to build first standard ciphering algorithms ; main aim being RSA and ElGamal cryptosystems. Among other things we hope that you'll have an first understanding of the difficulties underlying the need to use big enough integer on a physical architecture which, by definition, cannot handle infinitely big integers efficiently.

Notional content

Needed theoretical content shall necessarily include

  • Manipulating basic arithmetic operations and functions on natural numbers :

    • Quotient, modulo operations and euclidian division.
    • GCD computation and extended efficient GCD algorithm giving Bézout coefficients.
    • Being prime. Relative primality, Bézout Theorem.
  • Modular arithmetic :

    • Definition of modulo of an integer with respect to some given positive natural number. Equality of two integers modulo such a natural.
    • Compatibility of modulo operation to addition and multiplication.
    • Given an integer $n > 1$ the $\mathbb{Z}/n\mathbb{Z}$ notation and canonical representants.
    • Fermat's Little Theorem.
    • Chinese Remainder Theorem in practice.
    • Notion of inversibility and inverse of an element in $\mathbb{Z}/n\mathbb{Z}$. Relation to Bézout Theorem.
    • Order of an element in $\mathbb{Z}/n\mathbb{Z}$. Multiplicative generators of $\mathbb{Z}/n\mathbb{Z}$.
    • Extension of Fermat's Little Theorem to the case of a product of two primes.
  • Bit-wise operations :

    • Addition, substraction and multiplication and division of integers through their binary representation.

Stages

Project is structured to enable each and every single student to find themselves a working cryptosystem (as naive as it might be) by deadline.

  • Stage 1: Uses built-in int types. Implementing GCD, Bézout, (modular) exponentiations, primality and pseudo-primality tests, brute force generating primes with specific properties, encoding/decoding message, Caesar, RSA and ElGamal cryptosystem. A number of expected functions will have been implemented previously with possible light adaptations. ElGamal cryptosystem is potential extra ; needed maths are not accessible to all students.

  • Stage 2: Observe that built-in implementation doesn't enable any seriously sized exchange of information. Use non-size-predefined integers through OCaml lists as containers for $1$ and $0$ dummy bits. First bit being a sign bit. Implement addition, substraction, multiplication and integer division on new integer type. Re-implement first stage functions to enable RSA encryption. Execute code to generate cryposystem having a higher number of bits than built-in integer.

  • Stage 3: Observe that Stage 2 implementation is highly time consuming. Try out the use of a an efficient data structure available within the module Zarith implemeting big integers. This stage is mostly about reading documentation, understanding the alcotest testing framework and thoroughly testing your code.

Description of Root Directory

  • afit_file_*.pdf : Contains files correponsding to maths content made available for students, both in english and french.

  • Source : Containts .ml and .mli files corresponding to expected (hoped for) code to handout. It is organised by phase. Phases respectively corresponding to builtin, scalable and zarithing.

  • dune-project : metadata for dune project.

  • .gitignore : a gitignore file that avoids me having to deal with all your binaries.

  • README.md : this readme file.

afit's People

Contributors

toutane avatar

Watchers

 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.