<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     docName="draft-watts-rats-attested-fence-receipt-00"
     category="exp"
     submissionType="IETF"
     consensus="false"
     tocInclude="true"
     tocDepth="3"
     sortRefs="true"
     symRefs="true"
     version="3">

<front>
  <title abbrev="Attested Fence Receipts">Attested Fence Receipts: Hardware-Rooted Evidence of Authority-Epoch Enforcement at Consequential Sinks</title>
  <seriesInfo name="Internet-Draft" value="draft-watts-rats-attested-fence-receipt-00"/>
  <author initials="D. O." surname="Watts" fullname="Deonté O'dell Watts">
    <organization>GoodShyt Group Inc.</organization>
    <address>
      <postal>
        <city>San Francisco</city>
        <region>CA</region>
        <country>United States of America</country>
      </postal>
      <email>deonte@goodshyt.fun</email>
      <uri>https://orcid.org/0009-0005-8586-3650</uri>
    </address>
  </author>
  <date year="2026" month="November" day="14"/>
  <area>Security</area>
  <workgroup>Remote ATtestation ProcedureS</workgroup>
  <keyword>attestation</keyword>
  <keyword>revocation</keyword>
  <keyword>authority epoch</keyword>
  <keyword>EAT</keyword>
  <keyword>DICE</keyword>
  <keyword>agent delegation</keyword>

  <abstract>
    <t>Revoking the authority of a delegated agent is not the same as proving that no consequential effect can still be committed under that authority. A revocation cut applied at one resource sink is not evidence of enforcement at another sink, and a software acknowledgement from a sink is only as trustworthy as the software that produced it. This document defines the Attested Fence Receipt (AFR), an Entity Attestation Token (EAT) profile emitted by the hardware-rooted Attesting Environment of a consequential sink after the sink has durably applied an authority-epoch fence. It further defines a verification procedure for individual receipts, a closure-evaluation procedure over a declared sink set that yields CLOSED, PARTIAL, FAILED, or UNKNOWN, and a hardware fence profile that binds the fence to measured state: an extend-only authority register, a monotonic counter, counter-gated derivation of per-epoch effect-attestation keys, and PCR-bound key release. The mechanism supplies the per-sink evidence that revocation-closure determinations require, and it is designed so that the absence of evidence can never be read as closure.</t>
  </abstract>

  <note removeInRFC="true">
    <name>About This Document</name>
    <t>This is a private research candidate. It has not been submitted to the IETF Datatracker, has not been reviewed by any working group, and does not carry IETF consensus. It is written in the form of an Internet-Draft so that it can be submitted without restructuring once the owner-controlled review gates recorded in the accompanying research note have been passed. The intended discussion venue, if submitted, is the Remote ATtestation ProcedureS (RATS) Working Group mailing list (rats@ietf.org), with notice to the Web Authorization Protocol (OAuth) and Workload Identity in Multi System Environments (WIMSE) Working Groups.</t>
    <t>A reference implementation, 14 receipt test vectors, and 7 closure test vectors accompany this document (<xref target="impl-status"/>).</t>
  </note>
</front>

<middle>

<!-- ================================================================ -->
<section anchor="intro">
  <name>Introduction</name>
  <t>Agentic systems derive and distribute authority across delegated agents, workloads, queues, and long-running operations. <xref target="I-D.watts-oauth-agent-revocation-closure"/> establishes a protocol-neutral model for revocation closure in such systems: authority epochs, delegation lineage, admission fencing, a closure state machine (REQUESTED, PROPAGATING, CLOSED, PARTIAL, FAILED, UNKNOWN), and a Closure Receipt that records the scope, status, and evidence of a closure determination. That document deliberately leaves two things open: it defines no wire format for closure evidence, and it defines no mechanism by which an individual enforcement point proves that it has actually applied a fence. It names missing or delayed acknowledgements as both an evidence gap (Section 15 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>) and a threat (Section 19 of that document).</t>
  <t>This document fills that slot. Its starting point is an experimental observation. In a controlled two-sink experiment with separately implemented and separately persisted effect sinks, a revocation cut committed at sink A (advancing its authority epoch from 7 to 8) was followed by sink B, which had not yet received the cut, committing a valid queued request from a delegated descendant that A had never observed. After B received and durably applied its own signed cut, no further old-epoch effect appeared in B's journal. The two results are not in tension; they refer to two different predicates:</t>
  <artwork name="" type="ascii-art" align="center"><![CDATA[
   CutCommitted(A, 8)  =/=>  Closed({A, B}, 7)
]]></artwork>
  <t>A cut at one sink is a local fact. Closure over a set of sinks is a claim about every sink in the set, and it needs per-sink evidence. The experiment also showed why a plain software acknowledgement is weak evidence: sink B's acknowledgement was a local observation produced by the same software whose correct behaviour was in question, and in a related single-sink experiment the sink's own persistent epoch could be silently rolled back by reopening its database with an older value.</t>
  <t>The Attested Fence Receipt (AFR) addresses both weaknesses:</t>
  <ul>
    <li>It is emitted by the sink's Attesting Environment in the sense of <xref target="RFC9334"/>, signed with a key rooted in the device identity (for example a DICE alias key or a TPM attestation key), and it carries the measured state of the software that applied the fence. A verifier can therefore reject a receipt from a sink that runs unreferenced gate code, even if that code is "honest" about having fenced.</li>
    <li>It binds the fence to irreversible hardware state: the cut identifier is extended into an extend-only authority register, a monotonic counter advances, and the effect-attestation key of the superseded epoch becomes underivable. After the fence, software on the sink cannot produce a valid effect attestation under the old epoch, cannot roll the epoch back by restoring a backup, and cannot forge a receipt claiming to have fenced when the hardware shows otherwise.</li>
    <li>It is self-incriminating by construction: a receipt records both the fence sequence number and the highest sequence number of any effect committed under the superseded epoch. A receipt that reports an old-epoch effect at or after its own fence is evidence of failure, not of closure.</li>
  </ul>
  <t>On top of the receipt, <xref target="closure"/> specifies how a Closure Verifier evaluates a declared sink set and maps the result onto the closure states of <xref target="I-D.watts-oauth-agent-revocation-closure"/>. The evaluation is monotone and fails closed: an empty sink set, a missing receipt, a receipt that does not verify, or the absence of a normal-path witness yields UNKNOWN, never CLOSED.</t>

  <section anchor="reqlang">
    <name>Requirements Language</name>
    <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
  </section>

  <section anchor="nongoals">
    <name>Non-Goals</name>
    <t>This document does not define a revocation endpoint, a token format for authority, a delegation grammar, a queue protocol, a consensus protocol, or a transport. It does not replace the closure model of <xref target="I-D.watts-oauth-agent-revocation-closure"/>; it supplies evidence to it. It does not claim that a CLOSED determination over a declared sink set says anything about sinks outside that set. It does not define a new hardware root of trust; it profiles existing DICE and TPM primitives. Nothing in this document reverses effects that were committed before a fence.</t>
  </section>
</section>

<!-- ================================================================ -->
<section anchor="terminology">
  <name>Terminology</name>
  <t>This document uses the terms Attester, Attesting Environment, Target Environment, Verifier, Relying Party, Evidence, Attestation Results, Reference Values, and Endorsements as defined in <xref target="RFC9334"/>; the terms Claim, Claims-Set, profile, and nonce as used in <xref target="RFC9711"/>; and the terms Authority Epoch, Authority Root, Consequential Sink, Pending Operation, Closure Barrier, Closure Receipt, Authority Graph, Declared Scope, and Normal-Path Witness as defined in Section 2 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>.</t>
  <dl newline="false" spacing="normal">
    <dt>Cut:</dt>
    <dd>An integrity-protected, issuer-authenticated message from an Authority Root instructing one consequential sink to advance from authority epoch E_prev to authority epoch E_new. A cut is addressed to exactly one sink (its audience) within one Declared Scope.</dd>
    <dt>Cut Identifier:</dt>
    <dd>The SHA-256 digest of the complete authenticated cut message as received by the sink. It is the handle by which a Closure Verifier correlates receipts with the cut it issued.</dd>
    <dt>Fence:</dt>
    <dd>The sink-local, durable, irreversible transition from E_prev to E_new, applied atomically with respect to effect commitment, after which no admission under E_prev can commit at that sink and every pending operation admitted under E_prev has been discharged (<xref target="fence"/>).</dd>
    <dt>Fence Sequence:</dt>
    <dd>The sink-local sequence number of the journal record that commits the fence. Sink-local sequence numbers are totally ordered within one sink and are not comparable across sinks.</dd>
    <dt>Fence Mode:</dt>
    <dd>One of the mechanisms by which a sink makes a fence irreversible: durable transaction, measured extend, key ratchet, or sealed release (<xref target="hwprofile"/>). Modes compose.</dd>
    <dt>Authority Register:</dt>
    <dd>An extend-only measurement register (a PCR or equivalent) reserved for cut identifiers. Its value after a fence is a function of every cut applied at the sink since power-on.</dd>
    <dt>Epoch Key:</dt>
    <dd>The effect-attestation key of one authority epoch at one sink. Effects committed under an epoch are attested with that epoch's key. Under the key-ratchet fence mode, the epoch key of a superseded epoch cannot be derived or used after the fence.</dd>
    <dt>Attested Fence Receipt (AFR):</dt>
    <dd>An EAT, serialized as a CWT or JWT, produced by the Attesting Environment of a consequential sink, whose Claims-Set describes one fence at that sink (<xref target="receipt"/>).</dd>
    <dt>Declared Sink Set:</dt>
    <dd>The enumerated identities of every consequential sink that a closure determination claims to cover. It is the sink-level projection of the Declared Scope.</dd>
    <dt>Closure Verifier:</dt>
    <dd>The entity that appraises Attested Fence Receipts (acting as a RATS Verifier) and evaluates closure over a Declared Sink Set (acting as the closure evaluator of <xref target="I-D.watts-oauth-agent-revocation-closure"/>). The two roles MAY be separated; <xref target="closure"/> is written for the combined case.</dd>
    <dt>Fence Witness:</dt>
    <dd>A receipt that has been verified with result FENCED for a specific (scope, sink, E_prev, cut identifier) tuple.</dd>
  </dl>
</section>

