Registry / auth-security / py3rijndael

py3rijndael

JSON →
library0.3.3pypypi✓ verified 87d ago

Rijndael (AES) encryption algorithm library for Python 3. Current version 0.3.3, last updated in 2020, maintenance mode.

pip install py3rijndael
INSTALL
IMPORT
SIG · PY3RIJNDAEL
P
py3rijndael
auth-securitypythonv0.3.3
Install
2.4s avg
Import
35ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.036s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.034s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Rijndael
from py3rijndael import Rijndael
from rijndael import rijndael
Common mistake: using old lowercase module or package name.
ZeroPadding
from py3rijndael.zero_padding import ZeroPadding
from py3rijndael import ZeroPadding
ZeroPadding is in a submodule, not top-level.

Basic encrypt/decrypt with ZeroPadding. Key must be 16, 24, or 32 bytes. IV is required and must be equal to block_size.

from py3rijndael import Rijndael from py3rijndael.zero_padding import ZeroPadding import os key = b'0123456789abcdef' # 16 bytes for AES-128 iv = os.urandom(16) plaintext = b'Hello World!' rijndael = Rijndael(key, block_size=16, iv=iv, padding=ZeroPadding(32)) encrypted = rijndael.encrypt(plaintext) decrypted = rijndael.decrypt(encrypted) print(decrypted.decode())
Debug
Known issues
breakingBlock size for Rijndael is not limited to 16 bytes (128 bits); using non-standard block sizes may lead to interoperability issues.
fix
Use block_size=16 for AES compatibility.
affects: all
deprecatedThis library is in maintenance mode with no updates since 2020. Consider using 'pycryptodome' or 'cryptography' for active support.
fix
Migrate to pycryptodome or cryptography packages.
affects: all
gotchaThe padding must be compatible with the block size. ZeroPadding(32) pads to 32-byte blocks, but the cipher block_size is separate. Mismatch causes silent corruption.
fix
Ensure padding block size is a multiple of the cipher block size (e.g., 16 is recommended).
affects: all
gotchaRijndael supports key sizes of 16, 24, 32 bytes, but this library also allows other sizes? Use standard sizes to avoid unexpected behavior.
fix
Use key length of 16, 24, or 32 bytes.
affects: all
Errors
Common errors & fixes
ImportError: No module named 'rijndael'
Incorrect import path; the pip package name is py3rijndael.
fix
Run 'pip install py3rijndael' and import as 'from py3rijndael import Rijndael'.
AttributeError: module 'py3rijndael' has no attribute 'ZeroPadding'
ZeroPadding is not imported correctly from the top-level module.
fix
Use 'from py3rijndael.zero_padding import ZeroPadding'.
ValueError: encrypted data must be padded to block boundary
The padding block size in ZeroPadding does not match the cipher block size or input length.
fix
Use the same block_size for padding as the Rijndael block_size (or multiple) and ensure plaintext length is a multiple of padding block size.
Upgrade
Version history
0.3.3latest on PyPI · released Jun 20, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
py3rijndael — pip install py3rijndael · libregistry