Skip to main content

lgd-passport — come and break it

An offline verifier and a negative-control vector set for agent passports, delegation chains and RFC 9421 signed requests. Two independent implementations (Python and Node, no shared code) that must agree, byte for byte.

The whole point is not that it passes. The point is that every rejection happens for the stated reason, and each rejection carries a stable error code — so a negative that fails because the signature is junk is counted as a failure, not as coverage.

Run it in 30 seconds

# not on PyPI yet — install straight from the release wheel, then run it
pip install https://github.com/zhaoxinghua09-cell/lgd-passport/releases/download/v1.2.1/lgd_passport-1.2.1-py3-none-any.whl
lgd-passport selftest           # 30 checks; exit 1 if anything that must fail does not fail
lgd-passport demo               # one positive chain: issue → delegate → verify per request
lgd-passport selftest --json    # machine-readable
# or, from this repo: pip install -e .

Node side (no dependencies, Node ≥ 18):

node js/lgd_passport_ts.mjs negctl   # 8 negative controls on the Node side
node js/lgd_passport_ts.mjs codes         # error-code table, both directions
node js/lgd_passport_ts.mjs checkdata vectors/vector-set-v1.json
python vectors/check_vectors.py         # 43 checks out of the vector set

What it verifies

Area What is checked Failure code (sample)
Passport issuer-signature against a pinned public key; typ/alg; iat/exp; TTL ceiling 86400 s; key thumbprint binding (RFC 7638) SIGNATURE_INVALID, TYP_MISMATCH, PASSPORT_TTL_EXCEEDED, KEY_THUMBPRINT_MISMATCH
Delegation chain monotone narrowing only (scope subset, exp never extended); chain root must match the passport subject SCOPE_ESCALATION, DELEGATION_EXP_BEYOND_PARENT, CHAIN_ROOT_MISMATCH
Signed request RFC 9421 signature base; required covered components; freshness window ≤ 300 s SIGNATURE_HEADERS_MISSING, FRESHNESS_WINDOW_EXCEEDED, COVERAGE_MISSING
Identifier namespace:local syntax and resolution; malformed vs unresolvable kept apart IDENTIFIER_MALFORMED, IDENTIFIER_UNRESOLVABLE, REGISTRY_ENTRY_INVALID
Revocation / status list issuer-signed revocation list, freshness by issued_at + max_age, local ceiling 3600 s, TSL-shaped bit lists (1/2/4/8 bits, zlib) REVOCATION_STALE, REVOCATION_MAX_AGE_TOO_LOOSE, REVOKED, STATUS_LIST_OUT_OF_RANGE

No network, no vendor SDK, no issuer callback. Everything the verifier needs is in the bundle plus a pinned key.

Numbers — and what they are not

  • selftest 30/30, cross-implementation parity 11/11, vector set 43/43, error-code agreement 21/21.
  • These are first-party dry runs on one machine. They are not third-party testing and this repo does not present them as such. If you run it, your receipt counts; mine does not.

Open invitation: come and break it

Three things you can do without asking me anything:

  1. Send a case. A passport, a delegation chain, a revoked chain, a signed request — any shape. If I cannot reproduce it, I will say so and paste the exact command I ran.
  2. Ask a question that exposes a gap, including "your C3 score is empty, why do you still score it".
  3. Run the suite and report what fails. Wrong-reason failures are the most valuable thing you can send: they are where a test suite silently loses coverage.

Nothing here asks for a review, an endorsement or a number. The only currency is "this does not work because X".

Boundary

  • Not a conformance claim against @draft-le-agent-passport-00, APS, WIMSE or any other document. The object model follows the le draft; artifacts are not drop-in for any of them.
  • Allowed signature set is EdDSA only; post-quantum candidates are unimplemented and no PQ claim is made.
  • Freshness is verified against a supplied instant; this repo does not demonstrate that a cached revocation answer is rechecked at the moment authority is consumed.
  • Test keys are seeded from sha256("lgd-passport-vector/<role>/v1") and published on purpose. They carry no authority anywhere.

Layout

src/lgd-passport/        Python implementation (CLI entry: lgd-passport)
js/lgd_passport_ts.mjs   Node implementation (no dependencies)
vectors/               43-check vector set + runner + notes
tools_parity_check.py  cross-implementation parity (11 checks)
docs/                  re-run instructions for a third party

Author: Xinghua Zhao (赵兴华), independent researcher — ORCID 0009-0001-0512-1237. No affiliation, no vendor relationship, no funding tied to this work.

License: Apache-2.0.

Metadata

Release files for lgd-passport 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lgd-passport 1.2.1
File Size Uploaded Provenance Actions
lgd_passport-1.2.1.tar.gz 28.6 kB Without provenance Details for lgd_passport-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lgd-passport 1.2.1
File Interpreter ABI Platform Actions
lgd_passport-1.2.1-py3-none-any.whl Python 3 none any Details for lgd_passport-1.2.1-py3-none-any.whl

Total release size: 53.8 kB

Release files / lgd_passport-1.2.1.tar.gz

Download URL lgd_passport-1.2.1.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d999c36bb3ac07a3edae5f65a8001882efe42bb7760a9595d2e6b097cb7ea844
BLAKE2b-256 checksum
How to use checksums
80e1270a07e2ea1871e7067bfc0e8e93fe06cb2ad27b6d08b621a481f58c75f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / lgd_passport-1.2.1-py3-none-any.whl

Download URL lgd_passport-1.2.1-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c0723e96bfcde01ebeb18628bf8f65e438cb6211365f1edfe0a6346388901d2
BLAKE2b-256 checksum
How to use checksums
a7b6dfeb2efbe5688ec7a8af769fd5c04aa16998bcb6161bae9258fcd1a58579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for lgd-passport 1.2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page