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](Fix this link!!!!) 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.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

AES_Python-1.5.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aes_python-1.5.1.tar.gz
  • Upload date:
  • Size: 17.6 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.1.tar.gz
Algorithm Hash digest
SHA256 66479c92f482ef222ddedf1b1832e8755e541e0ebbf7985cf1ec05155f87982d
MD5 7d7dbdf14769598912a1b67dff5e85ea
BLAKE2b-256 6c78292bfd52c82b8d974a6b0c1cdf29194c54d186477cb045c4fac283401c9d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: AES_Python-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e20440ec831d636292b7a1f4360375277ad60e0a9dfb21e1a02a9c3e4a2817ab
MD5 1c058858737b6688ea78005730ea40ee
BLAKE2b-256 b0be176ab551710813ab82428f88a0c1db3e7e43ade71e8e295f2df050dd06c9

See more details on using hashes here.

Supported by

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