Git Product home page Git Product logo

cryptography's Introduction

Cryptography

Number theory module

Module contains functions used for number theory problems in cryprography.
Algorithms:

  1. Prime numbers test (Miller-Rabin)
  2. greatest common divisor - gcd
  3. multiplicative inverse mod n
  4. Euler's function
  5. matrix inverse mod n
  6. primitive root mod n

Classic chipers

  1. Cesar chiper
  2. Hill chiper
  3. Affine chiper

DES function f

Implementation of f function from DES using S-boxes. This function is used for 16 iterations in DES algorithm. Function f takes 2 array arguments A and J , the first one is 32 bits and the second is 48 bits long.
There are 4 stages of calculating this function output.
1.The first argument A is expanded with expand function E , such that it becomes array E(A) of the 48 bits.
2.B = E(A) XOR J = B1B2...B8
3.For each Bj using S-box Sj , Cj = Sj(Bj) is computed.
4.f(A,J) = P(C1...C8) where P is final permutation.

El Gamal chiper

Example of asymetric cryptosystem based on public-key cryptography. It is based on difficulty to solve discrete-logarithm problem in multiplicaition group of remainders mod p (p is prime number).This cryptosystem can be defined over any cyclic group G. The security depends on properties of chosen group G.

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.