--- id: pyaes version: "1.6.1" license: License :: OSI Approved :: MIT License license_treatment: permissive maintenance: dormant --- # pyaes — Pure-Python Implementation of the AES block-cipher and common modes of operation License: permissive · Maintenance: dormant · Downloads: 3.4M/mo ## 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 above — verify before relying. Pure-Python implementation of AES encryption with support for all key sizes and common modes of operation (CBC, CFB, CTR, ECB, OFB), plus stream and block-level APIs for encrypting and decrypting data. 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 pip install pyaes uv add pyaes poetry add pyaes ## Installing pyaes 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. 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) 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. 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: License :: OSI Approved :: MIT License (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 3.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags AES encryption python, pure python cryptography, block cipher modes CBC CTR, stream encryption library, AES key derivation, symmetric encryption no dependencies, python encryption algorithm, legacy-crypto, pure-python, no-dependencies [View on SkillFed](https://skillfed.io/packages/pyaes) · [View on PyPI](https://pypi.org/project/pyaes/)