interaktiv.argon2
Argon2id password hashing for Zope and Plone.
interaktiv.argon2 registers an ARGON2 scheme with AuthEncoding, the library Zope and Plone use to hash and verify passwords.
With the scheme registered, every user manager of Zope and Plone can verify passwords stored as Argon2id hashes:
{ARGON2}$argon2id$v=19$m=65536,t=3,p=4$<salt>$<hash>
The package is a plain Python library, not a Plone add-on. It has no installation profile, and it never writes anything to the database.
interaktiv.passwordpolicy uses it to store passwords as Argon2id hashes.
Keep this package installed
The scheme is required to verify Argon2id hashes.
If you remove interaktiv.argon2 while passwords are stored as Argon2id hashes, these users can no longer log in until they reset their password using their recovery email.
This also applies when you remove interaktiv.passwordpolicy.
Your package manager removes interaktiv.argon2 together with it, unless you list interaktiv.argon2 in the dependencies of your project:
dependencies = [
"interaktiv.argon2",
]
How the registration works
AuthEncoding keeps its schemes in a list in the memory of the running process.
Importing interaktiv.argon2 adds the ARGON2 scheme to that list.
To verify a password, AuthEncoding picks the scheme by the prefix of the stored hash, {ARGON2}.
Plone imports the package at startup, because it loads the configure.zcml of every installed package with a z3c.autoinclude entry point for plone.
The configure.zcml of this package is empty, loading it only imports the package.
In plain Zope, add <include package="interaktiv.argon2" /> to your ZCML, or import the package.
Usage
AuthEncoding hashes with the default profile:
from AuthEncoding import AuthEncoding
hashed = AuthEncoding.pw_encrypt("secret", encoding="ARGON2")
AuthEncoding.pw_validate(hashed, "secret")
To hash with another cost profile, and to check whether a stored hash uses the current profile:
from interaktiv.argon2 import hash_password
from interaktiv.argon2 import needs_rehash
hashed = hash_password("secret", "owasp-19m")
needs_rehash(hashed, "owasp-19m")
Cost profiles
| Profile | Memory | Iterations | Lanes | Source |
|---|---|---|---|---|
rfc9106-low-memory (default) |
64 MiB | 3 | 4 | RFC 9106, second recommended option |
owasp-46m |
46 MiB | 1 | 1 | OWASP Password Storage Cheat Sheet |
owasp-19m |
19 MiB | 2 | 1 | OWASP |
owasp-12m |
12 MiB | 3 | 1 | OWASP |
owasp-9m |
9 MiB | 4 | 1 | OWASP |
owasp-7m |
7 MiB | 5 | 1 | OWASP |
Every hash stores its own salt and cost parameters, so hashes of all profiles stay valid when you change the profile.
Development
The package does not depend on Plone, so you can test it without a Plone installation.
uv run --extra test pytest
uvx ruff format --check .
uvx ruff check .
License
The project is licensed under GPLv2.
Changelog
1.0.0 (2026-10-09)
Feature
- Initial release: Argon2id password hashing scheme for AuthEncoding, with six equally strong cost profiles from RFC 9106 and OWASP.
Metadata
Release files for interaktiv.argon2 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| interaktiv_argon2-1.0.0.tar.gz | 15.6 kB | Without provenance | Details for interaktiv_argon2-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| interaktiv_argon2-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for interaktiv_argon2-1.0.0-py3-none-any.whl |
Total release size: 28.6 kB
Release files / interaktiv_argon2-1.0.0.tar.gz
| Download URL | interaktiv_argon2-1.0.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d34100fd80f5e5bba517cd06f0f5bffb29ec8a579b472e3f1f0c0b32e6ac5f6
|
|
BLAKE2b-256 checksum How to use checksums |
e476d813b8e8ee9d2fa5179fac475e1cf4bbe715ef3197398d6a7db1eb53ce2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.0 {"ci":null,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Pop!_OS","version":"24.04"},"implementation":{"name":"CPython","version":"3.12.3"},"installer":{"name":"hatch","version":"1.18.0"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.12.3","system":{"name":"Linux","release":"7.1.5-76070105-generic"}} HTTPX2/2.12.0
|
Release files / interaktiv_argon2-1.0.0-py3-none-any.whl
| Download URL | interaktiv_argon2-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a3e4e93eec22aa60e88ca7a99f8d883fbbc9a21800d35bb00e8e35cf5d3b386
|
|
BLAKE2b-256 checksum How to use checksums |
56e18e95b9f18bef6b078d38503a6c4ff7f046790871ae2ebc650fd04da2a14f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.0 {"ci":null,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Pop!_OS","version":"24.04"},"implementation":{"name":"CPython","version":"3.12.3"},"installer":{"name":"hatch","version":"1.18.0"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.12.3","system":{"name":"Linux","release":"7.1.5-76070105-generic"}} HTTPX2/2.12.0
|
Security for interaktiv.argon2 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.