Skip to main content

AES (Advanced Encryption Standard) implementation in Python-3

Project description

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aes_python-1.5.5.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

AES_Python-1.5.5-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file aes_python-1.5.5.tar.gz.

File metadata

  • Download URL: aes_python-1.5.5.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for aes_python-1.5.5.tar.gz
Algorithm Hash digest
SHA256 68e3b922f1e2c2d44c97fae0c94272fabbdd57b6423f57ac577a6ae0e497c562
MD5 decc895d15c4f6873e5cf27cbed6424b
BLAKE2b-256 db017ef19c17429bced1bfd2e3890d80705dce84eb660fc6cb4dd8e9fd83e7e0

See more details on using hashes here.

File details

Details for the file AES_Python-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: AES_Python-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for AES_Python-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eb9d591dbb8b9a1baf74deff70ee3934b4d8dffbd8fd42e360c9bb2ee8bae500
MD5 47ac62fc4f4848c95084dca07ba0dbf2
BLAKE2b-256 94bcdbae30f0ca92a0c855d444416d201c5d5faab70bb4ff17c0ccceb19c1af7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page