skillfed

pyAesCrypt

Encrypt and decrypt files and streams in AES Crypt format (version 2)

pyaescrypt v6.1.1 215.8K downloads/30d#9,392 on PyPI247
Permissive license Apache License 2.0 DORMANT released

What it is and what it does

pyAesCrypt is a Python 3 module for encrypting and decrypting files and binary streams using AES256-CBC. It implements the AES Crypt file format (version 2) and can be used as both a library and a command-line tool. The module provides three main interfaces: file-level encryption/decryption, stream-oriented operations for handling large data, and in-memory encryption/decryption via BytesIO.

The package depends only on cryptography and installs with low friction. Maintenance is dormant—the last release was in November 2023. The documentation includes important security caveats: the AES Crypt format version 2 does not authenticate file size metadata, allowing potential tampering with plaintext length, and Python's lack of low-level memory management means sensitive data cannot be securely wiped from RAM.

Use it for:

  • Encrypt sensitive files before storing them in untrusted locations or cloud storage.
  • Decrypt files encrypted by the AES Crypt tool or other compatible implementations.
  • Build a file encryption feature into a Python application using password-based encryption.
  • Process large files or streams with custom buffer sizes to manage memory usage.
  • Perform in-memory encryption/decryption of binary data using BytesIO without touching the filesystem.

Worth the install?

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

Encrypts and decrypts files and binary streams using AES256-CBC, compatible with the AES Crypt file format (version 2).

Yes, if you need straightforward AES256-CBC file encryption compatible with the AES Crypt format and can accept dormant maintenance. The package is stable with no known vulnerabilities and handles the common case well. Install it if you are not expecting active security updates or bug fixes; avoid it if you require ongoing support or are encrypting data where file-size tampering is a threat model.

Install

pyaescrypt on PyPI

pip

pip install pyaescrypt

uv

uv add pyaescrypt

poetry

poetry add pyaescrypt

Installing pyAesCrypt

Before you install

Low install friction with a single runtime dependency (cryptography). Maintenance is dormant—last release was in November 2023—so expect no active bug fixes or security updates, though the repository remains public and unarchived.

License in practice

Released under Apache License 2.0 (permissive), so you can use it freely in commercial and private projects with minimal legal constraints.

Quickstart

import pyAesCrypt
password = "please-use-a-long-and-random-password"
pyAesCrypt.encryptFile("data.txt", "data.txt.aes", password)
pyAesCrypt.decryptFile("data.txt.aes", "dataout.txt", password)

Version 2 of the AES Crypt file format does not authenticate the file size modulo 16 byte, so an attacker with write access to the encrypted file may alter the plaintext file size by up to 15 bytes. Python has no low-level memory management, so sensitive information cannot be wiped from memory.

Verify before relying

  • Whether dormant maintenance status poses a practical risk for your use case, given no known vulnerabilities are currently recorded.
  • Performance characteristics and suitability for large files or high-throughput scenarios.
  • Current real-world adoption and whether the AES Crypt format version 2 limitations are acceptable for your threat model.

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — cryptography
Maintenance dormant — 1,007 days since the last release
Last repo commit
First released
Downloads 215,839/month — #9,392 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyAesCrypt-6.1.1-py3-none-any.whl

Keywords: AES, Crypt, encrypt, decrypt

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: SecurityTopic :: Security :: CryptographyTopic :: Utilities

Tags

AES file encryptionencrypt decrypt files pythonAES256 CBC encryptionfile encryption moduleAES Crypt formatbinary stream encryptionpassword-based file encryption
file-encryptionaes-crypt-format

More Utilities packages