Install & Compatibility
Where this runs
tested against v0.5.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
encrypt_ige
✓ from cryptg import encrypt_ige
MTProto IGE encryption
decrypt_ige
✓ from cryptg import decrypt_ige
MTProto IGE decryption
encrypt_aes_ctr
✓ from cryptg import encrypt_aes_ctr
AES-CTR encryption
decrypt_aes_ctr
✓ from cryptg import decrypt_aes_ctr
AES-CTR decryption
generate_key
✓ from cryptg import generate_key
Generate AES key
aes_ige_encrypt
✓ from cryptg import aes_ige_encrypt
✗ from cryptg import ige_encrypt
Correct name includes aes_ prefix
aes_ige_decrypt
✓ from cryptg import aes_ige_decrypt
✗ from cryptg import ige_decrypt
Correct name includes aes_ prefix
Basic IGE encryption/decryption with random key
from cryptg import encrypt_ige, decrypt_ige, generate_key
key = generate_key() # 32 bytes for AES-256
iv = bytes(32)
plaintext = b'Hello Telegram'
encrypted = encrypt_ige(plaintext, key, iv)
decrypted = decrypt_ige(encrypted, key, iv)
print(decrypted)
Errors
Common errors & fixes
ImportError: cannot import name 'ige_encrypt' from 'cryptg'
The function was renamed to `aes_ige_encrypt` in newer versions.
fixUse `from cryptg import aes_ige_encrypt`
ValueError: key must be 32 bytes long
Supplied key size is not 32 bytes (AES-256 requirement).
fixUse `generate_key()` or provide exactly 32 bytes.
cryptg requires Python >=3.11
Trying to install cryptg 0.6.0 on an older Python version.
fixUpgrade to Python 3.11+ or install cryptg<0.6.0 (e.g., pip install cryptg==0.5.4).
Upgrade
Version history
0.6.0latest on PyPI · released Apr 12, 2026
Audit
Dependencies
No dependency data recorded yet.