TezCrypto
TezCrypto is a fast and portable cryptography library for Python, written in Rust. It is a migration of the original TgCrypto library.
Features
- AES-256-CBC
- AES-256-CTR
- AES-256-IGE
Installation
pip install tezcrypto
Usage
import tezcrypto
import os
key = os.urandom(32)
iv = os.urandom(32)
data = os.urandom(64)
# IGE Mode
encrypted = tezcrypto.ige256_encrypt(data, key, iv)
decrypted = tezcrypto.ige256_decrypt(encrypted, key, iv)
assert data == decrypted
# CTR Mode
iv_ctr = os.urandom(16)
state = bytes(1) # Initial state
encrypted_ctr = tezcrypto.ctr256_encrypt(data, key, iv_ctr, state)
decrypted_ctr = tezcrypto.ctr256_decrypt(encrypted_ctr, key, iv_ctr, state)
assert data == decrypted_ctr
# CBC Mode
iv_cbc = os.urandom(16)
encrypted_cbc = tezcrypto.cbc256_encrypt(data, key, iv_cbc)
decrypted_cbc = tezcrypto.cbc256_decrypt(encrypted_cbc, key, iv_cbc)
assert data == decrypted_cbc
Development
To build and install locally:
# Install maturin
pip install maturin
# Build and install
maturin develop --features python
Testing
# Run Rust tests
cargo test
# Run Python validation
python validate.py
License
LGPL-3.0
maturin develop
Metadata
Release files for tezcrypto 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tezcrypto-0.1.0.tar.gz | 9.4 kB | Without provenance | Details for tezcrypto-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| tezcrypto-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | PyPy 3.11 | PyPy 3.11 7.3 | Linux glibc 2.17+ x86-64 | Details for tezcrypto-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| tezcrypto-0.1.0-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details for tezcrypto-0.1.0-cp37-abi3-win_amd64.whl |
| tezcrypto-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.17+ x86-64 | Details for tezcrypto-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| tezcrypto-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.7 | abi3 | macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 | Details for tezcrypto-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 1.1 MB
Release files / tezcrypto-0.1.0.tar.gz
| Download URL | tezcrypto-0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1569361946f5858bd1affdf900d7dfc5308792040928b5025c660065a585d55
|
|
BLAKE2b-256 checksum How to use checksums |
2435326cd262538af21cb8dbf517cdaa1692e1fad41fbd5baf890256a9c7f2e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tezcrypto-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tezcrypto-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 249.7 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
3c0a6a18ecefcc916b5d1249f25343d4b5dba68caaf2ca90c441b153769f3f58
|
|
BLAKE2b-256 checksum How to use checksums |
83f046b83dd4f63b16089ba28642680cba347f64e3df54e26e571e5481fb87d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tezcrypto-0.1.0-cp37-abi3-win_amd64.whl
| Download URL | tezcrypto-0.1.0-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 112.0 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d55d37259d938e6399c6a49167c08bfb4a108e8d0ab274b2d6cf28dfbd001046
|
|
BLAKE2b-256 checksum How to use checksums |
f6d5a376fd41c09245d0aa1bf6fec67697b497d2347dff8a34bb361a0c2466b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tezcrypto-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tezcrypto-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 250.7 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f88985e0040f975bd5ba9be521c54679cc854ce10a82d2d8c1b97d3ad1c580ef
|
|
BLAKE2b-256 checksum How to use checksums |
5bed81e375482b42e6329abebebd8479187e770d389a8d0a52d4e3417fe92e91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tezcrypto-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | tezcrypto-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 437.6 kB |
| Tags | CPython 3.7 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
98abc4a9c91e33e2bc568076cb9c73831bdc59738502bca31636c6012c6d16ea
|
|
BLAKE2b-256 checksum How to use checksums |
860cd15bfd9004628bf4dd0eb11b0a4ff024f3789a8a4d9fc405f8ac5a0ee72c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for tezcrypto 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.