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.
Metadata
Release files for algovoi-rfc9421-verifier 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| algovoi_rfc9421_verifier-0.4.4.tar.gz | 27.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| algovoi_rfc9421_verifier-0.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.3 kB
Release files / algovoi_rfc9421_verifier-0.4.4.tar.gz
| Download URL | algovoi_rfc9421_verifier-0.4.4.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8644136f73602868c403f4ab219857d0ff53d232d72745113dbecfe984a8f918
|
|
BLAKE2b-256 checksum How to use checksums |
80efa97501ca11983fa099499e7f80001a5e744c4efbd7bc188899fb4ea8222b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / algovoi_rfc9421_verifier-0.4.4-py3-none-any.whl
| Download URL | algovoi_rfc9421_verifier-0.4.4-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15837971709569a1fefd01472789f0a6f357ec68632f77027de3f8d70176f955
|
|
BLAKE2b-256 checksum How to use checksums |
244a8e3612582f3b7a1ff2a96c90f353d1b75c20c1df266f354d9e86271191c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|