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.
Warning These tools are intended for experimenting with cryptographic algorithms. They are not intended for use in real applications.
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, Pollard rho, 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
-
GF2: a class for Galois fields GF(2^n)
-
BlockCipher: a class implementing the usual modes of operation (ECB, CBC, GCM, etc.)
-
AESCipher: individual AES operations
-
DESCipher: individual DES operations
Documentation can be found in the jupyter notebook (mostly done, but might not contain everything: use the force, read the source).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kryptools-0.9.15.tar.gz.
File metadata
- Download URL: kryptools-0.9.15.tar.gz
- Upload date:
- Size: 57.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7127f2539f8929967189fa0ac3a56b8337257113cb61ccb67f345f693d6eed2a
|
|
| MD5 |
3d992cec034e7b207d29b6ce1b99e471
|
|
| BLAKE2b-256 |
e01d2875cc6d8fee957f84729d7a6506703b28e5fcfbd2814c7f7dbb293b2dc8
|
Provenance
The following attestation bundles were made for kryptools-0.9.15.tar.gz:
Publisher:
python-publish.yml on teschlg/kryptools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kryptools-0.9.15.tar.gz -
Subject digest:
7127f2539f8929967189fa0ac3a56b8337257113cb61ccb67f345f693d6eed2a - Sigstore transparency entry: 155405053
- Sigstore integration time:
-
Permalink:
teschlg/kryptools@9c1c55de62a6347c69e5fa126885dad79c652a14 -
Branch / Tag:
refs/tags/v0.9.15 - Owner: https://github.com/teschlg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9c1c55de62a6347c69e5fa126885dad79c652a14 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kryptools-0.9.15-py3-none-any.whl.
File metadata
- Download URL: kryptools-0.9.15-py3-none-any.whl
- Upload date:
- Size: 60.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25bc84e65252646b1682d110014dce0709c36507d69de4ebf525b90194f79616
|
|
| MD5 |
1c1ae1b09d451cd1eee798f2df28e077
|
|
| BLAKE2b-256 |
59d5484aea23f0aa3bc5466e96dc57f496311ce1d054e70bbcc312ed3e9dfc4a
|
Provenance
The following attestation bundles were made for kryptools-0.9.15-py3-none-any.whl:
Publisher:
python-publish.yml on teschlg/kryptools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kryptools-0.9.15-py3-none-any.whl -
Subject digest:
25bc84e65252646b1682d110014dce0709c36507d69de4ebf525b90194f79616 - Sigstore transparency entry: 155405054
- Sigstore integration time:
-
Permalink:
teschlg/kryptools@9c1c55de62a6347c69e5fa126885dad79c652a14 -
Branch / Tag:
refs/tags/v0.9.15 - Owner: https://github.com/teschlg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9c1c55de62a6347c69e5fa126885dad79c652a14 -
Trigger Event:
release
-
Statement type: