algovoi-rfc9421-verifier (Python)
AlgoVoi-authored reference verifier for RFC 9421 (HTTP Message Signatures) plus RFC 9530 (Digest Fields for HTTP). Python and TypeScript, byte-for-byte parity, Apache 2.0.
What it does
- Verify an incoming RFC 9421-signed HTTP request against a known public key.
- Re-validate a captured request after it traverses a TLS-re-terminating proxy
chain (the property pinned in the
rfc9421_proxy_chain_v0conformance fixture). - Build conformance test harnesses anchored to the RFC 8032 Section 7.1 deterministic Ed25519 reference keypair.
This package verifies HTTP message signatures (RFC 9421 + RFC 9530): the wire-level signing-base reconstruction, the Content-Digest check, and the Ed25519 signature check against a supplied public key. That is a different surface from the AlgoVoi JCS RFC 8785 receipt-body discipline. HTTP signature verification (this package) and receipt-content verification (the AlgoVoi receipt-format packages) are complementary: this verifier confirms wire-level message integrity; the JCS substrate confirms receipt-body canonical integrity.
Verification options
verify_request applies hardening on top of the signature check. Verifying the
signature alone does not make an authentic request safe; these arguments enforce
freshness, coverage, and algorithm policy:
required_components— reject unless every listed component (e.g.@method,@authority,@path) is covered by the signature (closes request-line-rewrite gaps).require_content_digest(defaultTrue) — requirecontent-digestto be a covered component and verify it against the body (no body-swap).allowed_algorithms(default{"ed25519"}) — algorithm allow-list; an absentalgis always rejected.now,max_age_seconds,max_skew_seconds,require_created,enforce_expires— freshness window; only signedcreated/expiresare trusted.nonce_seen— single-use nonce store probe(nonce, keyid) -> seen, checked after the signature verifies; fails closed on a store error.expected_tag/require_tag— enforce the RFC 9421tag(anti cross-protocol reuse).
Always on: non-canonical, off-curve, and small-order Ed25519 public keys are rejected
before verification, and the Signature value must be canonical base64.
from algovoi_rfc9421_verifier import verify_request
result = verify_request(
method="POST", authority="api.example", path="/pay",
headers=headers, body=body, public_key=pubkey_hex,
required_components=["@method", "@authority", "@path"],
require_created=True, max_age_seconds=300,
nonce_seen=store.seen,
)
if not result.valid:
... # deny
Install
pip install algovoi-rfc9421-verifier
License
Apache 2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algovoi_rfc9421_verifier-0.4.4.tar.gz.
File metadata
- Download URL: algovoi_rfc9421_verifier-0.4.4.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8644136f73602868c403f4ab219857d0ff53d232d72745113dbecfe984a8f918
|
|
| MD5 |
2e53c1c3c552e54c43c4c803f5362618
|
|
| BLAKE2b-256 |
80efa97501ca11983fa099499e7f80001a5e744c4efbd7bc188899fb4ea8222b
|
File details
Details for the file algovoi_rfc9421_verifier-0.4.4-py3-none-any.whl.
File metadata
- Download URL: algovoi_rfc9421_verifier-0.4.4-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15837971709569a1fefd01472789f0a6f357ec68632f77027de3f8d70176f955
|
|
| MD5 |
9cbbb43cb28cdcfc94a6ed62bd938196
|
|
| BLAKE2b-256 |
244a8e3612582f3b7a1ff2a96c90f353d1b75c20c1df266f354d9e86271191c4
|