Skip to main content

sm-revocation

Freshness-bounded revocation feeds for agent meshes on intermittent links

Revocation assumes a reachable issuer. A CRL or an OCSP responder tells a relying party that a credential is revoked only if the relying party can reach it, and a mesh cut off from its issuer either keeps acting on old information without knowing how old it is, or stops. sm-revocation is the third option: the issuer publishes revocations on a signed, hash-chained sm-feed feed and re-signs the feed's head on a declared cadence; anyone who met the issuer — a member, a relay, a vehicle, a store-and-forward bundle — can carry entries, heads and pages onward; and a holder's view answers one of three things about a subject at a time:

  • REVOKED(effective_at, reason) — an issuer-signed revocation it holds;
  • NOT_REVOKED(as_of) — it holds every revocation the issuer had signed up to a head the issuer itself dated as_of, and none names the subject;
  • UNKNOWN(reason) — behind, stale, not_covered, before_anchor or feed_misbehaved, each a statement of what the view cannot rule out.

The caller bounds how old as_of may be. Past the bound the answer is UNKNOWN, so a partitioned mesh knows how old its revocation information is and refuses past the bound, instead of acting on it blind. This package owns the revocation payload profile on sm-feed, the issuer's time obligations, the view, its conflict evidence, and the adapters for sm-renewal and sm-dat.

What it does (0.1)

  • A revocation counts as soon as it is seen. A single signed revoke entry, flooded through any carrier on its own, makes every holder that receives it answer REVOKED, without the rest of the chain (SPEC §6.3).
  • NOT_REVOKED only from a complete chain and a matching head. Entries extend the view's chain one at a time, in any order and from any carrier; a missing, reordered or corrupt entry stops the chain at the gap and the view answers UNKNOWN(behind), never NOT_REVOKED (§6.4).
  • Monotone state. Nothing a carrier sends, in any order, moves the view's cursor, frontier, revocations or evidence backwards. A replayed old page or head changes nothing; there is no un-revoke (§4.5, §6.1).
  • Freshness from the issuer's own signatures. as_of is the generated_at of the newest head the chain is complete to. The view reads no clock, so equal inputs give equal answers anywhere (§6.7).
  • Issuer misbehaviour becomes transferable evidence. The issuer's signed times must never decrease (§5.3). Two signed objects that bind one position to two hashes (a fork), or whose times run backwards along the feed (an order conflict), form a revocation-conflict/0.1 proof anyone can re-check. An order conflict is what exposes an issuer that keeps heartbeating a holder while hiding a later entry from it, as soon as the hidden entry and a heartbeat meet at any holder (§7).
  • Late joiners. A revocation-snapshot/0.1 lets a view start from a signed checkpoint, whose state digest every view walking through it recomputes (§8).
  • Adversarially tested. 28 deterministic conformance vectors and a hostile-path suite: forged, tampered, mistyped and non-canonical objects, profile violations, chain-rule breaks, out-of-order and partial carriage, replays, forks of every kind, order conflicts at either holder, tampered proofs, snapshot refusals and false checkpoint digests. Hostile values are substituted into every field of every object; the view names the failing stage and never raises.

What it does not do

  • Deliver a revocation to a node nothing can reach. A mesh with no path to the issuer, direct or carried, learns nothing new. Its answers go stale on schedule. That is the inherited revocation residual, made visible, not removed.
  • Catch a freeze at a holder that meets no one. A holder that hears only from the issuer cannot tell "nothing was revoked" from "nothing is being shown to me". Freeze detection needs contact between holders; witness co-signing is not in 0.1.
  • Check the issuer's word. effective_at, reason, prune_after and every signed time are the issuer's statements. A caller that wants to cap future-dated heads does so against its own clock, outside the view.
  • Transport, scheduling or the decision to revoke. Those are the consumer's.

THREATMODEL.md states every boundary.

Installation

pip install sm-revocation

Requires Python 3.11+ and sm-feed 0.2.1 or later.

Quick start

from sm_arp import Identity
from sm_revocation import RENEWAL_KINDS, FeedView, RevocationIssuer, revoked_set

issuer = RevocationIssuer(
    Identity.generate(),
    heartbeat_seconds=60,
    subject_kinds=["credential_hash", "manifest_hash"],
    issued_at="2026-11-01T09:00:00Z",
)
issuer.revoke(
    subject_kind="credential_hash",
    subject="sha256:" + "a1" * 32,
    effective_at="2026-11-01T09:02:00Z",
    issued_at="2026-11-01T09:02:00Z",
    reason="key_compromise",
)

# Any carrier forwards the page; the holder verifies everything itself.
view = FeedView(issuer.feed_id)
view.ingest_page(issuer.page(None, generated_at="2026-11-01T09:05:00Z"))

view.status("credential_hash", "sha256:" + "a1" * 32, "2026-11-01T09:06:00Z", 300)
# Status(outcome='REVOKED', effective_at='2026-11-01T09:02:00Z', reason='key_compromise', ...)

# For sm-renewal: the set to pass as revoked_credential_hashes, or None.
revoked = revoked_set(view, RENEWAL_KINDS, "2026-11-01T09:06:00Z", 300)
if revoked is None:
    ...  # decline to attest. Never substitute an empty set.

A Status deliberately has no truth value: test .revoked, .not_revoked or .unknown. examples/quick_start.py runs a fuller version, including a freeze being caught.

Using it with sm-renewal and sm-dat

  • revoked_set(view, kinds, at, max_staleness_seconds) returns the frozenset sm-renewal takes as revoked_credential_hashes, or None when the view cannot vouch for completeness and freshness. An attester that gets None declines; a relying party fails its revocation step. Never pass an empty set in place of None: sm-renewal reads an empty set as "complete, fresh, and nothing revoked" (SPEC §9.1).
  • renewal/0.4 stapling (sm-renewal ≥ 0.5.0). When the manifest names this feed, pass revoked_set(view, RENEWAL_KINDS, as_of, max_revocation_staleness_seconds) as revoked_credential_hashes and view.complete_head as revocation_head, both read from the same view. complete_head is the newest head the view's chain is complete to. Never staple a newer head the view holds but has not caught up to: sm-renewal checks the head, not the view, and would accept it (SPEC §9.1).
  • dat_checker(resolve) returns the revocation_checker sm-dat takes. sm-dat calls one checker for every grant in a chain, ancestors included, so resolve(grant_id) returns that grant's own feed views and its max_revocation_age_seconds. REVOKED → True, NOT_REVOKED → False, anything else → None (SPEC §9.2).

Reference fixtures

conformance/vectors/*.json — 28 deterministic scenarios from fixed, non-secret seeds, each a script of ingests and queries with the answer the SPEC requires at every step. conformance/_vector_gen.py regenerates them byte for byte, and checks each hand-written expectation against the implementation while it writes.

Specification

Package Role
sm-feed The substrate: signed, hash-chained, cursor-based feed
sm-renewal Partition-tolerant renewal; consumes revoked_set, and complete_head under renewal/0.4
sm-dat Delegated authority tokens; consumes dat_checker
sm-arp Ed25519, JCS and did:key, shared across the family

License

MIT


First published: 2026-11-28 | Last modified: 2026-11-28

Personal research contributions aligned with Project NANDA standards. Stellarminds.ai

Metadata

Release files for sm-revocation 0.1.2

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

Source distribution (sdist)

Source distribution for sm-revocation 0.1.2
File Size Uploaded Provenance Actions
sm_revocation-0.1.2.tar.gz 86.1 kB With provenance Details for sm_revocation-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sm-revocation 0.1.2
File Interpreter ABI Platform Actions
sm_revocation-0.1.2-py3-none-any.whl Python 3 none any Details for sm_revocation-0.1.2-py3-none-any.whl

Total release size: 112.1 kB

Release files / sm_revocation-0.1.2.tar.gz

Download URL sm_revocation-0.1.2.tar.gz
Size 86.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1eebe143af049489fd91942725475615d1266bf2052608933627f20345f7558a
BLAKE2b-256 checksum
How to use checksums
f9b5ece1f5c93bf958654987f5634bf94e01a913e0ae733d97a531bd4608e106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / sm_revocation-0.1.2-py3-none-any.whl

Download URL sm_revocation-0.1.2-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
502b94fc59b8f0ba8d880dc72590ac45f65e933ac16520ad28f8d5424e6207ae
BLAKE2b-256 checksum
How to use checksums
5c242734c54b19ccbd62af31563a9f651a2a352914cc376a9c741045453ad6ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for sm-revocation 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sm_revocation-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

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