An enhanced version of Rijndael encryption
Project description
Rijndael3D
Rijndael3D is my work-in-progress extension of the Rijndael cipher that works in 512-bit 4x4x4 blocks of bytes. This module uses new layer-based permutation algorithms together with modified versions of regular Rijndael components to utilize the 3 dimensional structure of blocks.
This module is programmed in pure Python, it implements finite-field arithmetic in GF(28) and is boosted by the numba module internally.
Cipher Specifications
- Key size: 512 bits
- Block size: 512 bits
- Number of rounds: 16 rounds
- Structure: substitution–permutation network
- Padding method: pseudo-randomized (seeded) padding using the SHA512 of the key.
- Supported modes: the current version of Rijndael3D supports the following modes;
ECB,CBC,CTR, andGCM.
Disclaimer
This module was built as a fun project to learn cryptography and cryptanalysis. It is not designed to withstand side channel attacks or other advanced cryptanalysis techniques.
Installation
This module is available only on PyPI, installation via pip:
pip install rijndael3d
Basic Usage
Because the block size is 512 bits, the keys and initialization vectors must all be in the matching size of 512 bits.
The basic usage of this module is as follows (CTR mode for example):
Importing the appropriate functions:
from rijndael3d.modes.ctr import ctr_encrypt, ctr_decrypt
Encrypting:
encrypted = ctr_encrypt(plaintext, key, iv)
Decrypting:
decrypted = ctr_decrypt(ciphertext, key, iv)
Advanced Usage
If you want to utilize the internal functions of this module or take a closer look at them, this is the section for you.
The functionality of this module are segmented into the appropriate files and directory:
block.py: All internal block manipulation functions.cipher.py: Round performing and single block encryption/decryption.constants.py: Contains all the constants used.debug_operations.py: Debug-related functions, not used in normal usage of the module.gf_arithmetic.py: The implementation for GF(28) arithmetic.key_schedule.py: The key scheduling algorithm.padding.py: The padding mechanism.utils.py: Utility functions.- The
modesdirectory that contains the code for each mode of operation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rijndael3d-1.1.1.tar.gz.
File metadata
- Download URL: rijndael3d-1.1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a686a930214a1542c33c2f4d70f13b18695606e60e2fd5321b41be9f8135a119
|
|
| MD5 |
e9de309ef7ceaf19e91938dbe88fa986
|
|
| BLAKE2b-256 |
cd8b2c202755d34005686ebe092b5ac9d7913fce8fc68f68b94ef0c7334747ca
|
Provenance
The following attestation bundles were made for rijndael3d-1.1.1.tar.gz:
Publisher:
pypi-publish.yml on Jebbex1/Rijndael3D
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rijndael3d-1.1.1.tar.gz -
Subject digest:
a686a930214a1542c33c2f4d70f13b18695606e60e2fd5321b41be9f8135a119 - Sigstore transparency entry: 348077447
- Sigstore integration time:
-
Permalink:
Jebbex1/Rijndael3D@838165cb86215d6f5de129f536aa3d4bfb5a8836 -
Branch / Tag:
refs/tags/1.1.1 - Owner: https://github.com/Jebbex1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@838165cb86215d6f5de129f536aa3d4bfb5a8836 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rijndael3d-1.1.1-py3-none-any.whl.
File metadata
- Download URL: rijndael3d-1.1.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d5be5c1cb2ee478c6e4f49435823f59a8c771bf7804aa4523082b6b1fb97a7
|
|
| MD5 |
8c43386b1e9975a0ffa5f354cfe5c4a5
|
|
| BLAKE2b-256 |
ca98efe7d5b1055edffba106391a8c508824f7c07eaf0b6eb56316e26e46ce94
|
Provenance
The following attestation bundles were made for rijndael3d-1.1.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on Jebbex1/Rijndael3D
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rijndael3d-1.1.1-py3-none-any.whl -
Subject digest:
d6d5be5c1cb2ee478c6e4f49435823f59a8c771bf7804aa4523082b6b1fb97a7 - Sigstore transparency entry: 348077504
- Sigstore integration time:
-
Permalink:
Jebbex1/Rijndael3D@838165cb86215d6f5de129f536aa3d4bfb5a8836 -
Branch / Tag:
refs/tags/1.1.1 - Owner: https://github.com/Jebbex1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@838165cb86215d6f5de129f536aa3d4bfb5a8836 -
Trigger Event:
release
-
Statement type: