Giter Site home page Giter Site logo

teschlg / kryptools Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 136 KB

Implementation of some basic algorithms relevant for cryptography.

License: MIT License

Python 100.00%
cryptography lll-reduction number-theory prime-numbers quadratic-sieve lattice lattice-based-crypto discrete-logarithm factorization-algorithm post-quantum-cryptography

kryptools's Introduction

kryptools

Gerald Teschl [email protected]

This package was written for my course on cryptography. Consequently its intention is mainly educational, that is, to show how basic algorithms are implemented. In particular, you are welcome to read (and modify) the source. Any suggestions on how to make the code more readable or make it better are welcome. However, my main goal is to keep it simple and readability will be preferred over small speed improvements.

It does not require any external libraries.

The tools contained are:

  • number theory: sqrt modulo primes, Jacobi/Legendre symbol, Chinese Remainder Theorem, continued fractions, etc.

  • primes: Sieve of Erathostenes, primality tests, generation of random safe/strong primes

  • solvers for discrete logarithms (naive, Pollard rho, Shanks baby step/giant step, index calculus, quadratic sieve)

  • integer factorization (Fermat, Pollard p-1, Lenstra's ECM, Dixon, basic quadratic sieve)

  • elliptic curves (Weierstrass form), group operations, order, discrete logarithms

  • linear algebra: Hermite normal form, Gram-Schmidt

  • lattices: Hadamard ratio, Babai rounding/nearest plane algorithm, lattice reduction (Lenstra-Lenstra-Lovaz)

  • Matrix: a class for Matrices (inverse, det, reduced echelon form, etc.)

  • Poly: a class for polynomials (division, modulo)

  • Zmod: a class for the ring of integers modulo an integer

Documentation can be found in the jupyter notebook (mostly done, but might not contain everything: use the force, read the source).

kryptools's People

Contributors

teschlg 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.