Skip to main content
https://travis-ci.org/marcobellaccini/pyAesCrypt.svg?branch=master

About pyAesCrypt

pyAesCrypt is a Python 3 file-encryption module and script that uses AES256-CBC to encrypt/decrypt files.

pyAesCrypt is compatible with the AES Crypt file format (version 2).

The script is Free Software, released under the Apache License, Version 2.0.

pyAesCrypt is brought to you by Marco Bellaccini - marco.bellaccini(at!)gmail.com.

IMPORTANT SECURITY NOTE: version 2 of the AES Crypt file format does not authenticate the “file size modulo 16” byte. This implies that an attacker with write access to the encrypted file may alter the corresponding plaintext file size by up to 15 bytes.

NOTE: there is no low-level memory management in Python, hence it is not possible to wipe memory areas were sensitive information was stored.

Module usage example

Here is an example showing encryption and decryption of a file:

import pyAesCrypt
# encryption/decryption buffer size - 64K
bufferSize = 64 * 1024
password = "foopassword"
# encrypt
pyAesCrypt.encryptFile("data.txt", "data.txt.aes", password, bufferSize)
# decrypt
pyAesCrypt.decryptFile("data.txt.aes", "dataout.txt", password, bufferSize)

Script usage examples

Encrypt file test.txt in test.txt.aes:

pyAesCrypt -e test.txt

Decrypt file test.txt.aes in test.txt:

pyAesCrypt -d test.txt.aes

Encrypt file test.txt in test2.txt.aes:

pyAesCrypt -e test.txt -o test2.txt.aes

Decrypt file test.txt.aes in test2.txt:

pyAesCrypt -d test.txt.aes -o test2.txt

Release files for pyAesCrypt 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyAesCrypt 0.2
File Size Uploaded
pyAesCrypt-0.2.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyAesCrypt 0.2
File Interpreter ABI Platform
pyAesCrypt-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / pyAesCrypt-0.2.tar.gz

Download URL pyAesCrypt-0.2.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d475ebea8170908e33e20f0ebba0a28287268701b8e46e085f49a9da8ed0f60
BLAKE2b-256 checksum
How to use checksums
ef41f4d46e85ea3a2d4c236dbc2eaabe1b6250c16a0a635cbaca5842d17eb9b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyAesCrypt-0.2-py3-none-any.whl

Download URL pyAesCrypt-0.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94d421a8cab20f2ad343713dc2538fbd0c41903aeab977719eaa52203f395aab
BLAKE2b-256 checksum
How to use checksums
5ec9a32229d93c1e2a855d886f294304bb7f4bd5b77c41fca10182ed9c579e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

6.1.1

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.0.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4

2 release files

0.3.1

2 release files

0.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page