<!-- ================================================================ -->
<section anchor="principles">
  <name>Principles</name>
  <t>The mechanism in this document follows from eight principles. They generalize the non-collapse rule of <xref target="I-D.watts-oauth-agent-revocation-closure"/> ("revocation request != authorization invalidation != revocation closure") to the evidence layer. They are stated here so that an implementation can be checked against the intent even where the normative text is silent.</t>
  <ol type="P-%d." spacing="normal">
    <li><t><strong>Locality of cuts.</strong> A cut committed at one sink is evidence about that sink only. It MUST NOT be used to infer enforcement at any other sink.</t></li>
    <li><t><strong>Acknowledgement is not enforcement.</strong> A statement that a cut was received is not evidence that it was applied. Evidence of enforcement MUST be bound to the durable sink state that the fence changed and to the identity of the sink that changed it.</t></li>
    <li><t><strong>Fence before acknowledge.</strong> A sink MUST durably apply a fence before it emits any receipt for that fence. A receipt for an unapplied fence is a forgery.</t></li>
    <li><t><strong>Absence is UNKNOWN.</strong> Missing, unverifiable, stale, or mis-bound evidence yields UNKNOWN. An empty Declared Sink Set yields UNKNOWN. A closure determination MUST NOT be promoted by the absence of a counterexample.</t></li>
    <li><t><strong>Evidence is content-bound.</strong> A receipt is bound to the epoch it fences, the cut that caused it, the sink that applied it, the challenge that requested it, and the measured configuration under which it was applied. Changing any of these invalidates the receipt for closure purposes. (This is an established mechanism, not a claim of novelty; see <xref target="novelty"/>.)</t></li>
    <li><t><strong>Receipts are not credentials.</strong> A receipt carries no bearer authority. Possession of a receipt MUST NOT grant admission anywhere.</t></li>
    <li><t><strong>Closure is scoped and monotone.</strong> A determination applies to its Declared Sink Set only. Adding evidence can move a determination toward CLOSED; losing evidence can never produce CLOSED. Evaluation MUST be idempotent.</t></li>
    <li><t><strong>Hardware binding strengthens, never replaces, enforcement.</strong> Measured-state binding makes a receipt hard to forge from compromised sink software; it does not make the sink's admission logic correct. Sink-side admission fencing (Section 8 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>) remains required.</t></li>
  </ol>
</section>

<!-- ================================================================ -->
<section anchor="arch">
  <name>Architecture</name>
  <t>The roles map onto the RATS architecture as follows.</t>
  <figure anchor="fig-arch">
    <name>Roles and messages</name>
    <artwork name="" type="ascii-art" align="left"><![CDATA[
 .------------.   cut (signed, per sink)    .--------------------.
 | Authority  |---------------------------->| Consequential Sink |
 | Root       |                             |  Target Env: gate  |
 '------------'                             |   software, journal|
       | declares scope,                    |  Attesting Env:    |
       | sink set, epoch                    |   DICE/TPM/TEE     |
       v                                    '--------------------'
 .------------.   nonce                              |
 | Closure    |-------------------------------------->|
 | Verifier   |<--------------------------------------'
 | (RATS      |   Attested Fence Receipt (EAT)
 |  Verifier +|
 |  closure   |   Reference Values / Endorsements
 |  evaluator)|<---------------- (CoRIM etc.) ---- RVP / Endorser
 '------------'
       | closure state + evidence digest
       v
 .------------.
 | Relying    |   (e.g. the party that may rely on CLOSED,
 | Party      |    or the issuer of the Closure Receipt)
 '------------'
]]></artwork>
  </figure>
  <t>The Authority Root issues one cut per sink in the Declared Sink Set. Each sink applies the fence (<xref target="fence"/>) and, on challenge, its Attesting Environment emits an Attested Fence Receipt (<xref target="receipt"/>). The Closure Verifier appraises each receipt against Reference Values for that sink (<xref target="verification"/>) and evaluates the Declared Sink Set (<xref target="closure"/>). The result and the digest of the receipt set are what the Closure Receipt of Section 11 of <xref target="I-D.watts-oauth-agent-revocation-closure"/> carries in its status and evidence fields.</t>
  <t>Receipts MAY be conveyed in any RATS topology. In the background-check topology the Relying Party forwards receipts to the Verifier; in the passport topology the sink obtains an Attestation Result (for example an EAR <xref target="I-D.ietf-rats-ear"/>) and presents that. Receipts and results MAY be wrapped in a Conceptual Message Wrapper <xref target="RFC9999"/> for transport, and MAY be registered as Signed Statements with a Transparency Service <xref target="RFC9943"/> when a durable public record of fence application is desired. None of these conveyances change the semantics defined here.</t>
</section>

<!-- ================================================================ -->
<section anchor="fence">
  <name>The Fence</name>
  <t>A fence is the sink-local realization of the admission barrier and queue fencing required by Sections 8 and 9 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>. This section states what a sink MUST have done before it may emit a receipt.</t>
  <section anchor="fence-cut">
    <name>Cut Validation</name>
    <t>A sink MUST validate a cut before applying it. The sink MUST verify the cut's signature under a trust anchor configured for the Authority Root; MUST verify that the cut's audience equals the sink's own configured identity (a request's or cut's self-declared audience is never authoritative on its own); MUST verify that the cut's scope identifier equals the sink's configured Declared Scope; MUST verify that E_prev equals the sink's current authority epoch; and MUST verify that E_new is strictly later than E_prev in the ordering defined for the scope. A cut that fails any check MUST be rejected without side effects and MUST NOT produce a receipt.</t>
    <t>The Cut Identifier is SHA-256 over the complete authenticated cut message exactly as received. Where the cut is a COSE_Sign1 structure <xref target="RFC9052"/>, the digest is over the tagged, deterministically encoded <xref target="RFC8949"/> COSE_Sign1 bytes.</t>
  </section>
  <section anchor="fence-apply">
    <name>Fence Application</name>
    <t>Fence application MUST be atomic with respect to effect commitment at the sink: there is one linearization point (for example the commit of a single database transaction, or a single-threaded journal append) at which the sink's authority epoch changes, and no effect commits "concurrently with" that point. Within the fence transaction the sink:</t>
    <ol spacing="normal">
      <li>discharges every pending operation admitted under E_prev: each is either rejected, revalidated and re-admitted under E_new by an independent authorization, or recorded as completed before the fence. Pending operations whose state cannot be determined MUST be counted as unresolved;</li>
      <li>records the highest sink-local sequence number of any effect committed under E_prev (afr_last_prev_seq);</li>
      <li>appends a FENCE record to its durable journal and assigns it the next sequence number (afr_fence_seq);</li>
      <li>invokes the hardware fence primitive (<xref target="hwprofile"/>): extends the Authority Register with the Cut Identifier, advances the monotonic counter, and makes the epoch key of E_prev underivable;</li>
      <li>durably sets its authority epoch to E_new.</li>
    </ol>
    <t>After the fence, the sink MUST deny any admission that presents E_prev as its epoch, regardless of signature validity, grant validity, or witness status. A sink MUST NOT infer that another sink has fenced from its own fence (P-1).</t>
  </section>
  <section anchor="fence-seq">
    <name>Sequence Numbers</name>
    <t>The sink's journal MUST assign strictly increasing sequence numbers to every committed effect, rejection, and fence record. These numbers are the only ordering a receipt reports. They are sink-local integers, not timestamps, and MUST NOT be compared across sinks. The invariant that a receipt attests is:</t>
    <artwork name="" type="ascii-art" align="center"><![CDATA[
   for every effect e committed at this sink under E_prev:
        seq(e) < afr_fence_seq
]]></artwork>
    <t>A receipt whose afr_last_prev_seq is greater than or equal to its afr_fence_seq reports a violation of this invariant by the sink itself. Such a receipt is valid evidence of failure (<xref target="verification"/>).</t>
  </section>
  <section anchor="fence-reboot">
    <name>Power Cycles and Restores</name>
    <t>The fence MUST survive power cycles, crashes, and restoration of the sink's software state from a backup. The durable authority epoch, the journal, and the cut history are software state; the Authority Register is volatile and the monotonic counter is persistent hardware state. On power-on the sink MUST re-establish the Authority Register from its durable cut history before producing any receipt (<xref target="hw-extend"/>). If, after a restore, the sink's software epoch disagrees with the hardware monotonic counter, the sink MUST NOT apply new cuts, MUST NOT issue receipts, and SHOULD raise an operational alarm. Effects committed by such a sink cannot be attested under the superseded epoch (<xref target="hw-ratchet"/>), which is the property that makes the restore detectable by a verifier of effect attestations.</t>
  </section>
</section>

