Skip to main content

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
  • 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, and CTR. GCM is planned to be added soon.

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 modes directory 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

rijndael3d-1.0.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

rijndael3d-1.0.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file rijndael3d-1.0.3.tar.gz.

File metadata

  • Download URL: rijndael3d-1.0.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rijndael3d-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1f1b003fbab70f272ad4e726ea88503e866bd6644bda8769e9bd77a2f987d32a
MD5 48feb4e1de0ab7a365086d8ba3a1f63c
BLAKE2b-256 67212522a4790a7303ac8502d19f1d26fe7df3d2e326204b69e6365844b1a4b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rijndael3d-1.0.3.tar.gz:

Publisher: pypi-publish.yml on Jebbex1/Rijndael3D

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rijndael3d-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: rijndael3d-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rijndael3d-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 422f624983bcdbb3e14ed205b967f51187f41d78187bfad052f1f8a6879f84d3
MD5 2bec31d4e3ddfbab863ef53ddc7de2bb
BLAKE2b-256 cd472acb2d97d0ff9d04fb1c4019ae530389f0077a07267193be9ca8553cab35

See more details on using hashes here.

Provenance

The following attestation bundles were made for rijndael3d-1.0.3-py3-none-any.whl:

Publisher: pypi-publish.yml on Jebbex1/Rijndael3D

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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