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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.036s · 19.2MB
glibcpy 3.10–3.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())
Errors
Common errors & fixes
ImportError: No module named 'rijndael'
Incorrect import path; the pip package name is py3rijndael.
fixRun '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.
fixUse '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.
fixUse 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.