<!-- ================================================================ -->
<section anchor="receipt">
  <name>Attested Fence Receipt</name>
  <section anchor="receipt-format">
    <name>Token Format</name>
    <t>An Attested Fence Receipt is an EAT <xref target="RFC9711"/>. The CBOR serialization is a CWT <xref target="RFC8392"/> protected by COSE_Sign1 <xref target="RFC9052"/>; the JSON serialization is a JWT <xref target="RFC7519"/> protected by JWS. Implementations MUST support the CBOR serialization. The profile identifier is the tag URI <tt>tag:goodshyt.fun,2026:afr#00</tt>, carried in the <tt>eat_profile</tt> claim.</t>
    <t>Signing algorithms: implementations MUST support EdDSA with Ed25519 <xref target="RFC8032"/> <xref target="RFC9053"/> (COSE alg -8) and SHOULD support ES256. The signing key MUST be an attestation key of the sink's Attesting Environment, for example a DICE alias key certified by the device's layered certificate chain <xref target="TCG-DICE-ATT"/> or a TPM 2.0 restricted signing key <xref target="TPM2"/>. The key identifier (<tt>kid</tt>) in the protected header MUST equal the sink's UEID. The unprotected header MUST be empty. Protected header and Claims-Set MUST be encoded deterministically (Section 4.2.1 of <xref target="RFC8949"/>) so that the Cut Identifier and receipt digests are reproducible across implementations.</t>
    <t>A receipt describes exactly one fence. A sink that has applied several cuts emits one receipt per cut and MAY chain them with <tt>afr_prev_receipt</tt>.</t>
  </section>

  <section anchor="receipt-claims">
    <name>Claims</name>
    <t><xref target="tab-claims"/> lists the Claims-Set. CWT keys in the private-use negative range are used pending registration (<xref target="iana"/>); JSON names are used in the JWT serialization, where all byte-string values are base64url-encoded without padding. In column P, M means the claim is REQUIRED, O means OPTIONAL, and C means conditionally REQUIRED as stated in the Meaning column.</t>
    <table anchor="tab-claims">
      <name>AFR Claims-Set</name>
      <thead>
        <tr><th>Claim</th><th>Key</th><th>Type</th><th>P</th><th>Meaning</th></tr>
      </thead>
      <tbody>
        <tr><td>eat_profile</td><td>265</td><td>tstr</td><td>M</td><td>MUST be <tt>tag:goodshyt.fun,2026:afr#00</tt></td></tr>
        <tr><td>eat_nonce</td><td>10</td><td>bstr (8..64)</td><td>M</td><td>Challenge supplied by the Closure Verifier (<xref target="receipt-fresh"/>)</td></tr>
        <tr><td>ueid</td><td>256</td><td>bstr</td><td>M</td><td>Device identity of the sink's Attesting Environment; MUST equal the COSE <tt>kid</tt></td></tr>
        <tr><td>iat</td><td>6</td><td>time</td><td>M</td><td>Time of receipt issuance (not of the fence)</td></tr>
        <tr><td>exp</td><td>4</td><td>time</td><td>O</td><td>After this time the receipt MUST NOT be accepted as fresh</td></tr>
        <tr><td>measurements</td><td>273</td><td>per RFC 9711</td><td>M</td><td>Measured state of the gate software and the Authority Register (<xref target="receipt-meas"/>)</td></tr>
        <tr><td>afr_sink_id</td><td>-76000</td><td>tstr</td><td>M</td><td>The sink's configured identity (its audience name); MUST NOT be copied from the cut</td></tr>
        <tr><td>afr_scope_id</td><td>-76001</td><td>tstr</td><td>M</td><td>Declared Scope identifier</td></tr>
        <tr><td>afr_epoch_prev</td><td>-76002</td><td>tstr</td><td>M</td><td>Superseded authority epoch E_prev</td></tr>
        <tr><td>afr_epoch_new</td><td>-76003</td><td>tstr</td><td>M</td><td>Current authority epoch E_new after the fence</td></tr>
        <tr><td>afr_cut_id</td><td>-76004</td><td>bstr (32)</td><td>M</td><td>Cut Identifier of the applied cut</td></tr>
        <tr><td>afr_fence_seq</td><td>-76005</td><td>uint</td><td>M</td><td>Sink-local sequence number of the FENCE record</td></tr>
        <tr><td>afr_last_prev_seq</td><td>-76006</td><td>uint</td><td>M</td><td>Highest sequence number of any effect committed under E_prev; 0 if none</td></tr>
        <tr><td>afr_pending</td><td>-76007</td><td>map</td><td>M</td><td>Discharge accounting: rejected, revalidated, completed-pre-fence, unresolved</td></tr>
        <tr><td>afr_fence_modes</td><td>-76008</td><td>uint (bits)</td><td>M</td><td>Fence modes in effect (<xref target="hw-modes"/>)</td></tr>
        <tr><td>afr_auth_pcr</td><td>-76009</td><td>map</td><td>C</td><td>Authority Register index and post-fence value; REQUIRED when the measured-extend mode is set</td></tr>
        <tr><td>afr_epoch_key</td><td>-76010</td><td>COSE_Key</td><td>C</td><td>Public effect-attestation key of E_new; REQUIRED when the key-ratchet mode is set</td></tr>
        <tr><td>afr_monotonic</td><td>-76011</td><td>uint</td><td>M</td><td>Hardware monotonic counter value after the fence</td></tr>
        <tr><td>afr_cfg_digest</td><td>-76012</td><td>bstr (32)</td><td>M</td><td>Digest of the sink's gate configuration (identity, scope, trust anchors, register assignment, modes)</td></tr>
        <tr><td>afr_prev_receipt</td><td>-76013</td><td>bstr (32)</td><td>O</td><td>Digest of the previous receipt emitted by this sink, forming a chain</td></tr>
      </tbody>
    </table>
    <t>Epoch values are opaque text in <xref target="I-D.watts-oauth-agent-revocation-closure"/>. This profile restricts them to the decimal representation of an unsigned 64-bit integer without leading zeros, so that "strictly later" is integer comparison and the value can be mirrored by a hardware counter. Deployments with a different epoch ordering MUST define a mapping to this form.</t>
    <t>The <tt>afr_pending</tt> map has four unsigned-integer members keyed 0 (rejected), 1 (revalidated under E_new), 2 (completed before the fence), and 3 (unresolved). A sink that cannot account for a pending operation MUST count it as unresolved rather than omit it.</t>
  </section>

  <section anchor="receipt-cddl">
    <name>CDDL</name>
    <sourcecode type="cddl"><![CDATA[
afr-claims = {
  &(eat_profile: 265) => "tag:goodshyt.fun,2026:afr#00",
  &(eat_nonce: 10) => bstr .size (8..64),
  &(ueid: 256) => bstr .size (7..33),
  &(iat: 6) => ~time,
  ? &(exp: 4) => ~time,
  &(measurements: 273) => [ + measurements-format ],
  &(afr-sink-id: -76000) => tstr,
  &(afr-scope-id: -76001) => tstr,
  &(afr-epoch-prev: -76002) => epoch-text,
  &(afr-epoch-new: -76003) => epoch-text,
  &(afr-cut-id: -76004) => bstr .size 32,
  &(afr-fence-seq: -76005) => uint,
  &(afr-last-prev-seq: -76006) => uint,
  &(afr-pending: -76007) => afr-pending-map,
  &(afr-fence-modes: -76008) => uint .bits afr-fence-mode,
  ? &(afr-auth-pcr: -76009) => afr-auth-register,
  ? &(afr-epoch-key: -76010) => COSE_Key,
  &(afr-monotonic: -76011) => uint,
  &(afr-cfg-digest: -76012) => bstr .size 32,
  ? &(afr-prev-receipt: -76013) => bstr .size 32,
  * $$afr-claims-extension,
}

epoch-text = text .regexp "0|[1-9][0-9]*"

afr-pending-map = {
  &(rejected: 0) => uint,
  &(revalidated: 1) => uint,
  &(completed-pre-fence: 2) => uint,
  &(unresolved: 3) => uint,
}

afr-fence-mode = &(
  durable-transaction: 0,
  measured-extend: 1,
  key-ratchet: 2,
  sealed-release: 3,
)

afr-auth-register = {
  &(index: 0) => uint,
  &(value: 1) => bstr .size 32,
}

; payload of the "application/afr-pcrs+cbor" measurements-format
; entry: register index -> current value
afr-pcr-map = { * uint => bstr .size 32 }

; measurements-format and COSE_Key are imported from RFC 9711
; and RFC 9052 respectively.
]]></sourcecode>
  </section>

  <section anchor="receipt-meas">
    <name>Measurements</name>
    <t>The <tt>measurements</tt> claim MUST contain the current values of the Authority Register and of every register that measures the gate software whose behaviour the fence depends on (boot chain, gate binary, policy, configuration). This profile defines one <tt>measurements-format</tt> content type, <tt>application/afr-pcrs+cbor</tt>, whose payload is the <tt>afr-pcr-map</tt> above. Implementations whose Attesting Environment produces DICE certificates with TcbInfo extensions <xref target="TCG-DICE-ATT"/> or TPM quotes MAY carry those instead, or in addition, using EAT submodules. A Closure Verifier MUST have Reference Values (for example CoRIM <xref target="I-D.ietf-rats-corim"/>) for the gate measurements of each sink in the Declared Sink Set.</t>
  </section>

  <section anchor="receipt-fresh">
    <name>Freshness</name>
    <t>A receipt MUST carry a nonce chosen by the Closure Verifier for this challenge (<tt>eat_nonce</tt>). The fence itself is not fresh in the nonce sense; it is a durable past event, and the same fence MAY be attested again later under a new nonce. Freshness therefore applies to the receipt, not to the fence, and a Closure Verifier that holds a verified receipt for a fence does not need a fresh one to retain the FENCED determination (P-7). A Cut Identifier MAY additionally serve as a multi-nonce in the sense of <xref target="I-D.ietf-rats-epoch-markers"/> when the Authority Root distributes cuts as Epoch Markers; the <tt>eat_nonce</tt> claim MUST still be present and MUST equal the verifier's challenge.</t>
  </section>

  <section anchor="receipt-json">
    <name>JSON Serialization</name>
    <t>In the JWT serialization the claim names are the names of <xref target="tab-claims"/>, byte strings are base64url without padding, the <tt>afr_pending</tt> and <tt>afr_auth_pcr</tt> maps use the member names given in <xref target="receipt-cddl"/> as JSON object keys, and <tt>afr_epoch_key</tt> is a JWK. The JWS protected header MUST carry <tt>alg</tt> and <tt>kid</tt> only. Receipt digests in the JSON serialization are computed over the JWS Compact Serialization bytes.</t>
  </section>
</section>

