skillfed

cryptg

Cryptographic utilities for Telegram.

cryptg v0.6.0 192.6K downloads/30d#9,860 on PyPI98
Permissive license CC0 Active released

What it is and what it does

cryptg is a compiled Python extension that exposes AES-IGE (AES in Infinite Garble Extension mode), the encryption cipher used by Telegram's MTProto protocol. It wraps Rust implementations to provide fast, native access to this uncommon cipher mode from Python code. The package is designed for libraries and applications that need to communicate with the Telegram API and handle its cryptographic operations directly.

The package requires Python 3.11 or later and is distributed as precompiled wheels for common architectures (x86_64, aarch64, Windows, macOS). It has no runtime Python dependencies, making installation straightforward on supported platforms. The wrapper itself is released under CC0 (public domain), though the underlying Rust dependencies have their own license terms that should be reviewed.

Use it for:

  • Implementing Telegram client libraries that need to encrypt/decrypt MTProto messages
  • Building Telegram bots or API wrappers that handle low-level protocol encryption
  • Integrating Telegram protocol support into applications requiring direct API communication
  • Testing or reverse-engineering Telegram's encryption layer in security research

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

cryptg provides a native Python extension that implements AES-IGE encryption, the cipher mode used by Telegram's MTProto protocol.

Yes, if you are building or maintaining a library that communicates with Telegram's API and needs native AES-IGE support. The package is actively maintained, has no known vulnerabilities, and offers permissive licensing. Install friction is moderate due to compilation requirements, but prebuilt wheels cover common platforms. Not relevant for general-purpose cryptography work.

Install

cryptg on PyPI

pip

pip install cryptg

uv

uv add cryptg

poetry

poetry add cryptg

Installing cryptg

Before you install

Medium install friction due to compiled wheels for multiple Python versions and platforms. Actively maintained with recent commits and no known vulnerabilities.

License in practice

Licensed under CC0 (public domain), permitting unrestricted use. Rust dependencies carry their own licenses, which should be reviewed separately.

Quickstart

pip install cryptg
import cryptg
# Use cryptg functions for AES-IGE encryption/decryption with Telegram API

Requires Python 3.11 or later; prebuilt wheels available for common platforms but compilation may be needed on unsupported architectures.

Verify before relying

  • Specific AES-IGE API surface and function signatures not detailed in excerpt
  • Performance characteristics relative to pure-Python or other cryptography libraries
  • Rust dependency versions and their individual license terms

Package facts

License CC0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 124 days since the last release
Last repo commit
First released
Downloads 192,601/month — #9,860 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cryptg-0.6.0-cp310-cp310-macosx_11_0_arm64.whl; cryptg-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl; cryptg-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl; cryptg-0.6.0-cp310-cp310-win32.whl; cryptg-0.6.0-cp310-cp310-win_amd64.whl; cryptg-0.6.0-cp311-cp311-macosx_11_0_arm64.whl; cryptg-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl; cryptg-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl; cryptg-0.6.0-cp311-cp311-win32.whl; cryptg-0.6.0-cp311-cp311-win_amd64.whl; cryptg-0.6.0-cp312-cp312-macosx_11_0_arm64.whl; cryptg-0.6.0-cp312-cp312-manylinux_2_28_aarch64.whl; cryptg-0.6.0-cp312-cp312-manylinux_2_28_x86_64.whl; cryptg-0.6.0-cp312-cp312-win32.whl; cryptg-0.6.0-cp312-cp312-win_amd64.whl; cryptg-0.6.0-cp313-cp313-macosx_11_0_arm64.whl; cryptg-0.6.0-cp313-cp313-manylinux_2_28_aarch64.whl; cryptg-0.6.0-cp313-cp313-manylinux_2_28_x86_64.whl; cryptg-0.6.0-cp313-cp313t-macosx_11_0_arm64.whl; cryptg-0.6.0-cp313-cp313t-manylinux_2_28_aarch64.whl

Keywords: telegram, crypto, cryptography, mtproto, aes

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: CC0 1.0 Universal (CC0 1.0) Public Domain DedicationProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Security :: Cryptography

Tags

telegram encryptionaes-ige ciphermtproto cryptographytelegram api cryptoaes mode implementationtelegram protocol encryption
telegrammtproto

More Cryptography packages