Skip to main content

Implemenation of same basic algorithms used in cryptography.

Project description

kryptools

Gerald Teschl Gerald.Teschl@univie.ac.at

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kryptools-0.9.6.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kryptools-0.9.6-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

Details for the file kryptools-0.9.6.tar.gz.

File metadata

  • Download URL: kryptools-0.9.6.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for kryptools-0.9.6.tar.gz
Algorithm Hash digest
SHA256 8a1c8729f5139e328467bb3c58fc631b31184bdb0dd61288db5dbb4a280e9293
MD5 1248e8193a65690142e70cc75b18ad74
BLAKE2b-256 4edd961a7fbbfe2c4d294ca32d77ed88d6f3609d75266fd45dcfaca506f192d5

See more details on using hashes here.

File details

Details for the file kryptools-0.9.6-py3-none-any.whl.

File metadata

  • Download URL: kryptools-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for kryptools-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cce0e991e0c61dd6fcaf0ee63ac044b6e715a54ae11be658d97ce98e528f085f
MD5 a91c5ae63886b8a36512798433d2f5ea
BLAKE2b-256 85698cf41cb394c3a1630e31510627d62f8e7e0597ae81f94f5b45e0d46852b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page