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 datedas_of, and none names the subject;UNKNOWN(reason)—behind,stale,not_covered,before_anchororfeed_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's new in 0.2.0 (revocation/0.2)
- Witnessed heads. A feed may name witnesses and a threshold in its genesis policy (
RevocationIssuer(..., witnesses=[...], witness_threshold=k)). A view of such a feed counts a head towardsas_ofonly whenknamed witnesses have co-signed it withsm-feed0.3'sfeed-cosignature/0.1(SPEC §6.8). It takes them viaingest_cosignature(c)oringest_head(head, cosignatures=[...]). - The freeze, closed for isolated holders that pin their witnesses. A holder names the witness set it trusts (
FeedView(feed_id, witnesses=..., witness_threshold=...); arenewal/0.5attester uses its manifest's), and a policy naming another set breaks its chain. Without a pin, the issuer's own genesis chooses the witnesses, and a forked genesis can name ones it controls. A witness co-signs only the tip of the chain it has walked, never while it holds a later head, and only heads dated within its clock tolerance (sm-feedSPEC §9.2). Once a revoke has reachedn − k + 1honest witnesses atT, no head below it is witnessed with a date pastT + D. A frozen holder therefore goesstaleon schedule without meeting anyone (vector 31; THREATMODEL). - Model-checked.
proofs/witness_model.pyexplores every interleaving of a Byzantine issuer against a fixed witness set, with n = 3 or 4, k = 2 or 3 and 0 to k − 1 deviating witnesses, up to a horizon of 3 or 4 steps. That is 13 cases, the largest 5.9 million states. The bound holds in every state. Dropping W2, W4 or durable witness state, or allowingkdeviating witnesses, yields a counterexample. renewal/0.5stapling.view.complete_cosignaturesreturns the cosignatures to staple withcomplete_head.- End to end with
sm-renewal0.6.0. Three integration tests:- an honest feed bounds renewal at exactly
t_rev + R + L + E + S(T5); - a freezing feed without witnesses carries renewal past that;
- with witnesses, the same freeze is refused: the attester's view never counts the frozen heartbeat, and sm-renewal's verifier refuses it at the
witnessstage even from an attester that staples it anyway (T6).
- an honest feed bounds renewal at exactly
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_REVOKEDonly 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 answersUNKNOWN(behind), neverNOT_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_ofis thegenerated_atof 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.1proof 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.1lets a view start from a signed checkpoint, whose state digest every view walking through it recomputes (§8). - Adversarially tested. 35 deterministic conformance vectors (seven for
revocation/0.2) 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
staleon schedule. That is the inherited revocation residual, made visible, not removed. - Catch a freeze at a holder of a
revocation/0.1feed 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 then needs contact between holders. Arevocation/0.2feed's witnesses close this case (above); they cannot help ifkof them deviate or the issuer never shows them the entry. - Check the issuer's word.
effective_at,reason,prune_afterand 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 thefrozensetsm-renewaltakes asrevoked_credential_hashes, orNonewhen the view cannot vouch for completeness and freshness. An attester that getsNonedeclines; a relying party fails its revocation step. Never pass an empty set in place ofNone:sm-renewalreads an empty set as "complete, fresh, and nothing revoked" (SPEC §9.1).renewal/0.4stapling (sm-renewal≥ 0.5.0). When the manifest names this feed, passrevoked_set(view, RENEWAL_KINDS, as_of, max_revocation_staleness_seconds)asrevoked_credential_hashesandview.complete_headasrevocation_head, both read from the same view.complete_headis 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-renewalchecks the head, not the view, and would accept it (SPEC §9.1).renewal/0.5with witnesses (sm-renewal≥ 0.6.0). Also passview.complete_cosignaturesasrevocation_cosignatures, from the same view. Make the feedrevocation/0.2with the manifest'srevocation_witnessesandrevocation_witness_threshold, and pin the view to them (FeedView(feed_id, witnesses=..., witness_threshold=...)). The view then counts exactly the heads the relying party will accept, and a forked genesis naming other witnesses breaks its chain.dat_checker(resolve)returns therevocation_checkersm-dattakes.sm-datcalls one checker for every grant in a chain, ancestors included, soresolve(grant_id)returns that grant's own feed views and itsmax_revocation_age_seconds.REVOKED→True,NOT_REVOKED→False, anything else →None(SPEC §9.2).
Reference fixtures
conformance/vectors/*.json — 35 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
SPEC.md— normative wire format and behaviour, working draft.WHITEPAPER.md— design rationale.THREATMODEL.md— what it defends, and what it does not.proofs/witness_model.py— the exhaustive model check of the witness bound (python proofs/witness_model.py).
Related packages
| Package | Role |
|---|---|
sm-feed |
The substrate: signed, hash-chained, cursor-based feed, and (0.3) the witness and feed-cosignature/0.1 |
sm-renewal |
Partition-tolerant renewal; consumes revoked_set, complete_head under renewal/0.4, and complete_cosignatures under renewal/0.5 |
sm-dat |
Delegated authority tokens; consumes dat_checker |
sm-arp |
Ed25519, JCS and did:key, shared across the family |
License
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.2.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 |
|---|---|---|---|---|
| sm_revocation-0.2.0.tar.gz | 112.2 kB | With provenance | Details for sm_revocation-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sm_revocation-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for sm_revocation-0.2.0-py3-none-any.whl |
Total release size: 143.4 kB
Release files / sm_revocation-0.2.0.tar.gz
| Download URL | sm_revocation-0.2.0.tar.gz |
|---|---|
| Size | 112.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9229bd1993998cf6b4bdc40ff0548f38fadd02813d178908de36295031da5731
|
|
BLAKE2b-256 checksum How to use checksums |
750b9c3574c9d5bb5aed80abf5871cd907fa91e970a99913db729f5d1e39c151
|
| 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 logRelease files / sm_revocation-0.2.0-py3-none-any.whl
| Download URL | sm_revocation-0.2.0-py3-none-any.whl |
|---|---|
| Size | 31.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95125794c75859ea6b4d727e86140b8297c83e7882c57402221ee68cbf07b857
|
|
BLAKE2b-256 checksum How to use checksums |
829000139d886b51399f78bb74de1234f568426b489ff8c025da8bc2ac4e26e9
|
| 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 logSecurity for sm-revocation 0.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sm_revocation-0.2.0.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 logA 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.