{"id":21726,"library":"py3rijndael","title":"py3rijndael","description":"Rijndael (AES) encryption algorithm library for Python 3. Current version 0.3.3, last updated in 2020, maintenance mode.","status":"maintenance","version":"0.3.3","language":"python","source_language":"en","source_url":"https://github.com/meyt/py3rijndael","tags":["cryptography","aes","rijndael","encryption","python3"],"install":[{"cmd":"pip install py3rijndael","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Common mistake: using old lowercase module or package name.","wrong":"from rijndael import rijndael","symbol":"Rijndael","correct":"from py3rijndael import Rijndael"},{"note":"ZeroPadding is in a submodule, not top-level.","wrong":"from py3rijndael import ZeroPadding","symbol":"ZeroPadding","correct":"from py3rijndael.zero_padding import ZeroPadding"}],"quickstart":{"code":"from py3rijndael import Rijndael\nfrom py3rijndael.zero_padding import ZeroPadding\nimport os\n\nkey = b'0123456789abcdef'  # 16 bytes for AES-128\niv = os.urandom(16)\nplaintext = b'Hello World!'\n\nrijndael = Rijndael(key, block_size=16, iv=iv, padding=ZeroPadding(32))\nencrypted = rijndael.encrypt(plaintext)\ndecrypted = rijndael.decrypt(encrypted)\nprint(decrypted.decode())","lang":"python","description":"Basic encrypt/decrypt with ZeroPadding. Key must be 16, 24, or 32 bytes. IV is required and must be equal to block_size."},"warnings":[{"fix":"Use block_size=16 for AES compatibility.","message":"Block size for Rijndael is not limited to 16 bytes (128 bits); using non-standard block sizes may lead to interoperability issues.","severity":"breaking","affected_versions":"all"},{"fix":"Migrate to pycryptodome or cryptography packages.","message":"This library is in maintenance mode with no updates since 2020. Consider using 'pycryptodome' or 'cryptography' for active support.","severity":"deprecated","affected_versions":"all"},{"fix":"Ensure padding block size is a multiple of the cipher block size (e.g., 16 is recommended).","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use key length of 16, 24, or 32 bytes.","message":"Rijndael supports key sizes of 16, 24, 32 bytes, but this library also allows other sizes? Use standard sizes to avoid unexpected behavior.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install py3rijndael' and import as 'from py3rijndael import Rijndael'.","cause":"Incorrect import path; the pip package name is py3rijndael.","error":"ImportError: No module named 'rijndael'"},{"fix":"Use 'from py3rijndael.zero_padding import ZeroPadding'.","cause":"ZeroPadding is not imported correctly from the top-level module.","error":"AttributeError: module 'py3rijndael' has no attribute 'ZeroPadding'"},{"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.","cause":"The padding block size in ZeroPadding does not match the cipher block size or input length.","error":"ValueError: encrypted data must be padded to block boundary"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}