<!-- ================================================================ -->
<section anchor="verification">
  <name>Receipt Verification</name>
  <t>A Closure Verifier evaluates one receipt against an expectation tuple (scope, sink, E_prev, Cut Identifier, nonce, current time), the sink's Reference Values (UEID, attestation public key or certificate chain, expected gate measurements, expected configuration digest), and the verifier's own monotone state for that sink (highest monotonic counter seen, cut history, last receipt digest). The result is one of:</t>
  <dl newline="false" spacing="compact">
    <dt>INVALID:</dt><dd>the receipt is not evidence of anything;</dd>
    <dt>FENCED:</dt><dd>the receipt is a Fence Witness for the expectation tuple;</dd>
    <dt>PARTIAL:</dt><dd>the fence was applied but unresolved pending operations remain;</dd>
    <dt>FAILED:</dt><dd>the receipt is evidence that the sink violated the fence invariant or that its state regressed.</dd>
  </dl>
  <t>The steps below MUST be performed in order, and the first failing step determines the result. Any step not listed as producing FAILED or PARTIAL produces INVALID.</t>
  <ol spacing="normal">
    <li><strong>Structure and signature.</strong> Decode the CWT and COSE_Sign1 strictly. The <tt>kid</tt> MUST equal the sink's UEID from Reference Values. Verify the signature under the sink's attestation key. Verify that the Claims-Set contains every REQUIRED claim and no claim outside this profile other than registered EAT claims the verifier understands.</li>
    <li><strong>Profile and types.</strong> <tt>eat_profile</tt> MUST equal the AFR profile identifier. Every claim MUST have the type and size of <xref target="receipt-cddl"/>. <tt>afr_epoch_new</tt> MUST be strictly greater than <tt>afr_epoch_prev</tt>.</li>
    <li><strong>Binding.</strong> <tt>ueid</tt>, <tt>afr_sink_id</tt>, <tt>afr_scope_id</tt>, <tt>afr_epoch_prev</tt>, <tt>afr_cut_id</tt>, <tt>eat_nonce</tt>, and <tt>afr_cfg_digest</tt> MUST each equal the corresponding value of the expectation tuple or Reference Values. A mismatch in any one of them means the receipt answers a different question; it MUST NOT be reused for this one.</li>
    <li><strong>Freshness.</strong> <tt>iat</tt> MUST be within the verifier's acceptance window relative to the current time, and <tt>exp</tt>, if present, MUST not have passed.</li>
    <li><strong>Measured TCB.</strong> Every expected gate measurement MUST match the corresponding entry in <tt>measurements</tt>. A receipt from unreferenced gate software is INVALID even if every other claim is consistent: the verifier has no basis to trust what that software says it did.</li>
    <li><strong>Monotonicity.</strong> If <tt>afr_monotonic</tt> is lower than the highest value previously verified for this sink, the result is FAILED (MONOTONIC_REGRESSION). If the measured-extend mode is set, recompute the expected Authority Register value by extending from the all-zero value over the verifier's recorded cut history for this sink up to and including the expected Cut Identifier; if the receipt is for a cut already in the history, use the history prefix ending at that cut. The receipt's <tt>afr_auth_pcr</tt> value and the Authority Register entry in <tt>measurements</tt> MUST both equal the recomputed value; otherwise the result is FAILED (AUTH_REGISTER_MISMATCH). If the key-ratchet mode is set, <tt>afr_epoch_key</tt> MUST be a well-formed public key. The durable-transaction mode MUST be set.</li>
    <li><strong>Chain.</strong> If <tt>afr_prev_receipt</tt> is present and the verifier holds a previous receipt digest for this sink, they MUST match; otherwise the result is FAILED (RECEIPT_CHAIN_BROKEN).</li>
    <li><strong>Self-incrimination.</strong> If <tt>afr_last_prev_seq</tt> is greater than or equal to <tt>afr_fence_seq</tt>, the result is FAILED (POST_FENCE_PREV_EPOCH_EFFECT).</li>
    <li><strong>Discharge.</strong> If the unresolved count in <tt>afr_pending</tt> is greater than zero, the result is PARTIAL. Otherwise the result is FENCED.</li>
  </ol>
  <t>Only when the result is FENCED or PARTIAL does the verifier update its monotone state for the sink: the highest monotonic value, the cut history (appending the Cut Identifier if new), and the last receipt digest. Verification MUST be idempotent: verifying the same receipt twice, or a later re-issued receipt for the same fence, MUST yield the same result. The reference implementation realizes this by recomputing the Authority Register chain from the recorded cut history rather than from a single "current" expected value.</t>
  <t>A FAILED result is actionable evidence and MUST be surfaced, not merely discarded. It indicates that the sink, its storage, or its hardware state is inconsistent with the claimed fence.</t>
</section>

