pyaes
Pure-Python Implementation of the AES block-cipher and common modes of operation
Decision gist · record as of 2026-08-14
No, unless you are maintaining legacy code already using pyaes or working in a constrained environment where compiled cryptography libraries are unavailable. The package is dormant (last release 2017-09-20) with no active security maintenance. For new projects, use a maintained alternative like cryptography or PyCryptodome, which offer active security updates and better performance. The lack of recent updates creates risk if vulnerabilities are discovered.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Keys must be exactly 16, 24, or 32 bytes; input must be bytes, not strings in Python 3.
- Modes like CBC require an initialization vector (IV) of 16 bytes.
- High install friction: the package is dormant (last release 2017-09-20, last commit 2024-01-17) with no runtime dependencies but a source distribution only.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2017-09-20 (3250 days) · last repo commit 2024-01-17 · 471 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,364,960 downloads/mo, #2,649 on PyPI
Alternatives
Verify before relying
import pyaes
key = b'This_key_for_demo_purposes_only!'
aes = pyaes.AESModeOfOperationCTR(key)
plaintext = b'Text may be any length you wish'
ciphertext = aes.encrypt(plaintext)
aes = pyaes.AESModeOfOperationCTR(key)
decrypted = aes.decrypt(ciphertext)- Whether the package has received any security audits or is suitable for production cryptographic use
- Current compatibility with modern Python versions (3.10+) given the dormant maintenance status
- Whether pure-Python performance is acceptable for high-throughput encryption workloads
What it is and what it does
pyaes is a pure-Python implementation of the AES block cipher and its standard modes of operation. It provides no external dependencies and works by accepting keys of 128, 192, or 256 bits and encrypting/decrypting data using CBC, CFB, CTR, ECB, or OFB modes. The package includes low-level block cipher access for custom implementations and higher-level APIs (BlockFeeder, Encrypter/Decrypter, stream functions) to handle variable-length data and file I/O without manual padding.
The library is useful when you need AES encryption in pure Python without compiled dependencies, such as in restricted environments or for educational purposes. However, the package has been dormant since 2017 with no recent security updates or maintenance, making it a legacy choice. For new projects requiring cryptographic guarantees, modern alternatives with active maintenance are generally preferred.
Use it for
- Encrypt sensitive configuration files or credentials in Python applications where external C libraries cannot be installed
- Implement custom encryption workflows using low-level block cipher access or specific AES modes not available in other libraries
- Decrypt legacy data encrypted with pyaes in existing systems that cannot be easily migrated
- Educational exploration of AES and block cipher modes of operation in a readable, pure-Python implementation
- Stream encryption of large files using the built-in Encrypter/Decrypter or stream APIs without loading entire files into memory
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining legacy code already using pyaes or working in a constrained environment where compiled cryptography libraries are unavailable.
The package is dormant (last release 2017-09-20) with no active security maintenance. For new projects, use a maintained alternative like cryptography or PyCryptodome, which offer active security updates and better performance. The lack of recent updates creates risk if vulnerabilities are discovered.
Install
pyaes on PyPI
Before you install
High install friction: the package is dormant (last release 2017-09-20, last commit 2024-01-17) with no runtime dependencies but a source distribution only. Maintenance status suggests no active development or security updates.
Keys must be exactly 16, 24, or 32 bytes; input must be bytes, not strings in Python 3. Modes like CBC require an initialization vector (IV) of 16 bytes.
License in practice
MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
import pyaes
key = b'This_key_for_demo_purposes_only!'
aes = pyaes.AESModeOfOperationCTR(key)
plaintext = b'Text may be any length you wish'
ciphertext = aes.encrypt(plaintext)
aes = pyaes.AESModeOfOperationCTR(key)
decrypted = aes.decrypt(ciphertext)
Verify before relying
- Whether the package has received any security audits or is suitable for production cryptographic use
- Current compatibility with modern Python versions (3.10+) given the dormant maintenance status
- Whether pure-Python performance is acceptable for high-throughput encryption workloads
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 3,250 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,364,960 / month, #2,649 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseTopic :: Security :: Cryptography |
Evidence: pyaes-1.6.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “block cipher modes CBC CTR”
- pyaesPure-Python implementation of AES encryption with support for all key…
- TgCryptoTgCrypto provides fast C-based implementations of AES-256 encryption…
- twofishProvides Python bindings to the Twofish block cipher for encrypting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Cryptography packages
Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.
cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.
Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.
PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.
See also aes-pkcs5 · pyAesCrypt · pyscrypt · pywidevine · py3rijndael · twofish · xxtea · pyDes · http-ece · miscreant