AES Encryption Package
A Python package for AES (Advanced Encryption Standard) encryption and decryption, supporting AES-128, AES-192, and AES-256 bit encryption. This package is designed with a modular structure to make it easy to integrate into your projects and extend for custom requirements.
Features
- Encryption and Decryption: Securely encrypt and decrypt data using AES with three different key lengths:
- AES-128: 128-bit key size
- AES-192: 192-bit key size
- AES-256: 256-bit key size
- Key Expansion: Implements AES key schedule for efficient key derivation.
- Modular Design: Core components like
State,Word, andByteare reusable, simplifying extension or adaptation. - High Performance: Optimized implementation for fast encryption and decryption.
- Cross-Platform: Works seamlessly across Windows, macOS, and Linux systems.
Installation
Install the package using pip:
pip install aes_package
Usage
This package provides functions to perform encryption and decryption easily. Below are some usage examples:
Encrypting a Message
from aes_module import aes_128_encrypt
# Define your message and key
message = "This is a secret message"
key = "mysecurekey12345" # Must match the required key length
# Encrypt the message
encrypted_message = aes_128_encrypt(message, key)
print("Encrypted:", encrypted_message)
Decrypting a Message
from aes_module import aes_128_decrypt
# Decrypt the message
decrypted_message = aes_128_decrypt(encrypted_message, key)
print("Decrypted:", decrypted_message)
Available Functions
The following functions are provided in the package:
Encryption
aes_128_encrypt(message, key): Encrypt a message using AES-128.aes_192_encrypt(message, key): Encrypt a message using AES-192.aes_256_encrypt(message, key): Encrypt a message using AES-256.
Decryption
aes_128_decrypt(message, key): Decrypt a message encrypted with AES-128.aes_192_decrypt(message, key): Decrypt a message encrypted with AES-192.aes_256_decrypt(message, key): Decrypt a message encrypted with AES-256.
Testing
This package includes test cases to ensure reliability. You can run the tests using pytest:
-
Install
pytestif not already installed:pip install pytest
-
Run the tests:
pytest tests/
Requirements
- Python Version: The package requires Python 3.6 or later.
- Dependencies: No external dependencies are required beyond the Python standard library.
How AES Works
AES is a symmetric block cipher widely used in modern encryption. It works by processing data in fixed-size blocks (128 bits) and applying multiple rounds of substitutions, permutations, and mathematical transformations.
Key Lengths
- AES-128: Uses a 128-bit key (10 rounds of encryption).
- AES-192: Uses a 192-bit key (12 rounds of encryption).
- AES-256: Uses a 256-bit key (14 rounds of encryption).
Contributing
We welcome contributions to improve the package! To contribute:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes with descriptive messages.
- Push the branch and submit a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
Special thanks to all contributors and the cryptography community for their continued development of secure encryption standards.
Metadata
Release files for aes-package 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aes_package-0.2.tar.gz | 8.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aes_package-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / aes_package-0.2.tar.gz
| Download URL | aes_package-0.2.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06c89804a471e4a02fb76b369ce49864ab3d421ec06e6aceb6cfd9a2696348fb
|
|
BLAKE2b-256 checksum How to use checksums |
c1caf73ebb07a6f434cd4da4be5a5f31e70fc83aea72e96a586b1e7096f0b551
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.4
|
Release files / aes_package-0.2-py3-none-any.whl
| Download URL | aes_package-0.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a0711f29f4ae9b978dc6daab0ecf5a68b0108268587e03fefa1238af6a7379d
|
|
BLAKE2b-256 checksum How to use checksums |
44e85413d8998369403342f382e087e8d57994fe3be0e7c56d91cc9a16c6da55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.4
|
Security for aes-package 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.