<!-- ================================================================ -->
<section anchor="closure">
  <name>Closure Evaluation over a Declared Sink Set</name>
  <t>Given a Declared Scope S, an authority epoch E_prev, the Declared Sink Set K = {k_1, ..., k_n}, the Cut Identifier c_i sent to each sink, the challenge nonce n_i issued to each sink, the set of receipts collected, Reference Values for every sink, a boolean Normal-Path Witness (Section 10 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>), and the set U of sinks known to exist but not in K ("unindexed"), the Closure Verifier computes:</t>
  <artwork name="" type="ascii-art" align="left"><![CDATA[
  if K is empty:                        return UNKNOWN (EMPTY_SCOPE)
  for each k_i in K:
      r_i := verify_receipt(receipt_i, (S, k_i, E_prev, c_i, n_i))
             or INVALID (NO_RECEIPT) if none was collected
  if any r_i == FAILED:                 return FAILED
  if any r_i == INVALID
     or not NormalPathWitness:          return UNKNOWN
  if any r_i == PARTIAL or U nonempty:  return PARTIAL
  return CLOSED
]]></artwork>
  <t>The determination applies to (S, E_prev, K) only. The Closure Verifier MUST record, alongside the status, the per-sink results and an evidence digest computed as SHA-256 over the deterministically encoded, sorted list of the digests of every receipt that contributed. That digest is the value for the <tt>evidence_digest</tt> field of the Closure Receipt of <xref target="I-D.watts-oauth-agent-revocation-closure"/>, and the per-sink results populate its unresolved-paths field.</t>
  <t>Requirements:</t>
  <ul spacing="normal">
    <li>CLOSED MUST NOT be returned unless every sink in K has a FENCED receipt for E_prev and its own Cut Identifier. A receipt for a different epoch, sink, scope, or cut MUST NOT count (P-5).</li>
    <li>Sinks in U MUST prevent CLOSED. Discovering an unindexed sink after a CLOSED determination MUST cause the determination to be withdrawn and re-evaluated with K extended (Section 14 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>).</li>
    <li>Evaluation MUST be monotone in evidence: for any subset of the receipts, the result MUST NOT rank higher than the result over the full set, where UNKNOWN &lt; PARTIAL &lt; CLOSED and FAILED is terminal. A verifier that loses a receipt MUST NOT retain a CLOSED determination that depended on it unless it retains the receipt digest and the per-sink FENCED result in tamper-evident state.</li>
    <li>CLOSED does not reverse effects committed before each sink's fence and does not say anything about effects committed under E_new.</li>
  </ul>
  <t>The decisive experimental scenario of <xref target="intro"/> evaluates as follows under this procedure: with K = {A, B}, A's FENCED receipt and no receipt from B, the result is UNKNOWN; B's hidden-descendant effect under E_prev is admitted at B during that window, and nothing in the evidence claimed otherwise. Once B applies its cut and emits a receipt whose <tt>afr_last_prev_seq</tt> (the hidden effect's sequence number) is below its <tt>afr_fence_seq</tt>, the result is CLOSED for (S, E_prev, {A, B}). Had B's old-epoch effect been committed after its fence, B's own receipt would carry <tt>afr_last_prev_seq &gt;= afr_fence_seq</tt> and the result would be FAILED.</t>
</section>

<!-- ================================================================ -->
<section anchor="hwprofile">
  <name>Hardware Fence Profile</name>
  <t>This section specifies how a fence is bound to hardware state so that a receipt cannot be forged by the sink's own software and so that the fence survives software rollback. It is written against the primitives of a DICE layering architecture <xref target="TCG-DICE-HW"/> <xref target="TCG-DICE-ATT"/> with a DICE Protection Environment <xref target="TCG-DPE"/>, and against the equivalent TPM 2.0 primitives <xref target="TPM2"/>. An informative mapping to one concrete identity-engine design appears in <xref target="app-engine"/>.</t>

  <section anchor="hw-modes">
    <name>Fence Modes</name>
    <t>The <tt>afr_fence_modes</tt> claim is a bit set. A receipt MUST set bit 0 (durable transaction): the fence is a durable, atomic sink transaction as required by <xref target="fence-apply"/>. The remaining bits declare which hardware bindings were applied. A Closure Verifier's policy decides which modes it requires; this document RECOMMENDS that a CLOSED determination intended to survive compromise of sink software require at least measured-extend and key-ratchet.</t>
  </section>

  <section anchor="hw-extend">
    <name>Measured Extend (bit 1)</name>
    <t>The sink reserves one extend-only register as the Authority Register. On every fence it extends that register with the Cut Identifier:</t>
    <artwork name="" type="ascii-art" align="center"><![CDATA[
   AuthReg := SHA-256( AuthReg || CutIdentifier )
]]></artwork>
    <t>The extend MUST be the standard SHA-256 of the 64-byte concatenation, including the SHA-256 padding block (the "TPM-style" extend). A measurement core that applies a single unpadded compression-function invocation to the 64-byte block produces a different value that no standards-based verifier can reproduce; see <xref target="app-engine"/> for an instance of this discrepancy found in a reference design.</t>
    <t>Because the register can only be extended, the post-fence value cannot be reverted by software within a power cycle. At power-on the register is zero; the sink MUST re-extend it with every Cut Identifier in its durable cut history, in order, before issuing any receipt. The verifier recomputes the same chain from the cuts it issued. A sink whose durable cut history was truncated by a restore will therefore present a register value that the verifier does not expect, and the receipt fails (<xref target="verification"/>, step 6). The register value is reported both in <tt>afr_auth_pcr</tt> and in <tt>measurements</tt>, so that a quote-style attester that signs only the register bank still binds it.</t>
    <t>The monotonic counter (<tt>afr_monotonic</tt>) MUST be a hardware counter that persists across power cycles and that no software can decrement: a TPM 2.0 NV counter index, a one-time-programmable fuse bank, or an equivalent. It MUST be advanced inside the fence. It is what makes a software restore detectable even if the attacker also replays an old cut history: the counter cannot be returned to its earlier value. Counter capacity bounds the number of fences a sink can apply over its life; deployments using fuse banks MUST size them accordingly.</t>
  </section>

  <section anchor="hw-ratchet">
    <name>Key Ratchet (bit 2)</name>
    <t>Every effect committed at the sink is attested under the epoch key of the epoch in force at commit time. The epoch key of E_prev MUST be unobtainable after the fence. Two complementary realizations are specified; an implementation claiming this mode MUST provide the second and SHOULD provide the first:</t>
    <ol spacing="normal">
      <li><strong>Forward-secret ladder (within a power cycle).</strong> K_{n+1} = HMAC-SHA-256(K_n, "RATC" || counter), with K_n zeroized on advance. After the ratchet the previous key no longer exists in any register.</li>
      <li><strong>Counter-gated derivation (across power cycles).</strong> The Attesting Environment derives the epoch key for epoch E as KDF(CDI_sealing, "EPKY" || E) and MUST refuse the derivation unless E equals the current monotonic counter value. Because the CDI is re-derived deterministically at every boot, a ladder alone would allow software to re-derive superseded keys after a reboot; counter gating closes that path.</li>
    </ol>
    <t>The receipt commits to the public key of E_new in <tt>afr_epoch_key</tt>. A verifier of effect attestations (for example an auditor of the sink's journal) accepts an effect attestation under E_prev only if its sequence number is below the fence sequence reported by a verified receipt. A sink whose software has been rolled back can still mutate its own storage, but it cannot produce an effect attestation under E_prev, and any such unattested effect is visible as a fault in its journal.</t>
    <t>In a DICE Protection Environment the epoch key is a derived context whose derivation input includes the counter value; <tt>DestroyContext</tt> on the superseded context realizes the ladder step <xref target="TCG-DPE"/>. On a TPM 2.0, the equivalent is a key whose authorization policy requires <tt>TPM2_PolicyNV</tt> equality against the counter index.</t>
  </section>

  <section anchor="hw-sealed">
    <name>Sealed Release (bit 3)</name>
    <t>Where committing an effect requires a secret (a model decryption key, a signing key for an external API, a storage encryption key), the sink MAY seal that secret under a policy that includes the Authority Register. After a fence, material sealed under the pre-fence register value cannot be unsealed, so the effect path is fenced cryptographically rather than only by the gate's decision logic. Material that must survive fences (telemetry keys, the attestation key itself) MUST NOT be sealed to the Authority Register. This mode converts P-8 from a statement about software correctness into a statement about key availability, but it does not remove the need for admission fencing: an effect that needs no sealed material is fenced only by the gate.</t>
  </section>

  <section anchor="hw-receipt">
    <name>Receipt Emission</name>
    <t>The receipt MUST be produced by the Attesting Environment from the durable fence record, not assembled by the gate software from values the gate chooses. The attestation key MUST be bound to the measured boot state (for example an alias key derived from a CDI that includes the gate measurements), so that altered gate software cannot sign with the referenced key. The <tt>afr_cfg_digest</tt> claim MUST be computed by the Attesting Environment over the configuration actually in force.</t>
  </section>
</section>

<!-- ================================================================ -->
<section anchor="related">
  <name>Relationship to Existing Mechanisms</name>
  <dl newline="true" spacing="normal">
    <dt>OAuth token revocation <xref target="RFC7009"/> and agent-level revocation <xref target="I-D.chen-oauth-agent-revocation"/>:</dt>
    <dd>A revocation endpoint accepts a request; this document provides the evidence that a sink enforced the consequence. The two are complementary, as Section 12.1 of <xref target="I-D.watts-oauth-agent-revocation-closure"/> requires.</dd>
    <dt>Transaction Tokens <xref target="I-D.ietf-oauth-transaction-tokens"/> and WIMSE identity <xref target="I-D.ietf-wimse-arch"/> <xref target="I-D.ietf-wimse-aims"/>:</dt>
    <dd>A sink identity in this document MAY be a WIMSE identifier. Identity (WIMSE), authority (OAuth), and closure evidence (this document) remain separate determinations.</dd>
    <dt>RATS Epoch Markers <xref target="I-D.ietf-rats-epoch-markers"/>:</dt>
    <dd>Epoch Markers establish freshness epochs rung by an Epoch Bell. Authority epochs are a different notion (bounded lifetimes of authority). An Authority Root MAY distribute cuts as Epoch Markers with a strictly-monotonic-counter epoch id, in which case the Cut Identifier doubles as the freshness handle; the receipt still carries the verifier's nonce.</dd>
    <dt>EAT Attestation Results <xref target="I-D.ietf-rats-ear"/> and AR4SI <xref target="I-D.ietf-rats-ar4si"/>:</dt>
    <dd>A Closure Verifier that is a separate RATS Verifier MAY express the appraisal of a receipt as an EAR whose trustworthiness vector reflects the measured-TCB and binding checks; the FENCED/PARTIAL/FAILED outcome is an application-level result that accompanies the vector and is not a substitute for it.</dd>
    <dt>EAT profile for AI agents <xref target="I-D.messous-eat-ai"/>:</dt>
    <dd>That profile attests what an agent is (model digest, training provenance, permitted interfaces). A sink MAY carry those claims in a submodule of the receipt when the gate itself hosts a model; this document attests what a sink has stopped accepting.</dd>
    <dt>Composition of action evidence with platform evidence <xref target="I-D.sokolov-rats-aep-composition"/>:</dt>
    <dd>That work binds evidence that an action was performed to the platform that performed it. This document binds evidence that no further action under a superseded authority can be performed. The two compose naturally: effect attestations under an epoch key are action evidence, and the receipt is the boundary that ends the epoch.</dd>
    <dt>SCITT <xref target="RFC9943"/>:</dt>
    <dd>Receipts MAY be registered as Signed Statements so that a Transparency Service receipt proves when a fence was attested. The SCITT receipt proves registration; it does not replace receipt verification.</dd>
    <dt>Measured-state invalidation in existing platforms:</dt>
    <dd>Extending a PCR and incrementing a TPM event counter to invalidate subsequent attestation is practiced in deployed platform software (for example the Windows TBS <tt>Tbsi_Revoke_Attestation</tt> function <xref target="MS-TBS"/>). This document applies the same primitive to authority epochs and makes the resulting state a verifiable claim. See <xref target="novelty"/>.</dd>
    <dt>Fencing tokens in distributed systems <xref target="FENCING"/>:</dt>
    <dd>Monotonic fencing tokens let a storage service reject stale lease holders. The authority epoch plays the role of the fencing token; the receipt is the storage service's attested statement that it has adopted the new token.</dd>
  </dl>
</section>

<!-- ================================================================ -->
<section anchor="conformance">
  <name>Conformance and Falsification Cases</name>
  <t>An implementation claiming conformance MUST reproduce the following outcomes. Each case corresponds to a test in the reference implementation and, where marked, to a published test vector (<xref target="impl-status"/>). An observer falsifies a CLOSED determination by exhibiting, for a sink in the Declared Sink Set, an effect attested under E_prev whose sequence number is at or above the fence sequence of a receipt that verified FENCED.</t>
  <table anchor="tab-cases">
    <name>Conformance cases</name>
    <thead><tr><th>Case</th><th>Construction</th><th>Required outcome</th><th>Vector</th></tr></thead>
    <tbody>
      <tr><td>F-1</td><td>Two operations pending at the fence; a stale E_prev request after the fence</td><td>Both pending operations rejected; stale request denied; no E_prev effect after the fence</td><td>-</td></tr>
      <tr><td>F-2</td><td>Derive the E_prev epoch key after the fence</td><td>Derivation refused</td><td>-</td></tr>
      <tr><td>F-3</td><td>Verify a receipt for the applied fence</td><td>FENCED; <tt>afr_auth_pcr</tt> equals the recomputed chain</td><td>AFR-V01, AFR-V02</td></tr>
      <tr><td>F-4</td><td>Same receipt against a different epoch, sink, cut, nonce, or configuration digest</td><td>INVALID in every case</td><td>AFR-V03..V07</td></tr>
      <tr><td>F-5</td><td>Receipt from a sink running gate software not in Reference Values</td><td>INVALID (untrusted TCB)</td><td>AFR-V08</td></tr>
      <tr><td>F-6</td><td>Receipt with a flipped signature bit, or re-signed by a non-attester key</td><td>INVALID</td><td>AFR-V09</td></tr>
      <tr><td>F-7</td><td>Receipt reporting <tt>afr_last_prev_seq &gt;= afr_fence_seq</tt></td><td>FAILED</td><td>AFR-V10</td></tr>
      <tr><td>F-8</td><td>Receipt reporting unresolved pending operations</td><td>PARTIAL</td><td>AFR-V11</td></tr>
      <tr><td>F-9</td><td>Receipt whose monotonic counter is below the verifier's recorded value</td><td>FAILED</td><td>AFR-V12</td></tr>
      <tr><td>F-10</td><td>Two sinks; A fenced; B holds an unobserved descendant's queued request and no cut</td><td>UNKNOWN with A's receipt only; B commits the E_prev effect; CLOSED once B's receipt arrives with the effect below its fence</td><td>AFR-C01, AFR-C02</td></tr>
      <tr><td>F-11</td><td>Empty Declared Sink Set; full receipts without a Normal-Path Witness</td><td>UNKNOWN in both cases</td><td>AFR-C07, AFR-C03</td></tr>
      <tr><td>F-12</td><td>Full receipts, one unindexed sink known</td><td>PARTIAL</td><td>AFR-C04</td></tr>
      <tr><td>F-13</td><td>Evaluate every subset of the receipts</td><td>No subset ranks above the full set</td><td>-</td></tr>
      <tr><td>F-14</td><td>Restore the sink's software state from a pre-fence backup</td><td>No E_prev effect attestation possible; cut re-application refused; no receipt issuable</td><td>-</td></tr>
      <tr><td>F-15</td><td>Power-cycle the sink after a fence</td><td>Authority Register re-established; E_prev key still underivable; re-issued receipt verifies and chains</td><td>-</td></tr>
      <tr><td>F-16</td><td>Secret sealed to the Authority Register before the fence</td><td>Unseal fails after the fence; secret sealed without the register still unseals</td><td>-</td></tr>
      <tr><td>F-17</td><td>Zeroize after a fence</td><td>No receipt issuable</td><td>-</td></tr>
    </tbody>
  </table>
</section>

<!-- ================================================================ -->
<section anchor="impl-status">
  <name>Implementation Status</name>
  <t>This section records the status of known implementations as described in <xref target="RFC7942"/>. It is to be removed before publication as an RFC.</t>
  <t>A reference implementation accompanies this draft (Python 3.13, dependencies: cbor2 and cryptography; MIT-licensed test code under a private research hold). It contains a behavioural model of a DICE-style identity engine (extend-only registers, HMAC key ladder, PCR-bound sealing, monotonic counter, zeroize, EAT quote signer), a consequential sink with a durable journal and the fence of <xref target="fence"/>, the receipt builder and verifier of <xref target="receipt"/> and <xref target="verification"/>, the closure evaluator of <xref target="closure"/>, and a deterministic vector generator. Its own minimal COSE_Sign1/CWT encoder was cross-checked for byte identity against the signing path of an independent COSE library. At the time of writing: 25 tests pass, covering every case in <xref target="tab-cases"/>; 14 receipt vectors (2 FENCED, 9 INVALID, 2 FAILED, 1 PARTIAL) and 7 closure vectors (1 CLOSED, 3 UNKNOWN, 2 PARTIAL, 1 FAILED) are byte-reproducible from labelled seeds.</t>
  <t>Limitations: single host, synthetic keys, single-threaded sink model (atomicity is by construction, not demonstrated under concurrency), no real DICE certificate chain or TPM, no network, no crash-fault injection, and no independent reproduction by a separate engineering team. The implementation was developed with AI assistance alongside this document and is therefore not an independent interpretation of it.</t>
</section>

<!-- ================================================================ -->
<section anchor="security">
  <name>Security Considerations</name>
  <t>The security considerations of <xref target="RFC9334"/>, <xref target="RFC9711"/>, <xref target="RFC9052"/>, and Section 19 of <xref target="I-D.watts-oauth-agent-revocation-closure"/> apply.</t>
  <t><strong>Compromised gate software.</strong> The central threat is a sink whose application software is compromised after the fence, or that was compromised before the fence and reports a fence it did not apply. Measured-extend binds the receipt to register state that software cannot revert; measured-TCB verification rejects receipts from software not in Reference Values; the attestation key is bound to measured boot state so that altered software cannot sign with the referenced key. What hardware binding does not do is make a referenced-but-buggy gate admit correctly; P-8 applies.</t>
  <t><strong>Compromised Attesting Environment.</strong> If the Attesting Environment itself is compromised (key extraction, fault injection, a defective PUF or fuzzy extractor), every guarantee in this document fails for that sink. The reference identity-engine design behind <xref target="app-engine"/> treats tamper detection, zeroization latency, and side-channel resistance of its ECDSA and error-correction logic as separate workstreams; a deployment MUST assess them. A Closure Verifier SHOULD treat a sink whose endorsements are withdrawn as INVALID for all future receipts and SHOULD re-evaluate determinations that relied on it.</t>
  <t><strong>Rollback.</strong> Restoring a sink's storage from a pre-fence backup is the attack that motivated the monotonic counter. With the counter, the restored sink cannot re-apply the cut, cannot attest E_prev effects, and cannot issue a receipt; a verifier that has already recorded the fence retains the FENCED result (P-7) and will see any later receipt from that sink fail. Without a persistent counter, measured-extend alone protects only within a power cycle.</t>
  <t><strong>Replay and substitution.</strong> Receipts are bound to nonce, epoch, cut, sink, scope, and configuration. A receipt replayed for a later epoch, presented for another sink, or presented after a configuration change is INVALID. A Cut Identifier used as a multi-nonce does not protect against replay of the receipt to a different verifier; the per-verifier nonce does.</t>
  <t><strong>Self-incrimination and omission.</strong> A sink can lie by omission (under-reporting <tt>afr_last_prev_seq</tt>). Omission is detectable by auditing effect attestations against the receipt: an effect attestation under E_prev with a sequence number at or above the fence sequence contradicts the receipt and is signed by a key the sink could only hold before the fence. Deployments SHOULD retain effect attestations for the lifetime of the determinations that depend on them.</t>
  <t><strong>Unindexed sinks and incomplete graphs.</strong> No receipt protocol can prove the absence of a sink the Authority Root does not know about. The Declared Sink Set is a claim by the root; discovering a sink outside it withdraws CLOSED. Graph completeness is a deployment property and an audit target, not something this document establishes.</t>
  <t><strong>Clock and sequence semantics.</strong> Sink sequence numbers are local; receipts assert nothing about wall-clock order across sinks. <tt>iat</tt> depends on the sink's clock and is used only for a freshness window; a sink without a trusted clock SHOULD set <tt>iat</tt> from a trusted time source at the Closure Verifier's challenge or omit freshness claims other than the nonce.</t>
  <t><strong>Counter exhaustion and denial of service.</strong> An attacker who can cause many cuts can exhaust a fuse-based counter or starve a sink with fence transactions. Cut issuance is an Authority Root operation and MUST be authenticated and rate-limited. Large Declared Sink Sets multiply receipt collection; a verifier MUST bound the resources it spends per determination.</t>
  <t><strong>Key material in receipts.</strong> Receipts carry public keys and digests only. They MUST NOT carry CDIs, epoch private keys, sealed material, or helper data.</t>
  <t><strong>Measurement core correctness.</strong> The extend-computation discrepancy described in <xref target="hw-extend"/> is not merely an interoperability issue: a verifier that silently accepted vendor-specific extend arithmetic would be unable to recompute the Authority Register chain and would have to trust the sink's reported value, defeating step 6 of <xref target="verification"/>. Verifiers MUST recompute; sinks MUST use the standard extend.</t>
</section>

<!-- ================================================================ -->
<section anchor="privacy">
  <name>Privacy Considerations</name>
  <t>A receipt reveals the sink's UEID, its scope identifier, its epoch numbers, the digest of its configuration, and its measured software state. Together these can identify a device and its deployment. Receipts SHOULD be conveyed only to the Closure Verifier and Relying Parties that need them, SHOULD NOT be published without the sink owner's consent, and when registered with a Transparency Service SHOULD be registered as digests or with scope identifiers that are not linkable across unrelated deployments. The privacy considerations of <xref target="RFC9711"/> regarding UEIDs apply; a sink MAY use a semi-permanent UEID per scope. Epoch identifiers SHOULD NOT be reused as durable correlation identifiers across unrelated contexts (Section 18 of <xref target="I-D.watts-oauth-agent-revocation-closure"/>).</t>
</section>

<!-- ================================================================ -->
<section anchor="iana">
  <name>IANA Considerations</name>
  <t>If this document proceeds, the following registrations would be requested. Values shown are placeholders in the CWT private-use range and are to be replaced by assigned values.</t>
  <section anchor="iana-cwt">
    <name>CWT Claims</name>
    <t>Registration in the "CBOR Web Token (CWT) Claims" registry of the claims afr_sink_id, afr_scope_id, afr_epoch_prev, afr_epoch_new, afr_cut_id, afr_fence_seq, afr_last_prev_seq, afr_pending, afr_fence_modes, afr_auth_pcr, afr_epoch_key, afr_monotonic, afr_cfg_digest, and afr_prev_receipt, with the descriptions of <xref target="tab-claims"/>, Change Controller IETF, and this document as the specification. Requested keys: -76000 through -76013 are used in this draft as placeholders and are NOT the requested values.</t>
  </section>
  <section anchor="iana-jwt">
    <name>JSON Web Token Claims</name>
    <t>Registration of the same claim names in the "JSON Web Token Claims" registry.</t>
  </section>
  <section anchor="iana-media">
    <name>Media Types</name>
    <t>Registration of <tt>application/afr-pcrs+cbor</tt> as the content type of the register-map measurements-format entry defined in <xref target="receipt-meas"/>, and of <tt>application/afr+cwt</tt> for the receipt itself.</t>
  </section>
  <section anchor="iana-profile">
    <name>EAT Profile</name>
    <t>EAT profiles are identified by URI and need no registry action. The profile URI is <tt>tag:goodshyt.fun,2026:afr#00</tt>; a future revision would use a tag URI under ietf.org.</t>
  </section>
</section>

</middle>

<!-- ================================================================ -->
<back>

<references>
  <name>References</name>
  <references>
    <name>Normative References</name>

    <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
      <front><title>Key words for use in RFCs to Indicate Requirement Levels</title>
        <author initials="S." surname="Bradner" fullname="S. Bradner"/><date year="1997" month="March"/></front>
      <seriesInfo name="BCP" value="14"/><seriesInfo name="RFC" value="2119"/><seriesInfo name="DOI" value="10.17487/RFC2119"/>
    </reference>
    <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
      <front><title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
        <author initials="B." surname="Leiba" fullname="B. Leiba"/><date year="2017" month="May"/></front>
      <seriesInfo name="BCP" value="14"/><seriesInfo name="RFC" value="8174"/><seriesInfo name="DOI" value="10.17487/RFC8174"/>
    </reference>
    <reference anchor="RFC7519" target="https://www.rfc-editor.org/info/rfc7519">
      <front><title>JSON Web Token (JWT)</title>
        <author initials="M." surname="Jones"/><author initials="J." surname="Bradley"/><author initials="N." surname="Sakimura"/><date year="2015" month="May"/></front>
      <seriesInfo name="RFC" value="7519"/><seriesInfo name="DOI" value="10.17487/RFC7519"/>
    </reference>
    <reference anchor="RFC8032" target="https://www.rfc-editor.org/info/rfc8032">
      <front><title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
        <author initials="S." surname="Josefsson"/><author initials="I." surname="Liusvaara"/><date year="2017" month="January"/></front>
      <seriesInfo name="RFC" value="8032"/><seriesInfo name="DOI" value="10.17487/RFC8032"/>
    </reference>
    <reference anchor="RFC8392" target="https://www.rfc-editor.org/info/rfc8392">
      <front><title>CBOR Web Token (CWT)</title>
        <author initials="M." surname="Jones"/><author initials="E." surname="Wahlstroem"/><author initials="S." surname="Erdtman"/><author initials="H." surname="Tschofenig"/><date year="2018" month="May"/></front>
      <seriesInfo name="RFC" value="8392"/><seriesInfo name="DOI" value="10.17487/RFC8392"/>
    </reference>
    <reference anchor="RFC8949" target="https://www.rfc-editor.org/info/rfc8949">
      <front><title>Concise Binary Object Representation (CBOR)</title>
        <author initials="C." surname="Bormann"/><author initials="P." surname="Hoffman"/><date year="2020" month="December"/></front>
      <seriesInfo name="STD" value="94"/><seriesInfo name="RFC" value="8949"/><seriesInfo name="DOI" value="10.17487/RFC8949"/>
    </reference>
    <reference anchor="RFC9052" target="https://www.rfc-editor.org/info/rfc9052">
      <front><title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
        <author initials="J." surname="Schaad"/><date year="2022" month="August"/></front>
      <seriesInfo name="STD" value="96"/><seriesInfo name="RFC" value="9052"/><seriesInfo name="DOI" value="10.17487/RFC9052"/>
    </reference>
    <reference anchor="RFC9053" target="https://www.rfc-editor.org/info/rfc9053">
      <front><title>CBOR Object Signing and Encryption (COSE): Initial Algorithms</title>
        <author initials="J." surname="Schaad"/><date year="2022" month="August"/></front>
      <seriesInfo name="RFC" value="9053"/><seriesInfo name="DOI" value="10.17487/RFC9053"/>
    </reference>
    <reference anchor="RFC9334" target="https://www.rfc-editor.org/info/rfc9334">
      <front><title>Remote ATtestation procedureS (RATS) Architecture</title>
        <author initials="H." surname="Birkholz"/><author initials="D." surname="Thaler"/><author initials="M." surname="Richardson"/><author initials="N." surname="Smith"/><author initials="W." surname="Pan"/><date year="2023" month="January"/></front>
      <seriesInfo name="RFC" value="9334"/><seriesInfo name="DOI" value="10.17487/RFC9334"/>
    </reference>
    <reference anchor="RFC9711" target="https://www.rfc-editor.org/info/rfc9711">
      <front><title>The Entity Attestation Token (EAT)</title>
        <author initials="L." surname="Lundblade"/><author initials="G." surname="Mandyam"/><author initials="J." surname="O'Donoghue"/><author initials="C." surname="Wallace"/><date year="2025" month="April"/></front>
      <seriesInfo name="RFC" value="9711"/><seriesInfo name="DOI" value="10.17487/RFC9711"/>
    </reference>
    <reference anchor="I-D.watts-oauth-agent-revocation-closure" target="https://datatracker.ietf.org/doc/draft-watts-oauth-agent-revocation-closure/">
      <front><title>Revocation Closure and Authority Epochs for Agent Delegation</title>
        <author initials="D. O." surname="Watts" fullname="Deonté O'dell Watts"/><date year="2026" month="October" day="29"/></front>
      <seriesInfo name="Internet-Draft" value="draft-watts-oauth-agent-revocation-closure-02"/>
      <refcontent>Work in Progress</refcontent>
    </reference>
  </references>

  <references>
    <name>Informative References</name>

    <reference anchor="RFC7009" target="https://www.rfc-editor.org/info/rfc7009">
      <front><title>OAuth 2.0 Token Revocation</title>
        <author initials="T." surname="Lodderstedt"/><author initials="S." surname="Dronia"/><author initials="M." surname="Scurtescu"/><date year="2013" month="August"/></front>
      <seriesInfo name="RFC" value="7009"/><seriesInfo name="DOI" value="10.17487/RFC7009"/>
    </reference>
    <reference anchor="RFC7942" target="https://www.rfc-editor.org/info/rfc7942">
      <front><title>Improving Awareness of Running Code: The Implementation Status Section</title>
        <author initials="Y." surname="Sheffer"/><author initials="A." surname="Farrel"/><date year="2016" month="July"/></front>
      <seriesInfo name="BCP" value="205"/><seriesInfo name="RFC" value="7942"/><seriesInfo name="DOI" value="10.17487/RFC7942"/>
    </reference>
    <reference anchor="RFC9943" target="https://www.rfc-editor.org/info/rfc9943">
      <front><title>An Architecture for Trustworthy and Transparent Digital Supply Chains</title>
        <author initials="H." surname="Birkholz"/><author initials="A." surname="Delignat-Lavaud"/><author initials="C." surname="Fournet"/><author initials="Y." surname="Deshpande"/><author initials="S." surname="Lasker"/><date year="2026" month="March"/></front>
      <seriesInfo name="RFC" value="9943"/><seriesInfo name="DOI" value="10.17487/RFC9943"/>
    </reference>
    <reference anchor="RFC9999" target="https://www.rfc-editor.org/info/rfc9999">
      <front><title>Remote ATtestation procedureS (RATS) Conceptual Message Wrapper (CMW)</title>
        <author initials="H." surname="Birkholz"/><author initials="N." surname="Smith"/><author initials="T." surname="Fossati"/><author initials="H." surname="Tschofenig"/><author initials="D." surname="Glaze"/><date year="2026" month="July"/></front>
      <seriesInfo name="RFC" value="9999"/><seriesInfo name="DOI" value="10.17487/RFC9999"/>
    </reference>
    <reference anchor="I-D.ietf-rats-ear" target="https://datatracker.ietf.org/doc/draft-ietf-rats-ear/">
      <front><title>EAT Attestation Results</title>
        <author initials="T." surname="Fossati"/><author initials="E." surname="Voit"/><author initials="S." surname="Trofimov"/><author initials="H." surname="Birkholz"/><date year="2026" month="May"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-rats-ear-04"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-rats-ar4si" target="https://datatracker.ietf.org/doc/draft-ietf-rats-ar4si/">
      <front><title>Attestation Results for Secure Interactions</title>
        <author initials="E." surname="Voit"/><author initials="H." surname="Birkholz"/><author initials="T." surname="Hardjono"/><author initials="T." surname="Fossati"/><author initials="V." surname="Scarlata"/><date year="2026" month="May"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-rats-ar4si-10"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-rats-corim" target="https://datatracker.ietf.org/doc/draft-ietf-rats-corim/">
      <front><title>Concise Reference Integrity Manifest</title>
        <author initials="H." surname="Birkholz"/><author initials="T." surname="Fossati"/><author initials="Y." surname="Deshpande"/><author initials="N." surname="Smith"/><author initials="W." surname="Pan"/><date year="2026" month="November"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-rats-corim-12"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-rats-epoch-markers" target="https://datatracker.ietf.org/doc/draft-ietf-rats-epoch-markers/">
      <front><title>Epoch Markers</title>
        <author initials="H." surname="Birkholz"/><author initials="T." surname="Fossati"/><author initials="W." surname="Pan"/><author initials="I." surname="Mihalcea"/><author initials="C." surname="Bormann"/><date year="2026" month="July"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-rats-epoch-markers-05"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-wimse-arch" target="https://datatracker.ietf.org/doc/draft-ietf-wimse-arch/">
      <front><title>Workload Identity in a Multi System Environment (WIMSE) Architecture</title>
        <author><organization>IETF WIMSE Working Group</organization></author><date year="2026"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-wimse-arch-08"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-wimse-aims" target="https://datatracker.ietf.org/doc/draft-ietf-wimse-aims/">
      <front><title>AI Identity Management System</title>
        <author initials="P." surname="Kasselman"/><author initials="J." surname="Lombardo"/><author initials="Y." surname="Rosomakho"/><author initials="B." surname="Campbell"/><author initials="N." surname="Steele"/><author initials="A." surname="Parecki"/><date year="2026" month="September"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-wimse-aims-00"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.ietf-oauth-transaction-tokens" target="https://datatracker.ietf.org/doc/draft-ietf-oauth-transaction-tokens/">
      <front><title>Transaction Tokens</title>
        <author initials="A." surname="Tulshibagwale"/><author initials="G." surname="Fletcher"/><author initials="P." surname="Kasselman"/><date year="2026"/></front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-transaction-tokens-11"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.chen-oauth-agent-revocation" target="https://datatracker.ietf.org/doc/draft-chen-oauth-agent-revocation/">
      <front><title>OAuth 2.0 Agent Authorization Explicit Revocation</title>
        <author initials="M." surname="Chen"/><author initials="L." surname="Su"/><date year="2026" month="April"/></front>
      <seriesInfo name="Internet-Draft" value="draft-chen-oauth-agent-revocation-00"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.sokolov-rats-aep-composition" target="https://datatracker.ietf.org/doc/draft-sokolov-rats-aep-composition/">
      <front><title>Composing Application-Layer Action Evidence with Remote Attestation Procedures</title>
        <author initials="A." surname="Sokolov"/><date year="2026" month="July"/></front>
      <seriesInfo name="Internet-Draft" value="draft-sokolov-rats-aep-composition-03"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="I-D.messous-eat-ai" target="https://datatracker.ietf.org/doc/draft-messous-eat-ai/">
      <front><title>Entity Attestation Token (EAT) Profile for Autonomous AI Agents</title>
        <author initials="A." surname="Messous"/><author initials="L." surname="Morand"/><author initials="P. C." surname="Liu"/><date year="2026" month="February"/></front>
      <seriesInfo name="Internet-Draft" value="draft-messous-eat-ai-01"/><refcontent>Work in Progress</refcontent>
    </reference>
    <reference anchor="TCG-DICE-HW" target="https://trustedcomputinggroup.org/resource/hardware-requirements-for-a-device-identifier-composition-engine/">
      <front><title>Hardware Requirements for a Device Identifier Composition Engine</title>
        <author><organization>Trusted Computing Group</organization></author><date year="2018"/></front>
    </reference>
    <reference anchor="TCG-DICE-ATT" target="https://trustedcomputinggroup.org/resource/dice-attestation-architecture/">
      <front><title>DICE Attestation Architecture, Version 1.3 RC1 (public review)</title>
        <author><organization>Trusted Computing Group</organization></author><date year="2026" month="July"/></front>
    </reference>
    <reference anchor="TCG-DPE" target="https://trustedcomputinggroup.org/wp-content/uploads/DICE-Protection-Environment-Version-1.0_pub.pdf">
      <front><title>DICE Protection Environment, Version 1.0</title>
        <author><organization>Trusted Computing Group</organization></author><date year="2024"/></front>
    </reference>
    <reference anchor="TPM2" target="https://trustedcomputinggroup.org/resource/tpm-library-specification/">
      <front><title>Trusted Platform Module Library Specification, Family 2.0</title>
        <author><organization>Trusted Computing Group</organization></author><date year="2019"/></front>
    </reference>
    <reference anchor="MS-TBS" target="https://learn.microsoft.com/windows/win32/api/tbs/nf-tbs-tbsi_revoke_attestation">
      <front><title>Tbsi_Revoke_Attestation function (tbs.h)</title>
        <author><organization>Microsoft</organization></author><date/></front>
    </reference>
    <reference anchor="FENCING" target="https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html">
      <front><title>How to do distributed locking</title>
        <author initials="M." surname="Kleppmann"/><date year="2016" month="February"/></front>
    </reference>
    <reference anchor="CAG1">
      <front><title>Constitutional Action Gate Profile for Agent-Mediated Internet Operations (draft-watts-constitutional-action-gate-00)</title>
        <author initials="D. O." surname="Watts"/><date year="2026" month="November"/></front>
      <refcontent>Unsubmitted private research candidate, with a two-sink revocation experiment; available from the author</refcontent>
    </reference>
    <reference anchor="IDENGINE">
      <front><title>DICE-Based AI Identity Engine: reference RTL, firmware, verifier, signoff constraints, formal properties, and fuzzy extractor</title>
        <author initials="D. O." surname="Watts"/><date year="2026" month="November"/></front>
      <refcontent>Unpublished reference design tree; available from the author</refcontent>
    </reference>
  </references>
</references>

<!-- ================================================================ -->
<section anchor="app-example">
  <name>Example Receipt</name>
  <t>The receipt below is test vector AFR-V02: sink-bravo committed one effect under epoch 7 at sequence 1, then applied its cut at sequence 2. It is shown in CBOR Extended Diagnostic Notation with claim names as comments; the measurements payload is the deterministically encoded register map. Keys are generated from labelled seeds given in the vector file, so the token is reproducible byte for byte.</t>
  <sourcecode type="cbor-diag"><![CDATA[
61(18([
  / protected / {
    1: / alg / -8,
    4: / kid / h'0197cb8f01f5c4992e85628e53cbf107b9'
  },
  / unprotected / {},
  / payload / {
    6: / iat / 1794700005,
    10: / eat_nonce / h'a4a834fc73fc8b534598fe8b51dccf04',
    256: / ueid / h'0197cb8f01f5c4992e85628e53cbf107b9',
    265: / eat_profile / "tag:goodshyt.fun,2026:afr#00",
    273: / measurements / [
      [ "application/afr-pcrs+cbor",
        h'a6025820277b...0b52' / register map, 6 entries / ]
    ],
    -76000: / afr_sink_id / "sink-bravo",
    -76001: / afr_scope_id / "scope:example:order-fulfilment",
    -76002: / afr_epoch_prev / "7",
    -76003: / afr_epoch_new / "8",
    -76004: / afr_cut_id /
      h'e8ab83fc2792cd5ad5130e31cc00bbedc16544356f74bc88
        e3e76edfc66a8d1d',
    -76005: / afr_fence_seq / 2,
    -76006: / afr_last_prev_seq / 1,
    -76007: / afr_pending / { 0: 0, 1: 0, 2: 0, 3: 0 },
    -76008: / afr_fence_modes / 7,
    -76009: / afr_auth_pcr / {
      0: 12,
      1: h'0f5f0c8fb2ee772c73d150157dc46752bd69cbbbb3b62d06
          14b722a1fb3d0b52'
    },
    -76010: / afr_epoch_key / {
      1: 1, -1: 6,
      -2: h'7dacf1341b315436bf7ddd9ad6e4f4cb17d8d46e14061f71
           63b529425ed025ee'
    },
    -76011: / afr_monotonic / 8,
    -76012: / afr_cfg_digest /
      h'86df66f20c58a9177a1ac78ad2abe6a3fdb3dbe480b42501
        904987396629398c'
  },
  / signature / h'b3a4ee29...d54d1c04'
]))
]]></sourcecode>
  <t>The Authority Register value equals SHA-256(0x00{32} || afr_cut_id), the verifier's recomputation from an empty cut history. The complete 692-byte token appears in hexadecimal in the vector file.</t>
</section>

<!-- ================================================================ -->
<section anchor="app-engine">
  <name>Mapping to a Reference Identity Engine</name>
  <t>This appendix is informative. It maps the hardware fence profile onto one concrete DICE-style identity-engine design <xref target="IDENGINE"/>: an APB-controlled block with an SRAM-PUF unique device secret recovered by a BCH(2047, 639, t=128) fuzzy extractor, HMAC-SHA-256 layered CDI derivation, a sixteen-register extend-only measurement bank, a forward-secret key ladder, a PCR-policy-bound seal unit, a tamper controller with zeroize, OTP fuses, and an EAT quote signer.</t>
  <table anchor="tab-engine">
    <name>Fence profile elements and engine resources</name>
    <thead><tr><th>Profile element</th><th>Engine resource</th><th>Note</th></tr></thead>
    <tbody>
      <tr><td>Authority Register</td><td>PCR index 12 (unassigned in the reference firmware header; indices 0-4 and 8-11 are taken)</td><td>Extended via PCR_SEL/PCR_DATA/PCR_EXTEND</td></tr>
      <tr><td>Monotonic counter</td><td>OTP fuse bank via OTP_WR, one bit per fence, or an NV counter in the secure element reached over SPI</td><td>Fuse capacity bounds fence count</td></tr>
      <tr><td>Epoch key (within power cycle)</td><td>key_ladder: K_{n+1} = HMAC(K_n, "RATC" || counter32 || 0^28)</td><td>Ladder seed is the CDI; ratchet on fence</td></tr>
      <tr><td>Epoch key (across power cycles)</td><td>Counter-gated derivation from the CDI; requires a register compare against the counter before KDF strobe (not in the reference RTL; proposed)</td><td>Needed because the CDI is re-derived at every boot</td></tr>
      <tr><td>Sealed release</td><td>seal_unit with SEAL_POLICY bit 12 set</td><td>Formal property P7 (unseal fails when a bound PCR moved)</td></tr>
      <tr><td>Receipt signer</td><td>quote_signer with the alias key; nonce from NONCE register; PCR bank flattened into the quote</td><td>AFR claims appended to the EAT payload</td></tr>
      <tr><td>Zeroize</td><td>tamper_ctrl; formal property P4 (all key state clears within 3 cycles)</td><td>Receipts impossible after zeroize</td></tr>
      <tr><td>Irreversibility</td><td>Formal properties P1 (register changes only on its extend strobe) and P2 (never returns to reset value)</td><td>Grounds measured-extend</td></tr>
    </tbody>
  </table>
  <t>Two findings from preparing this mapping are recorded because they bear on interoperability:</t>
  <ul spacing="normal">
    <li>The reference measurement bank feeds the 64-byte concatenation {register, digest} to a one-block SHA-256 core without the padding block. The resulting value differs from the standard SHA-256 of the same 64 bytes, which a verifier recomputes. The reference implementation accompanying this document includes a test that exhibits the difference. The bank needs a second (padding) block per extend to produce the standard value; the cost is one additional 64-cycle hash pass per extend.</li>
    <li>The reference key ladder is volatile and seeded from the CDI. Because the DICE flow re-derives the same CDI at every boot for unchanged firmware, software could re-run the ladder after a reboot and recover superseded keys. The counter-gated derivation of <xref target="hw-ratchet"/> removes this path; it requires the engine to compare the requested epoch against the fuse or NV counter before enabling the KDF strobe.</li>
  </ul>
  <t>Suggested additional formal properties for the engine's property file, in the style of its existing P1-P11:</t>
  <sourcecode type="verilog"><![CDATA[
// P12: epoch-key derivation strobes only for the live counter
ap_epoch_key_gated: assert property (
    epk_strobe |-> (epk_epoch == otp_counter));

// P13: the monotonic counter never decreases (sticky)
ap_counter_monotone: assert property (
    otp_counter >= $past(otp_counter));

// P14: a fence advances the authority register and the
//      counter in the same cycle window (atomic fence)
ap_fence_atomic: assert property (
    fence_strobe |-> ##[0:3] (pcr_extend && pcr_sel == 4'd12
        && otp_counter == $past(otp_counter) + 1));
]]></sourcecode>
</section>

<!-- ================================================================ -->
<section anchor="app-cag">
  <name>Relationship to the Constitutional Action Gate</name>
  <t>This appendix is informative. The experiments summarized in <xref target="intro"/> were performed on CAG-1 <xref target="CAG1"/>, an action-time admission profile whose decision is a conjunction of verified critical conditions with three terminal outcomes (ALLOW, DENY, INDETERMINATE) and a separate invalid outcome for malformed input, such that neither DENY nor INDETERMINATE can be promoted to ALLOW. Its sink implementation binds decision, effect, and nonce consumption in one database transaction and treats the authority epoch as a live runtime input.</t>
  <t>The fence in this document is the epoch-advance transaction of such a gate, made attestable. The gate's tri-outcome discipline is mirrored in the receipt verifier (INVALID is not DENY) and in the closure evaluator (UNKNOWN is not CLOSED). The local defects found and repaired while building the CAG-1 sinks informed specific requirements here: epoch rewind on reopen (the monotonic counter and <xref target="fence-reboot"/>), self-issued root authority (cut validation under a configured trust anchor, <xref target="fence-cut"/>), cross-audience admission (<tt>afr_sink_id</tt> from configuration, not from the message), post-validation mutation (receipts built by the Attesting Environment from the durable record, <xref target="hw-receipt"/>), and the serialization defect in which an empty reasons list was emitted as null (strict deterministic encoding, <xref target="receipt-format"/>).</t>
</section>

<!-- ================================================================ -->
<section anchor="novelty">
  <name>Research Provenance and Novelty Assessment</name>
  <t>This appendix is informative and is to be removed before publication. It records what this document claims and does not claim, in the ledger form used by the author's research programme.</t>
  <dl newline="true" spacing="normal">
    <dt>EM-AFR-001 [CONJECTURE, T3]:</dt>
    <dd>Attested per-sink fence receipts, evaluated over a Declared Sink Set with a normal-path witness and an unindexed-sink veto, convert the untested conjecture EM-DIST-003 of the two-sink experiment ("authenticated acknowledgements plus complete sink-graph coverage could support scoped closure") into a checkable procedure. Falsifier: a CLOSED determination over a covered set while a covered sink later exhibits an effect attestation under E_prev at or above the fence sequence of its FENCED receipt. Status: local tests pass; not independently reproduced.</dd>
    <dt>EM-AFR-002 [DERIVED, T1 local]:</dt>
    <dd>Counter-gated epoch-key derivation makes old-epoch effect attestation impossible after the fence in the behavioural model, including after software rollback (case F-14) and power cycle (case F-15). Falsifier: produce such an attestation on a conforming implementation.</dd>
    <dt>EM-AFR-003 [ANOMALY, T1 local]:</dt>
    <dd>The reference measurement bank's unpadded single-block extend is not standard SHA-256 and cannot be reproduced by a standards-based verifier. Recorded with a test; repair proposed in <xref target="app-engine"/>.</dd>
    <dt>EM-AFR-004 [ESTABLISHED]:</dt>
    <dd>Content-bound invalidation (binding evidence to a configuration digest so that edits invalidate approvals) is established prior art in contract-lifecycle and signature systems; it is applied here, not claimed.</dd>
  </dl>
  <t>Prior art that bounds any novelty claim: PCR extension and event-counter increment as attestation invalidation in deployed platform software <xref target="MS-TBS"/>; TPM monotonic counters and tick-based unidirectional attestation; fencing tokens <xref target="FENCING"/>; DICE layered identity and DPE context destruction <xref target="TCG-DPE"/>; epoch markers as freshness epochs <xref target="I-D.ietf-rats-epoch-markers"/>; composition of action evidence with platform evidence <xref target="I-D.sokolov-rats-aep-composition"/>; and the closure model this document serves <xref target="I-D.watts-oauth-agent-revocation-closure"/>. The candidate contribution is the specific combination: a revocation-side (rather than action-side) attested event, bound to an extend-only register and a counter-gated key, with a verification and closure procedure that fails closed. Whether that combination is novel has not been established by an independent prior-art search. Confirmed novel discoveries: zero.</t>
  <t>Disposition at the date of this draft: reference tests 25/25 pass; vectors reproducible; xml2rfc rendering clean; idnits NOT RUN; independent engineering review NOT RUN; independent prior-art search NOT RUN; IETF submission NOT PERFORMED. The source material for this document was the author's identity-engine design tree, the signoff and fuzzy-extractor notes, and the CAG-1 and multilingual-agreement research threads of 14 November 2026.</t>
</section>

<section anchor="ack" numbered="false">
  <name>Acknowledgements</name>
  <t>The two-sink counterexample that motivates this document was produced in AI-assisted research sessions on 14 November 2026. The RATS, OAuth, and WIMSE working groups' published work provided every primitive this document composes.</t>
</section>

</back>
</rfc>
