Skip to main content

AES-Python: A Python implementation of the Advanced Encryption Standard (AES)

The AES-Python package is a Python implementation of the Advanced Encryption Standard (AES) using symmetric key cryptography. It supports two different modes of operation (ECB, CBC) and the key lengths 128, 256, 512 bit. This project was originally created as a school project using almost only built in python libraries, but has now been updated and adapted to more heavily really on the NumPy and galois packages. It has also been migrated to a more OOP focused structure. (The original school project can be seen in the legacy branch.)

Warning: This project is not intended to be used in any other use case than experimentation and educational use. No security is guaranteed for data encrypted or decrypted using this library, and it may very well contain multiple unaddressed security vulnerabilities.

Features

  • Implementation of the AES encryption and decryption processes.
  • Support for two different modes of operation: ECB, CBC.
  • Support for the three different key lengths included in the AES standard. (128, 192, 256 bit)
  • Key expansion and round key generation.
  • Encryption & decryption of individual files.
  • Encryption & decryption of python string objects.

Acknowledgements

The AES-Python project relies heavily on both the NumPy and galois packages in order to manage integer arrays and preform matrix operations and GF(2^8) finite field multiplication operations. This project would not have been possible without these libraries, so I would like to thank the developers of these projects.

Getting started

This is a short guide to help you get started.

Installation

You can install the latest version of AES-Python from PyPI using pip.

$ python3 -m pip install AES_Python

Usage

Now you can import it and use it in you projects. Below is a short example snippet of how to utilize the package.

from AES_Python import AES

# Initialize the AES object
aes = AES(r_mode="ECB", key="your-encryption-key")

# Encrypt the data
encrypted_data = aes.enc("your-data")

# Decrypt the data
decrypted_data = aes.dec("your-encrypted-data")

Metadata

Release files for AES-Python 1.5.5

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

Source distribution (sdist)

Source distribution for AES-Python 1.5.5
File Size Uploaded
aes_python-1.5.5.tar.gz 21.4 kB Details

Built distribution (wheel)

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

Total release size: 32.1 kB

Release files / aes_python-1.5.5.tar.gz

Download URL aes_python-1.5.5.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
68e3b922f1e2c2d44c97fae0c94272fabbdd57b6423f57ac577a6ae0e497c562
BLAKE2b-256 checksum
How to use checksums
db017ef19c17429bced1bfd2e3890d80705dce84eb660fc6cb4dd8e9fd83e7e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / AES_Python-1.5.5-py3-none-any.whl

Download URL AES_Python-1.5.5-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb9d591dbb8b9a1baf74deff70ee3934b4d8dffbd8fd42e360c9bb2ee8bae500
BLAKE2b-256 checksum
How to use checksums
94bcdbae30f0ca92a0c855d444416d201c5d5faab70bb4ff17c0ccceb19c1af7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.5.5 This release

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.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