<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="std"
     docName="draft-chursin-rats-energy-attestation-01"
     ipr="trust200902"
     submissionType="IETF"
     consensus="true"
     tocInclude="true"
     tocDepth="3"
     sortRefs="true"
     symRefs="true"
     xml:lang="en"
     version="3">

  <front>
    <title abbrev="Energy Attestation Tokens">Hardware-Rooted Attestation Tokens for Electricity Generation</title>
    <seriesInfo name="Internet-Draft" value="draft-chursin-rats-energy-attestation-01"/>

    <author initials="A." surname="Chursin" fullname="Aleksey Chursin">
      <organization>Noethrion Foundation</organization>
      <address>
        <email>team@noethrion.com</email>
        <uri>https://noethrion.com</uri>
      </address>
    </author>

    <date year="2026" month="October" day="30"/>

    <area>Security</area>

    <keyword>attestation</keyword>
    <keyword>RATS</keyword>
    <keyword>COSE</keyword>
    <keyword>EAT</keyword>
    <keyword>CBOR</keyword>
    <keyword>energy</keyword>

    <abstract>
      <t>This document specifies an attestation token format and verification
      protocol for hardware-rooted measurements of electricity generation. The
      protocol enables a tamper-evident chain of custody from the secure
      element at a metering device
      to a publicly verifiable settlement layer, using ECDSA P-256 signatures
      generated inside a certified secure element and carried in a COSE_Sign1
      structure. It defines: (a) the CBOR-encoded attestation token, aligned
      with the Entity Attestation Token format of RFC 9711 and the Remote
      ATtestation procedureS (RATS) architecture of RFC 9334; (b) a
      Merkle-aggregation and on-chain commitment scheme for scalable
      verification; and (c) a registry mechanism for endorsing device public
      keys, which may be expressed using Concise Reference Integrity
      Manifests (CoRIM). Verifier output is expressed as EAT Attestation
      Results (EAR), and the measurement intervals implied by consecutive
      tokens support time-granular, including hourly, accounting. The token
      is intended for use by relying parties, such as energy
      producers, consumers, regulators, and standards bodies, that require
      cryptographic provenance for clean-energy claims.</t>
    </abstract>
  </front>

  <middle>

    <section anchor="introduction" numbered="true">
      <name>Introduction</name>

      <t>Clean-energy claims today rest on accounting infrastructure:
      Renewable Energy Certificates (RECs) in the United States, Guarantees of
      Origin (GoOs) in the European Union, and International RECs (I-RECs)
      elsewhere. These instruments are issued annually, traded through brokered
      email confirmations, and reconciled against grid-level dispatch records
      that the issuance system does not cryptographically verify. Published
      analyses of certificate markets have reported material discrepancies
      between dispatched generation and registered certificate issuance.</t>

      <t>Two regulatory and industrial trends, both effective in 2026, make
      this verification gap acute:</t>

      <ol spacing="normal">
        <li>Twenty-four-hour, hourly carbon-free energy matching has become a
        procurement requirement in several energy-intensive industrial and
        computing sectors, backed by long-term contracts for dedicated firm
        generation capacity. Hourly matching cannot be evidenced by annual
        certificate aggregation (see <xref target="time-granular"/>).</li>
        <li>The European Union's Carbon Border Adjustment Mechanism (CBAM)
        <xref target="CBAM"/>, effective 1 January 2026, requires importers of
        cement, iron, steel, aluminum, fertilizer, electricity, and hydrogen to
        demonstrate embedded carbon content at the source. There is no globally
        interoperable system for verifiable energy provenance that can satisfy
        this requirement.</li>
      </ol>

      <t>This document specifies an open standard intended to close that gap.
      The protocol places a hardware secure element adjacent to a
      kilowatt-hour meter; the secure element signs the tuple (energy delta,
      timestamp, device identifier) with a private key that is generated
      on-chip and is designed to be non-extractable; the resulting attestation tokens are
      aggregated into Merkle trees and committed to a public settlement layer;
      any relying party holding the device's endorsed public key can
      independently verify any single attestation.</t>

      <t>The protocol is deliberately narrow in scope. It defines verification,
      not trading. It does not specify payment rails, market-clearing
      mechanisms, or currency-like token economics. The unit of accounting in
      the protocol (NOET) represents one verified kilowatt-hour and is a
      verifiable attestation unit used internally by the protocol. It is not a
      payment instrument, a currency, or a store-of-value asset, and this
      document specifies no transfer, pricing, or settlement-of-value semantics
      for it.</t>

      <t>Where possible, this document reuses the conceptual messages and
      encodings of the RATS Working Group rather than defining its own:
      Evidence is carried in COSE as for EAT <xref target="RFC9711"/>,
      Verifier output is expressed as EAT Attestation Results
      <xref target="I-D.ietf-rats-ear"/> (<xref target="attestation-results"/>),
      and device-key endorsements and reference values can be conveyed as
      CoRIM <xref target="I-D.ietf-rats-corim"/>
      (<xref target="corim-endorsements"/>).</t>

      <t>This document is intended for review by the Remote ATtestation
      procedureS (RATS) Working Group and other interested IETF participants.
      Comments are welcome on the RATS mailing list (rats@ietf.org) or at the
      address given in the Author's Address section.</t>
    </section>

    <section anchor="terminology" numbered="true">
      <name>Conventions and Terminology</name>

      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
      "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
      "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
      "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",
      "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
      "<bcp14>OPTIONAL</bcp14>" 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 anchor="terms" numbered="true">
        <name>Terms</name>

        <dl newline="false" spacing="normal">
          <dt>Attester:</dt>
          <dd>A metering device, paired with a secure element, that produces
          attestation tokens. This aligns with the Attester role in the RATS
          architecture <xref target="RFC9334"/>.</dd>

          <dt>Verifier:</dt>
          <dd>A role that appraises Evidence about an Attester, using
          Endorsements, Reference Values, and appraisal policy, and produces
          Attestation Results, as in <xref target="RFC9334"/>. In this
          document the appraisal also covers the Merkle inclusion proof and
          on-chain commitment of an attestation token.</dd>

          <dt>Relying Party (RP):</dt>
          <dd>A role that depends on the validity of information about an
          Attester, as conveyed in Attestation Results, as in
          <xref target="RFC9334"/>. Examples include producers, consumers,
          regulators, and integrators of clean-energy claims.</dd>

          <dt>Endorser:</dt>
          <dd>An entity that issues an endorsement linking a device's public
          key to a real-world identity, such as a manufacturer, a certification
          authority, or a self-attested operator.</dd>

          <dt>Reference Values:</dt>
          <dd>The expected device configuration digest, firmware version,
          and model against which Verifiers may assess an Attester.
          Properties such as certification status are Endorsements, not
          Reference Values.</dd>

          <dt>Attestation Result:</dt>
          <dd>The output of a Verifier's appraisal of an Attestation Token,
          as defined in <xref target="RFC9334"/>. In this document it is
          encoded as an EAR (<xref target="attestation-results"/>).</dd>

          <dt>Attestation Token:</dt>
          <dd>A CBOR-encoded COSE_Sign1 object carrying the signed measurement
          and ancillary claims.</dd>

          <dt>Evidence Payload:</dt>
          <dd>The CBOR claims map carried inside an Attestation Token, as
          defined in <xref target="claim-set"/>.</dd>

          <dt>Settlement Layer:</dt>
          <dd>A publicly accessible verifiable data structure on which Merkle
          roots of attestation batches are committed. In this version, the
          Settlement Layer is an EVM-compatible Layer 2 rollup; future
          revisions <bcp14>MAY</bcp14> broaden this.</dd>

          <dt>Batch:</dt>
          <dd>An ordered collection of attestation tokens whose hashes form the
          leaves of a single Merkle tree.</dd>

          <dt>Epoch:</dt>
          <dd>The sequence number identifying a batch in time. Epochs increase
          monotonically.</dd>

          <dt>Challenge Window:</dt>
          <dd>A configurable period following batch submission during which the
          batch can be challenged before finalization.</dd>

          <dt>Measurement Interval:</dt>
          <dd>The time interval to which the energy delta of an attestation
          token applies, derived as specified in
          <xref target="time-granular"/>.</dd>

          <dt>NOET:</dt>
          <dd>The attestation accounting unit of the protocol. One NOET
          represents one verified kilowatt-hour. NOET is a unit of attestation,
          not a payment instrument, a currency, or a store of value; this
          document specifies no transfer, pricing, or settlement-of-value
          semantics for it.</dd>
        </dl>
      </section>
    </section>

    <section anchor="architecture" numbered="true">
      <name>Architecture and Roles</name>

      <t>This document follows the role decomposition of the RATS architecture
      <xref target="RFC9334"/>. Each role has a specific scope of
      responsibility and security boundary.</t>

      <section anchor="role-attester" numbered="true">
        <name>Attester</name>

        <t>The Attester is composed of two physical components: a
        kilowatt-hour meter (the measurer) and a secure element (the signer).
        The Attester:</t>

        <ul spacing="normal">
          <li><bcp14>MUST</bcp14> generate the device's signing key inside the
          secure element using on-chip entropy.</li>
          <li><bcp14>MUST NOT</bcp14> permit the signing key to leave the
          secure element under any operational condition.</li>
          <li><bcp14>MUST</bcp14> sign each evidence payload with the device's
          private key, as a COSE_Sign1 structure (<xref target="envelope"/>),
          before transmission.</li>
          <li><bcp14>MUST</bcp14> include in each attestation the "prev"
          claim (<xref target="claim-set"/>), a hash of the previous
          attestation produced by the same device, forming a per-device hash
          chain.</li>
          <li><bcp14>MAY</bcp14> include firmware version, model identifier,
          and configuration claims in the attestation token.</li>
        </ul>
      </section>

      <section anchor="role-verifier" numbered="true">
        <name>Verifier</name>

        <t>The Verifier is software, executed by any interested party,
        that:</t>

        <ul spacing="normal">
          <li><bcp14>MUST</bcp14> validate the COSE_Sign1 signature of the
          attestation token, as specified in <xref target="envelope"/>, using
          the Attester's endorsed public key, and <bcp14>MUST</bcp14> reject
          any token whose protected header names an algorithm the Verifier does
          not accept.</li>
          <li><bcp14>MUST</bcp14> verify the Merkle inclusion proof against the
          on-chain committed root for the corresponding epoch.</li>
          <li><bcp14>MUST</bcp14> check the endorsement chain of the
          Attester's public key against a trusted Endorser registry.</li>
          <li><bcp14>MAY</bcp14> apply additional Reference Values checks
          (firmware version, model, certification status) where required.</li>
          <li><bcp14>SHOULD</bcp14>, when its appraisal is conveyed to a
          Relying Party, encode the Attestation Result as specified in
          <xref target="attestation-results"/>.</li>
        </ul>
      </section>

      <section anchor="role-rp" numbered="true">
        <name>Relying Party</name>

        <t>The Relying Party consumes attestations and acts on them. A Relying
        Party:</t>

        <ul spacing="normal">
          <li><bcp14>MUST</bcp14> independently invoke a Verifier, either as a
          library or as a service; it <bcp14>MUST NOT</bcp14> rely on an
          Attester's self-report alone.</li>
          <li><bcp14>SHOULD</bcp14> apply use-case-specific validity criteria
          beyond signature verification, for example timestamp freshness or
          jurisdiction.</li>
        </ul>
      </section>

      <section anchor="role-endorser" numbered="true">
        <name>Endorser</name>

        <t>An Endorser issues an endorsement binding a device public key to
        identity metadata such as manufacturer, model, and certification batch.
        Endorsers:</t>

        <ul spacing="normal">
          <li><bcp14>MUST</bcp14> publish their own public key in a manner that
          is itself verifiable, such as an X.509 certificate, a well-known DNS
          record, or an on-chain registry.</li>
          <li><bcp14>SHOULD</bcp14> specify the procedure by which they obtain
          assurance that a given public key originates from a tamper-evident
          secure element.</li>
        </ul>

        <t>Endorsements and Reference Values <bcp14>MAY</bcp14> be conveyed
        using CoRIM as described in <xref target="corim-endorsements"/>, or
        through the registry options of <xref target="key-registry"/>.</t>

        <t>This document does not mandate a single Endorser hierarchy. A
        federation of Endorsers is expected to emerge in practice; relying
        parties choose which Endorsers to trust.</t>
      </section>

      <section anchor="role-validator" numbered="true">
        <name>Validator</name>

        <t>The Validator is an on-chain role responsible for confirming Merkle
        root submissions before they are finalized for claim. Validators extend
        the RATS architecture; they exist because the on-chain commitment layer
        requires a defined set of accountable parties whose signed actions are
        the basis of finalization. A Validator:</t>

        <ul spacing="normal">
          <li><bcp14>MUST</bcp14> hold the validator role granted by the holder
          of the settlement contract's administrative role. Production
          deployments place that administrative role in a multi-signature
          wallet.</li>
          <li><bcp14>MUST</bcp14> independently verify the Merkle root it is
          voting on against its own reconstruction of the underlying leaf set
          before broadcasting a batch proposal or a vote. A Validator that
          votes without independent verification is a single point of trust and
          defeats the m-of-n property the quorum is designed to provide.</li>
          <li><bcp14>SHOULD</bcp14> publish its identity (operator,
          jurisdiction, and contact) so that fraud-proof challengers and
          relying parties can attribute votes.</li>
          <li><bcp14>MAY</bcp14> be operated by the standards body, by a
          delegated operator, or by an independent third party. The m-of-n
          design treats Validators as Byzantine-tolerant peers, not as trusted
          authorities.</li>
        </ul>

        <t>Validator accountability is enforced through two mechanisms whose
        details appear in <xref target="threat-collusion"/>:</t>

        <ol spacing="normal">
          <li>Quorum. No single Validator can cause finalization on its own;
          the m-of-n threshold ensures that a minimum of "threshold" distinct
          Validators must independently agree. The threshold value is a
          deployment parameter; production deployments <bcp14>SHOULD</bcp14>
          select a threshold of at least ceil(2n/3) for Byzantine fault
          tolerance, where n is the size of the active Validator set.</li>
          <li>Slashing. A Validator proven to have voted for a fraudulent batch
          loses the validator role and has the off-chain evidence hash recorded
          on-chain. A Validator that has been slashed for a prior epoch retains
          the vote it cast before the slash: historical votes are durable in
          order to preserve the audit trail.</li>
        </ol>

        <t>The Validator role is distinct from the Attester (the on-device
        measurer and signer) and from the Verifier (the relying-party-side
        software). The Attester proves a measurement was taken on certified
        hardware; the Validator proves a quorum of independent parties agree
        the measurement appeared in a legitimate batch; the Verifier checks
        both layers when consuming an attestation.</t>
      </section>
    </section>

    <section anchor="token-format" numbered="true">
      <name>Attestation Token Format</name>

      <t>An attestation token is a CBOR <xref target="RFC8949"/> object
      consisting of a claims map (the evidence payload,
      <xref target="claim-set"/>) enveloped in a COSE_Sign1 structure
      <xref target="RFC9052"/> (<xref target="envelope"/>). Both the claims map
      and the COSE_Sign1 structure <bcp14>MUST</bcp14> be serialized using the
      deterministic encoding requirements of <xref target="RFC8949"/>,
      Section 4.2.1, so that signature inputs and leaf hashes are
      unambiguous.</t>

      <t>Throughout this document, "attestation token" refers to the complete
      tagged COSE_Sign1 structure, and "evidence payload" refers to the claims
      map that it carries.</t>

      <section anchor="claim-set" numbered="true">
        <name>Claim Set</name>

        <t>The evidence payload is a CBOR map using the integer labels listed
        in <xref target="tbl-claims"/>. These labels are local to this profile
        and are scoped to the payload map only; they are independent of the
        COSE header labels used in the enveloping structure
        (<xref target="alg-id"/>).</t>

        <table anchor="tbl-claims">
          <name>Evidence payload claim set</name>
          <thead>
            <tr>
              <th align="right">Label</th>
              <th align="left">Claim</th>
              <th align="left">Type</th>
              <th align="left">Required</th>
              <th align="left">Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="right">1</td>
              <td align="left">iss</td>
              <td align="left">bstr</td>
              <td align="left">MUST</td>
              <td align="left">Device identifier: the 9-byte serial number of
              the secure element.</td>
            </tr>
            <tr>
              <td align="right">2</td>
              <td align="left">iat</td>
              <td align="left">uint</td>
              <td align="left">MUST</td>
              <td align="left">Issued-at timestamp, in seconds since the UNIX
              epoch, UTC.</td>
            </tr>
            <tr>
              <td align="right">3</td>
              <td align="left">wh</td>
              <td align="left">uint</td>
              <td align="left">MUST</td>
              <td align="left">Energy delta in watt-hours since the previous
              attestation from the same device.</td>
            </tr>
            <tr>
              <td align="right">4</td>
              <td align="left">seq</td>
              <td align="left">uint</td>
              <td align="left">MUST</td>
              <td align="left">Per-device monotonic sequence number, starting
              at 1 and incremented by one for each emitted attestation. The
              pair ("iss", "seq") identifies a measurement
              (<xref target="measurement-identity"/>).</td>
            </tr>
            <tr>
              <td align="right">5</td>
              <td align="left">prev</td>
              <td align="left">bstr / null</td>
              <td align="left">MUST</td>
              <td align="left">SHA-256 digest (32 bytes) of the evidence
              payload of the previous attestation token from the same device,
              computed as specified below the table. It is CBOR null for the
              first attestation, that is when seq equals 1.</td>
            </tr>
            <tr>
              <td align="right">6</td>
              <td align="left">fwv</td>
              <td align="left">tstr</td>
              <td align="left">SHOULD</td>
              <td align="left">Firmware version string.</td>
            </tr>
            <tr>
              <td align="right">7</td>
              <td align="left">mdl</td>
              <td align="left">tstr</td>
              <td align="left">SHOULD</td>
              <td align="left">Device model identifier.</td>
            </tr>
            <tr>
              <td align="right">8</td>
              <td align="left">cfg</td>
              <td align="left">bstr</td>
              <td align="left">MAY</td>
              <td align="left">SHA-256 digest (32 bytes) of the device
              configuration relevant to measurement integrity.</td>
            </tr>
          </tbody>
        </table>

        <t>The "prev" value of token n is the SHA-256 digest of the
        deterministically encoded evidence payload of token n-1, that is, of
        the content of the "payload" byte string of its COSE_Sign1 structure
        (<xref target="envelope"/>). Hashing the payload rather than the
        complete token makes the hash chain independent of the signature
        value and of the unprotected header. The "cfg" value is a SHA-256
        digest over a deployment-defined serialization of the configuration
        it covers; that serialization is identified through the Reference
        Values against which "cfg" is compared
        (<xref target="corim-endorsements"/>). Both "fwv" and "cfg" are
        reported by the host and are subject to the limitation described in
        <xref target="threat-mcu"/>.</t>

        <t>The evidence payload carries no signature claim and no algorithm
        claim. The signature, the signature algorithm, and the key identifier
        are carried by the enveloping COSE_Sign1 structure as described in
        <xref target="alg-id"/> and <xref target="envelope"/>.</t>
      </section>

      <section anchor="alg-id" numbered="true">
        <name>Algorithm and Key Identification</name>

        <t>Algorithm agility in this protocol is provided exclusively by the
        COSE protected header of the enveloping COSE_Sign1 structure.
        Specifically:</t>

        <ul spacing="normal">
          <li>The "alg" header parameter (COSE header label 1) identifies the
          signature algorithm. It <bcp14>MUST</bcp14> be present in the
          protected header. For this version of the protocol its value
          <bcp14>MUST</bcp14> be -9 (ESP256), as registered in
          <xref target="RFC9864"/>. The compatibility rule for the value -7
          is given in <xref target="signature-scheme"/>.</li>
          <li>The "kid" header parameter (COSE header label 4) identifies the
          endorsed device key used to produce the signature. It
          <bcp14>SHOULD</bcp14> be present in the protected header. Where it is
          absent, a Verifier <bcp14>MUST</bcp14> resolve the key from the "iss"
          claim through the registry of <xref target="key-registry"/>.</li>
        </ul>

        <t>An implementation <bcp14>MUST NOT</bcp14> convey the signature
        algorithm as a claim inside the evidence payload. A Verifier that
        encounters an algorithm indication inside the evidence payload
        <bcp14>MUST</bcp14> reject the token, because such an indication would
        create a second and possibly disagreeing source of truth for algorithm
        selection.</t>

        <t>The unprotected header of an attestation token <bcp14>MUST</bcp14>
        be an empty map. Attesters and aggregators <bcp14>MUST NOT</bcp14>
        add unprotected header parameters, and a Verifier <bcp14>MUST
        NOT</bcp14> use the content of the unprotected header when
        identifying a measurement (<xref target="measurement-identity"/>).
        Implementations <bcp14>MAY</bcp14> include the "typ" header parameter
        <xref target="RFC9596"/> in the protected header; a value for it is
        left for a future revision.</t>
      </section>

      <section anchor="cddl" numbered="true">
        <name>CDDL Definition</name>

        <t>The following CDDL <xref target="RFC8610"/> defines the attestation
        token. It is normative for the structures it covers.</t>

        <sourcecode type="cddl"><![CDATA[
; A Noethrion attestation token is a tagged COSE_Sign1 structure.
Noethrion-Attestation = #6.18(Noethrion-Sign1)

Noethrion-Sign1 = [
  protected   : bstr .cbor Noethrion-Protected-Header,
  unprotected : Noethrion-Unprotected-Header,
  payload     : bstr .cbor Noethrion-Claims,
  signature   : bstr
]

Noethrion-Protected-Header = {
  1 => -9,                ; alg: ESP256 (see Section 5 for -7)
  ? 4 => bstr,            ; kid; endorsed device key identifier
  * cose-label => any
}

Noethrion-Unprotected-Header = {}   ; MUST be empty

Noethrion-Claims = {
  1 => bstr .size 9,      ; iss:  secure element serial number
  2 => uint,              ; iat:  issued-at, UTC seconds
  3 => uint,              ; wh:   energy delta, watt-hours
  4 => uint .ge 1,        ; seq:  per-device monotonic counter
  5 => sha256-digest / null,
                          ; prev: SHA-256 of previous payload;
                          ;       null if and only if seq == 1
  ? 6 => tstr,            ; fwv:  firmware version (host-reported)
  ? 7 => tstr,            ; mdl:  device model identifier
  ? 8 => sha256-digest,   ; cfg:  config digest (host-reported)
}

sha256-digest = bstr .size 32

cose-label = int / tstr
]]></sourcecode>

        <t>The Merkle aggregation layer of <xref target="merkle"/> and the
        claim-record encoding of <xref target="two-layer"/> are not yet
        expressed in CDDL. [TBD: full CDDL covering the batch,
        inclusion-proof, and claim-record structures in a future
        revision]</t>
      </section>

      <section anchor="eat-mapping" numbered="true">
        <name>Mapping to EAT</name>

        <t>The claim set above is intentionally compatible with the Entity
        Attestation Token (EAT) format defined in <xref target="RFC9711"/>. EAT
        is itself carried in COSE, so the envelope chosen in
        <xref target="envelope"/> is the same one an EAT profile would use.
        The claim labels of <xref target="tbl-claims"/> are, however, local
        to this profile, and the payload is not itself an EAT claims set.</t>

        <t><xref target="tbl-eat-map"/> lists, for information, the EAT or
        CWT <xref target="RFC8392"/> claims that correspond most closely to each claim of this
        profile. It corrects the statement in -00 that "iss", "iat", and
        "seq" can be mapped directly to CWT-registered claims: only "iat"
        has a direct equivalent. The table does not change the wire format
        defined in this document; a formal EAT profile for energy
        attestation, including a profile identifier for the "eat_profile"
        claim (key 265), is left for a future revision.</t>

        <table anchor="tbl-eat-map">
          <name>Informative correspondence to EAT and CWT claims</name>
          <thead>
            <tr>
              <th align="left">This profile</th>
              <th align="left">EAT / CWT claim</th>
              <th align="left">Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">iss (1)</td>
              <td align="left">ueid (256), conditionally</td>
              <td align="left">The CWT "iss" claim (key 1) is a text issuer
              name and is not equivalent. A secure element serial number can
              be carried in "ueid" only if encoded as one of the UEID types
              of <xref target="RFC9711"/>, Section 4.2.1; otherwise a
              profile-specific claim is needed.</td>
            </tr>
            <tr>
              <td align="left">iat (2)</td>
              <td align="left">iat (6)</td>
              <td align="left">Direct equivalent; integer seconds, as
              required by <xref target="RFC9711"/>.</td>
            </tr>
            <tr>
              <td align="left">wh (3)</td>
              <td align="left">none</td>
              <td align="left">Profile-specific.</td>
            </tr>
            <tr>
              <td align="left">seq (4)</td>
              <td align="left">none</td>
              <td align="left">Profile-specific. Not equivalent to
              "bootcount" (267), which counts boots, not tokens.</td>
            </tr>
            <tr>
              <td align="left">prev (5)</td>
              <td align="left">none</td>
              <td align="left">Profile-specific.</td>
            </tr>
            <tr>
              <td align="left">fwv (6)</td>
              <td align="left">swversion (271)</td>
              <td align="left">Requires conversion to the "swversion"
              structure.</td>
            </tr>
            <tr>
              <td align="left">mdl (7)</td>
              <td align="left">hwmodel (259)</td>
              <td align="left">"hwmodel" is a byte string of 1 to 32
              bytes; requires conversion from text.</td>
            </tr>
            <tr>
              <td align="left">cfg (8)</td>
              <td align="left">none</td>
              <td align="left">Profile-specific; may alternatively be
              conveyed as a "measurements" (273) entry.</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>

    <section anchor="signature-scheme" numbered="true">
      <name>Signature Scheme</name>

      <t>This document specifies a single signature algorithm for this version
      of the protocol: ECDSA over the NIST P-256 curve (secp256r1) with
      SHA-256, identified by the fully-specified COSE algorithm ESP256,
      value -9, defined in <xref target="RFC9864"/>, Section 2.1.
      Attesters <bcp14>MUST</bcp14> use the value -9.</t>

      <t>Revision -00 of this document specified the polymorphic identifier
      ES256 (-7) <xref target="RFC9053"/>, which <xref target="RFC9864"/>
      deprecates in favour of ESP256. With a P-256 key, ES256 and ESP256
      produce signatures of identical form; only the identifier differs.
      For compatibility with tokens produced under -00, a Verifier
      <bcp14>MAY</bcp14> accept the value -7 when the endorsed device key is
      a P-256 key and the token is contained in a batch committed before a
      deployment-defined cutoff. Such tokens are otherwise processed as
      specified in this document. A future revision is expected to remove
      this allowance.</t>

      <section anchor="envelope" numbered="true">
        <name>Signature Envelope</name>

        <t>Attestation tokens <bcp14>MUST</bcp14> be signed as a COSE_Sign1
        structure as defined in <xref target="RFC9052"/>, Section 4.2, tagged
        with CBOR tag 18. COSE_Sign1 is chosen over a bare signature field for
        three reasons:</t>

        <ol spacing="normal">
          <li>It is the envelope used by the Entity Attestation Token
          <xref target="RFC9711"/> and by the wider RATS ecosystem
          <xref target="RFC9334"/>, so that evidence produced under this
          specification can be consumed by existing COSE and EAT tooling
          without a bespoke parser.</li>
          <li>It provides integrity protection over the algorithm and key
          identifiers themselves, through the protected header, which a bare
          signature over a claims map does not.</li>
          <li>It gives a single, already-specified path for algorithm rotation
          (<xref target="pq-migration"/>).</li>
        </ol>

        <t>The signature is computed over the Sig_structure defined in
        <xref target="RFC9052"/>, Section 4.4, with:</t>

        <ul spacing="normal">
          <li>"context" set to the text string "Signature1";</li>
          <li>"body_protected" set to the serialized protected header;</li>
          <li>"external_aad" set to a zero-length byte string in this
          version;</li>
          <li>"payload" set to the deterministically encoded evidence payload
          of <xref target="claim-set"/>.</li>
        </ul>

        <t>Implementations <bcp14>MUST NOT</bcp14> emit an attestation token as
        a bare claims map with an adjacent signature field. Pre-standard
        implementations of this protocol, including the genesis deployment of
        the reference implementation, used such a bare encoding. That encoding
        is historical, is not conformant with this document, and
        <bcp14>MUST NOT</bcp14> be used for new deployments. Verifiers
        <bcp14>MAY</bcp14> retain support for it solely in order to re-verify
        pre-standard historical records, and then only for records already
        contained in batches finalized before a fixed, deployment-defined
        cutoff. Because the secure element signs whatever digest the host
        presents, a bare record that is not so committed provides no
        assurance that it was produced before the cutoff.</t>
      </section>

      <section anchor="p256-rationale" numbered="true">
        <name>Rationale for P-256</name>

        <t>P-256 is selected because:</t>

        <ol spacing="normal">
          <li>It is the curve natively supported by widely available secure
          elements suitable for low-cost meter integration, including parts
          certified to Common Criteria EAL5+.</li>
          <li>It is broadly understood, has mature implementations, and is
          acceptable to relying parties whose internal cryptographic policies
          typically permit NIST curves.</li>
          <li>Performance on constrained microcontrollers is sufficient for the
          protocol's per-minute signing cadence.</li>
        </ol>
      </section>

      <section anchor="pq-migration" numbered="true">
        <name>Post-Quantum Migration</name>

        <t>It is acknowledged that P-256 is not post-quantum secure. A
        migration path to a post-quantum signature scheme, anticipated to be
        ML-DSA as standardized in <xref target="FIPS204"/>, is part of the
        protocol's long-term plan. No new format machinery is required for that
        migration: the "alg" and "kid" parameters of the COSE protected header
        (<xref target="alg-id"/>) are the algorithm and key rotation mechanism,
        and a future revision need only permit an additional "alg" value and
        specify the transition policy. Historical attestations remain
        verifiable because each token names, under integrity protection, the
        algorithm with which it was signed.</t>

        <t>A future revision of this document <bcp14>SHALL</bcp14> specify the
        migration procedure, including dual-signing transitions and the policy
        under which historical P-256 attestations remain verifiable.</t>
      </section>
    </section>

    <section anchor="merkle" numbered="true">
      <name>Merkle Aggregation and Settlement</name>

      <section anchor="offchain" numbered="true">
        <name>Off-Chain Aggregation</name>

        <t>Attestation tokens are aggregated off-chain into Merkle trees. Each
        tree contains up to 2^16 (65,536) leaves, where each leaf is the
        SHA-256 hash of the complete deterministically encoded, tagged
        COSE_Sign1 attestation token of <xref target="token-format"/>.</t>

        <t>Interior nodes are computed with a commutative sorted-pair
        construction:</t>

        <artwork type="ascii-art"><![CDATA[
parent = keccak256(min(a, b) || max(a, b))
]]></artwork>

        <t>where a and b are the two 32-byte child hashes, min and max
        denote lexicographic byte-wise ordering, and keccak256 is the
        original Keccak-256 function <xref target="KECCAK"/> with its
        original padding, which is not the SHA3-256 function standardized in
        FIPS 202. Sorting each pair before
        hashing makes the construction order-independent: an inclusion proof
        carries only the sibling hashes, with no left/right position flags.
        This is the construction implemented by the widely used Merkle proof
        library employed by the on-chain reference contract and by the
        reference off-chain Verifier tooling. Off-chain builders
        <bcp14>MUST</bcp14> use this pair hash for any tree whose root is
        committed on-chain.</t>

        <t>Note on leaf domain separation: this construction deliberately omits
        the per-level domain-separation prefixes (0x00 for leaves, 0x01 for
        interior nodes) defined by <xref target="RFC9162"/>. The
        second-preimage class those prefixes guard against, namely
        reinterpreting an interior node as a leaf or vice versa, is
        structurally closed here by preimage length: an interior-node preimage
        is exactly 64 bytes (two concatenated 32-byte hashes), whereas leaf
        preimages are never 64 bytes. The on-chain claim-record leaf
        (<xref target="two-layer"/>) hashes a 160-byte encoded payload, and the
        attestation-evidence leaf hashes a tagged COSE_Sign1 token, which is
        substantially longer than 64 bytes for any token carrying the required
        claims of <xref target="claim-set"/> together with a 64-byte ECDSA
        P-256 signature. The attestation-evidence leaf additionally uses a
        different hash function, SHA-256, from the keccak256 node hash.
        <xref target="RFC9162"/> informed the design of this layer and is
        listed as an informative reference.</t>

        <t>A batch is identified by a monotonically increasing epoch number.
        The aggregator <bcp14>MAY</bcp14> be operated by the device owner, by a
        service provider, or by the reference implementation; the choice does
        not affect verifiability.</t>
      </section>

      <section anchor="onchain" numbered="true">
        <name>On-Chain Commitment</name>

        <t>For each batch, the Merkle root is committed to a public
        EVM-compatible Layer 2 settlement network through a reference smart
        contract. Note that the reference contract is named "Attester" for
        historical reasons unrelated to the RATS Attester role of
        <xref target="role-attester"/>; the two are distinct. The on-chain
        commitment record <bcp14>SHALL</bcp14> include, at minimum:</t>

        <ul spacing="normal">
          <li>the epoch number;</li>
          <li>the Merkle root (32 bytes);</li>
          <li>the total watt-hour sum claimed in the batch, for cross-check
          against grid-level dispatch records;</li>
          <li>the proposing validator's address, and, through separate vote
          events, the addresses of all validators who voted to reach
          quorum;</li>
          <li>the block timestamp at submission;</li>
          <li>the quorum threshold value active at the moment of submission.
          Snapshotting this at submission, rather than reading live storage at
          finalization, ensures that a subsequent administrative change to the
          global threshold cannot retroactively pass or block this specific
          batch;</li>
          <li>the challenge-window value active at the moment of submission.
          Snapshotting prevents retroactive shrinking, which would let an
          administrator finalize batches early, and retroactive extension,
          which would freeze finalization of legitimately voted batches.</li>
        </ul>

        <t>The two snapshot fields close the symmetric retroactive-shift class
        of administrative abuses.</t>

        <t>A challenge window, configurable and defaulting to one hour, follows
        submission. In the current reference contract the fraud-proof path
        during this window is off-chain: any party <bcp14>MAY</bcp14> report
        evidence of a fraudulent batch to the contract operators and
        validators, who can respond through the on-chain pause mechanism,
        blocking finalization, and administratively triggered slashing
        (<xref target="threat-collusion"/>). A dedicated on-chain challenge
        entry point, allowing any party to publish a fraud proof directly
        on-chain, is deferred to a future protocol extension, together with
        fraud-proof-verified slashing. After the challenge window expires
        without the batch being rejected, the batch is finalized; finalization
        is irreversible.</t>

        <t>The block timestamp recorded at submission is the Anchor Time of
        every token in the batch. It is set by the settlement layer and not
        by the Attester or its host, and it is the reference time for the
        revocation and timestamp-plausibility checks of
        <xref target="endorser-revocation"/>,
        <xref target="device-revocation"/>, and
        <xref target="measurement-identity"/>. A Verifier that appraises a
        token not yet contained in a committed batch <bcp14>MUST</bcp14> use
        its own time of receipt of the token in place of the Anchor
        Time.</t>
      </section>

      <section anchor="verification-path" numbered="true">
        <name>Verification Path</name>

        <t>A Verifier resolves a single attestation as follows:</t>

        <ol spacing="normal">
          <li>Receive the candidate attestation token and a Merkle inclusion
          proof, consisting of the sibling hashes along the tree path.</li>
          <li>Compute the SHA-256 leaf hash over the deterministically encoded,
          tagged COSE_Sign1 token.</li>
          <li>Apply the inclusion proof to derive the candidate Merkle
          root.</li>
          <li>Look up the on-chain commitment for the corresponding epoch.</li>
          <li>Confirm that the candidate root equals the committed root.</li>
          <li>Confirm that the batch is finalized, that is, that the challenge
          window has elapsed without a successful challenge.</li>
          <li>Validate the COSE_Sign1 signature (<xref target="envelope"/>)
          against the device Attester's endorsed public key: the
          secure-element-bound key of <xref target="role-attester"/>, and not
          the on-chain contract of <xref target="onchain"/>.</li>
          <li>Confirm, against the Anchor Time of the batch
          (<xref target="onchain"/>), that neither the device key nor its
          Endorser is revoked (<xref target="endorser-revocation"/>,
          <xref target="device-revocation"/>) and that the token's "iat" is
          plausible (<xref target="measurement-identity"/>).</li>
        </ol>

        <t>All eight steps <bcp14>MUST</bcp14> succeed for the attestation to
        be accepted.</t>

        <section anchor="two-layer" numbered="true">
          <name>Note on the Two-Layer Leaf Encoding</name>

          <t>The Merkle tree described in <xref target="offchain"/>, whose
          leaves are SHA-256 hashes of deterministically encoded, tagged
          COSE_Sign1 attestation tokens, is the attestation-evidence layer. It
          proves that a particular signed measurement was included in a
          committed batch.</t>

          <t>The on-chain claim function in the reference contract enforces a
          separate claim-record layer: each on-chain leaf is the keccak256 hash
          of the encoded tuple (chain identifier, contract address,
          beneficiary, amount, epoch), identifying a specific redemption, that
          is, which address receives how many NOET against which epoch, bound
          to a specific contract instance on a specific chain. The first two
          fields act as a domain separator, so that a Merkle tree built for one
          contract instance cannot be replayed against a fork or a sibling
          deployment. The two layers are related but not identical: each claim
          record aggregates one or more attestation tokens whose summed energy
          underwrites the redemption amount.</t>

          <t>A future revision will document the aggregation function from
          attestation tokens to claim records explicitly. For this version,
          off-chain builders <bcp14>MUST</bcp14> produce claim-record trees
          whose leaves match the contract's encoding exactly, including the
          chain-identifier and contract-address domain separator. The
          attestation-evidence tree is verified separately by the off-chain
          Verifier path above and is not yet referenced on-chain.</t>
        </section>
      </section>

      <section anchor="transparency" numbered="true">
        <name>Relationship to Transparency Services</name>

        <t>The commitment layer of this section registers batches of signed
        statements in a verifiable data structure and lets a Verifier check
        inclusion. This is the function standardized by the Supply Chain
        Integrity, Transparency, and Trust (SCITT) architecture
        <xref target="RFC9943"/>, with inclusion proofs conveyed as COSE
        Receipts <xref target="RFC9942"/>. A SCITT Transparency Service is a
        possible IETF-aligned transport and transparency layer for
        attestation tokens, either alongside or instead of the settlement
        layer described here. This version does not specify such use; a
        future revision is expected to evaluate it. The token format of
        <xref target="token-format"/> does not depend on the commitment
        layer.</t>
      </section>
    </section>

    <section anchor="endorsement" numbered="true">
      <name>Endorsement and Verification</name>

      <section anchor="key-registry" numbered="true">
        <name>Public Key Registry</name>

        <t>Endorsed device public keys are recorded in a registry. The registry
        <bcp14>MAY</bcp14> be:</t>

        <ul spacing="normal">
          <li>on-chain, as a smart-contract mapping from device serial number
          to public key and endorsement metadata, with role-based mutation
          rights restricted to Endorsers. This is the reference
          deployment;</li>
          <li>off-chain, distributed as signed JSON files at well-known URLs
          maintained by Endorsers;</li>
          <li>hybrid, with on-chain anchors and off-chain bulk
          distribution.</li>
        </ul>

        <t>The choice is operational and does not affect the verification
        semantics: a Verifier <bcp14>MUST</bcp14> be able to obtain a device's
        endorsed public key, traceable to an Endorser whose own key is
        verifiable. The content of a registry entry <bcp14>MAY</bcp14> be a
        CoRIM as described in <xref target="corim-endorsements"/>; in the
        hybrid case, an on-chain anchor <bcp14>MAY</bcp14> record the digest
        of a signed CoRIM distributed off-chain.</t>
      </section>

      <section anchor="corim-endorsements" numbered="true">
        <name>Endorsements and Reference Values Using CoRIM</name>

        <t>To allow general-purpose RATS Verifiers to consume them,
        Endorsers <bcp14>SHOULD</bcp14> be able to express device-key
        endorsements and Reference Values as a signed Concise Reference
        Integrity Manifest (CoRIM) <xref target="I-D.ietf-rats-corim"/>. The
        registry forms of <xref target="key-registry"/> remain permitted; this
        section describes how their content maps onto CoRIM, and does not
        introduce new information. Terminology for Endorsements follows
        <xref target="I-D.ietf-rats-endorsements"/>.</t>

        <ul spacing="normal">
          <li>Device public key. The endorsed device key is conveyed in an
          Attest Key Triple (<xref target="I-D.ietf-rats-corim"/>, Section
          5.1.10). The environment identifies the device class (for example
          vendor and model) and the instance, using the secure element serial
          number carried in the "iss" claim; the key list contains the
          device's P-256 public key. The "kid" header parameter of
          <xref target="alg-id"/>, when present, <bcp14>SHOULD</bcp14> allow
          the Verifier to locate this key.</li>
          <li>Reference Values. Expected firmware version ("fwv"), model
          ("mdl"), and configuration digest ("cfg") are conveyed in Reference
          Values Triples (<xref target="I-D.ietf-rats-corim"/>, Section
          5.1.5), against which the Verifier compares the corresponding
          claims.</li>
          <li>Endorsed Values. Properties that the Attester cannot itself
          report, such as the certification status of the secure element and
          the class of protection applied to the measurer-to-signer interface
          (<xref target="threat-physical"/>), are conveyed in Endorsed Values
          Triples (<xref target="I-D.ietf-rats-corim"/>, Section 5.1.6).</li>
        </ul>

        <t>A CoRIM is signed by the Endorser. The requirement of
        <xref target="role-endorser"/> that the Endorser's own key be
        verifiable applies to the CoRIM signing key. The revocation semantics
        of <xref target="endorser-revocation"/> and
        <xref target="device-revocation"/> apply regardless of the encoding
        used for the endorsement; this document does not depend on any
        CoRIM-specific revocation mechanism.</t>
      </section>

      <section anchor="endorser-revocation" numbered="true">
        <name>Endorser Revocation</name>

        <t>An Endorser <bcp14>MAY</bcp14> revoke an endorsement, for example on
        discovery of a compromised provisioning batch. Revocations
        <bcp14>SHALL</bcp14> be timestamped with an effective time, which
        <bcp14>MAY</bcp14> be earlier than the time of issuance when the
        Endorser knows when a compromise began. A Verifier
        <bcp14>MUST</bcp14> evaluate revocation against the Anchor Time of
        the batch containing the attestation (<xref target="onchain"/>), and
        not against the attestation's "iat", because "iat" is set by the
        Attester's host and can be back-dated by an adversary that controls
        the host or holds an extracted key. An attestation whose Anchor Time
        is at or after the effective time of a revocation of its Endorser
        <bcp14>MUST</bcp14> be rejected.</t>
      </section>

      <section anchor="device-revocation" numbered="true">
        <name>Device-Level Revocation</name>

        <t>A device's endorsement <bcp14>MAY</bcp14> be revoked individually,
        for example on suspicion of physical tampering reported through the
        protocol's challenge mechanism, or on detection of equivocation
        (<xref target="measurement-identity"/>). Attestations from a revoked
        device whose Anchor Time (<xref target="onchain"/>) is at or after
        the effective time of the revocation <bcp14>MUST</bcp14> be rejected,
        whatever their "iat" value.</t>
      </section>
    </section>

    <section anchor="attestation-results" numbered="true">
      <name>Attestation Results</name>

      <t>A Verifier that conveys the result of its appraisal to a Relying
      Party <bcp14>SHOULD</bcp14> encode it as an EAT Attestation Result
      (EAR) <xref target="I-D.ietf-rats-ear"/>, protected as specified there.
      A Verifier used as a library within the Relying Party
      <bcp14>MAY</bcp14> use a local representation, but that representation
      <bcp14>SHOULD</bcp14> carry the same information as the EAR described
      in this section. This section defines how the outcome of the
      verification path of <xref target="verification-path"/> is expressed
      in EAR; it does not change that verification path.</t>

      <section anchor="ear-submods" numbered="true">
        <name>Appraisal Records</name>

        <t>The EAR contains one EAR-appraisal entry in its "submods" claim
        for each appraised attestation token, because the
        "ear_attester_claims" of an EAR-appraisal carry the claims of a
        single appraisal <xref target="I-D.ietf-rats-ear"/>. The label of
        that entry <bcp14>SHOULD</bcp14> be the lowercase hexadecimal
        encoding of the token's "iss" claim, followed by a hyphen and the
        decimal value of its "seq" claim, so that results for the same
        measurement (<xref target="measurement-identity"/>) are labelled
        consistently across Verifiers. As required by
        <xref target="I-D.ietf-rats-ear"/>, the top-level "ear_status" of an
        EAR reporting on several tokens is no higher than the worst
        "ear_status" among its entries.</t>

        <t>The "ear_status" of an appraisal entry is a trustworthiness tier
        of <xref target="I-D.ietf-rats-ar4si"/>. As required by
        <xref target="I-D.ietf-rats-ear"/>, it <bcp14>MUST NOT</bcp14> be a
        tier of higher trust than the tier of the worst claim in the
        trustworthiness vector of that entry. Within that limit, it is
        assigned as follows:</t>

        <ul spacing="normal">
          <li>"affirming" only if all steps of the verification path of
          <xref target="verification-path"/> succeed, including
          finalization, and no claim of the trustworthiness vector is in the
          Warning or Contraindicated tier. Because "sourced-data" is in the
          Warning tier unless the measurer has itself been appraised
          (<xref target="ear-vector"/>), a deployment whose
          measurer-to-signer interface is unauthenticated obtains at most
          "warning".</li>
          <li>No higher than "warning" if every step other than finalization
          succeeds but the batch is still within its challenge window. Such a
          result <bcp14>MUST NOT</bcp14> be treated by a Relying Party as
          evidence of finalized generation.</li>
          <li>"contraindicated" if the signature fails to validate, the
          Merkle inclusion proof does not match the committed root, the
          device or its Endorser is revoked as of the Anchor Time of the
          batch (<xref target="onchain"/>), the "iat" plausibility check
          fails, or equivocation is detected
          (<xref target="measurement-identity"/>).</li>
        </ul>
      </section>

      <section anchor="ear-vector" numbered="true">
        <name>Trustworthiness Vector</name>

        <t>The Verifier <bcp14>SHOULD</bcp14> include the trustworthiness
        vector of <xref target="I-D.ietf-rats-ar4si"/>, populated as
        follows. Values are those defined in that document. Claims not listed
        are left unasserted; a value of 0 (no assertion) is equivalent to an
        unasserted claim.</t>

        <dl newline="true" spacing="normal">
          <dt>instance-identity:</dt>
          <dd>2 when the device key is endorsed and not revoked as of the
          Anchor Time; 96 when it is revoked. 97 only when no endorsement is
          found for a device that the Verifier expects to recognize, for
          example because its "iss" appears in an Endorser's provisioning
          records; otherwise the claim is unasserted. A token without an
          endorsed key cannot pass the verification path, and its
          "ear_status" is not "affirming".</dd>

          <dt>hardware:</dt>
          <dd>2 when an endorsement asserts that the key is held in a secure
          element meeting the Endorser's stated provisioning procedure
          (<xref target="role-endorser"/>); otherwise unasserted (0).</dd>

          <dt>executables and configuration:</dt>
          <dd>The "fwv" and "cfg" claims are reported by the host and are not
          measured by the secure element (<xref target="threat-mcu"/>). A
          Verifier <bcp14>MUST NOT</bcp14> assign a value in the Affirming
          tier to these claims on the basis of "fwv" and "cfg" alone, unless
          an Endorsement asserts that those values are measured by a root of
          trust rather than reported by the host. Where they match Reference
          Values, the claims are otherwise left unasserted. Where they do not
          match, the Verifier assigns 33 to "executables" and 95 to
          "configuration".</dd>

          <dt>sourced-data:</dt>
          <dd>2 only when the readings are authenticated by the measurer
          (<xref target="threat-physical"/>) and the measurer has itself been
          appraised as an Attester, for example as a separate EAR-appraisal
          of a composite Attester, with a result that meets the conditions of
          <xref target="I-D.ietf-rats-ar4si"/> for that value. An Endorsement
          stating that the measurer-to-signer interface is authenticated is
          not sufficient on its own. Otherwise 32, which denotes data from
          unattested sources. A Verifier <bcp14>MUST NOT</bcp14> assign an
          affirming value to this claim on the basis of the Attester's
          signature alone, because that signature does not cover the
          measurer-to-signer interface. Appraisal of the measurer is not
          further specified in this version.</dd>
        </dl>

        <t>The value 99 (cryptographic validation of the Evidence has
        failed) applies to any claim affected by a failed signature or
        inclusion-proof check.</t>
      </section>

      <section anchor="ear-claims" numbered="true">
        <name>Attested Quantities</name>

        <t>An EAR describes an appraisal; it does not by itself convey the
        quantity of energy appraised. To let a Relying Party act on the
        result without re-parsing the token, the Verifier
        <bcp14>SHOULD</bcp14> include in "ear_attester_claims" the "iss",
        "iat", "seq", and "wh" claims of the appraised token, and in
        "ear_verifier_claims" the epoch, the Anchor Time, the leaf hash of
        the token, and the Measurement Interval derived as described in
        <xref target="time-granular"/>. The Verifier <bcp14>MAY</bcp14>
        include the complete Attestation Token in "ear_raw_evidence",
        wrapped as a Conceptual Message Wrapper <xref target="RFC9999"/>;
        the privacy considerations of <xref target="privacy"/> apply to that
        choice.</t>

        <t>An "affirming" result states that the checks of this document
        succeeded. It does not extend the assurance of the protocol beyond
        the limits described in <xref target="threat-physical"/>; a Relying
        Party <bcp14>SHOULD</bcp14> consult the "sourced-data" claim before
        relying on a result for regulatory or financial settlement.</t>
      </section>
    </section>

    <section anchor="time-granular" numbered="true">
      <name>Time-Granular Claims and Hourly Matching</name>

      <t>Some uses of attested generation compare generation with
      consumption over short time intervals, typically one hour, rather than
      over a year. This section describes how the tokens defined in this
      document support such comparisons. It introduces no new claims.</t>

      <section anchor="interval-derivation" numbered="true">
        <name>Measurement Intervals</name>

        <t>Each token reports in "wh" the energy measured since the previous
        token from the same device. For a token with "seq" equal to n greater
        than 1, the Measurement Interval is the half-open interval from the
        "iat" of token n-1, exclusive, to the "iat" of token n, inclusive. A
        Verifier <bcp14>MUST</bcp14> derive a Measurement Interval only from
        a verified contiguous pair: token n-1 has passed the verification path
        of <xref target="verification-path"/>, the "prev" claim of token n
        matches the hash of the evidence payload of token n-1
        (<xref target="claim-set"/>), and the "iat" of token n is strictly
        greater than the "iat" of token n-1. Attesters <bcp14>MUST</bcp14>
        emit strictly increasing "iat" values. A pair that satisfies the
        "prev" check but not the "iat" check is non-conformant: the Verifier
        <bcp14>MUST NOT</bcp14> derive an interval from it and
        <bcp14>MUST</bcp14> appraise token n as contraindicated. The "wh" of the first token
        ("seq" equal to 1) has no defined interval and <bcp14>MUST
        NOT</bcp14> be attributed to any interval.</t>

        <t>A gap in the sequence, or a "prev" value that does not match,
        means that the energy for the affected period is not attested. In
        line with the fail-closed rule of <xref target="threat-physical"/>,
        a Verifier or Relying Party <bcp14>MUST NOT</bcp14> fill such a gap
        by interpolation or by an unattested reading.</t>
      </section>

      <section anchor="hour-alignment" numbered="true">
        <name>Alignment with Hour Boundaries</name>

        <t>An Attester intended for hourly accounting <bcp14>SHOULD</bcp14>
        emit a token at each hour boundary in UTC, in addition to any finer
        reporting cadence, so that no Measurement Interval spans a boundary.
        For this purpose, hour h is the half-open interval from h*3600
        seconds, exclusive, to (h+1)*3600 seconds, inclusive, in the time
        scale of the "iat" claim, matching the orientation of Measurement
        Intervals; a token emitted exactly at a boundary closes the hour
        that ends there. A Measurement Interval from t1, exclusive, to t2,
        inclusive, lies within hour h if h*3600 is less than or equal to t1
        and t2 is less than or equal to (h+1)*3600. The hourly total of
        attested generation for a device is then the sum of "wh" over the
        tokens whose Measurement Interval lies within that hour.</t>

        <t>When a Measurement Interval spans one or more hour boundaries,
        this document does not define how its energy is apportioned among
        the hours. A Relying Party that apportions such an interval does so
        under its own policy and <bcp14>SHOULD</bcp14> record the method
        used; a Verifier <bcp14>MUST NOT</bcp14> apportion silently.</t>
      </section>

      <section anchor="hourly-matching" numbered="true">
        <name>Matching Consumption to Generation</name>

        <t>Hourly matching compares, for each hour, attested generation with
        consumption attributed to a consumer. This document specifies only
        the generation side. The source of consumption data, the rules that
        decide which generation may be matched to which consumption (for
        example by grid region), and the allocation of a device's generation
        among several consumers are matters for the Relying Party or for the
        applicable certificate scheme, and are out of scope.</t>

        <t>The same attested generation <bcp14>MUST NOT</bcp14> be counted
        toward more than one claim. Preventing such reuse is the
        responsibility of the claim layer
        (<xref target="two-layer"/>) and of any external scheme that
        consumes attestations; such systems <bcp14>MUST</bcp14> detect reuse
        using the measurement identifier of
        <xref target="measurement-identity"/>, and <bcp14>MUST NOT</bcp14>
        use the leaf hash for that purpose.</t>
      </section>

      <section anchor="interval-considerations" numbered="true">
        <name>Time Integrity and Privacy</name>

        <t>Attribution of energy to an hour depends on the "iat" claim and
        therefore on the integrity of the Attester's time source
        (<xref target="security"/>). Deployments that need freshness bounds
        independent of the Attester's clock <bcp14>MAY</bcp14> use Epoch
        Markers <xref target="I-D.ietf-rats-epoch-markers"/>; such use is not
        specified in this version and would require an Evidence claim
        carrying the epoch identifier.</t>

        <t>Timestamp rounding for privacy (<xref target="privacy-mitigations"/>)
        interacts with hourly accounting: a rounding granularity coarser than
        one hour prevents hourly attribution. Where rounding is applied to
        tokens used for hourly accounting, the granularity
        <bcp14>SHOULD</bcp14> divide one hour evenly, so that rounded
        boundary tokens remain on the hour boundary. Rounding
        <bcp14>MUST</bcp14> preserve strictly increasing "iat" values: an
        Attester that rounds "iat" emits at most one token per rounding
        bucket, merging the energy of the bucket into that token.</t>
      </section>

      <section anchor="measurement-identity" numbered="true">
        <name>Measurement Identity and Equivocation</name>

        <t>A measurement is identified by the pair ("iss", "seq") of the
        token that reports it. The leaf hash of <xref target="offchain"/> is
        not a stable identifier for this purpose: ECDSA signatures are
        randomized and malleable, so the same evidence payload can appear in
        several valid tokens with different leaf hashes, and the unprotected
        header is not covered by the signature. Accordingly:</t>

        <ul spacing="normal">
          <li>Two tokens with the same ("iss", "seq") and identical evidence
          payloads report the same measurement. Their energy
          <bcp14>MUST</bcp14> be counted at most once, whichever batches,
          intervals, or claims they appear in.</li>
          <li>Two tokens with the same ("iss", "seq") and different evidence
          payloads constitute equivocation by the device or its host. A
          Verifier that observes equivocation <bcp14>MUST</bcp14> appraise
          both tokens as contraindicated, <bcp14>MUST NOT</bcp14> attribute
          the energy of either to any interval, and <bcp14>SHOULD</bcp14>
          report the device for revocation
          (<xref target="device-revocation"/>). Validators
          <bcp14>SHOULD</bcp14> check, before voting, that no ("iss", "seq")
          in a proposed batch appears with a different payload in that batch
          or in an earlier committed batch.</li>
          <li>The "iat" of a token <bcp14>MUST NOT</bcp14> exceed its Anchor
          Time (<xref target="onchain"/>) by more than a deployment-defined
          maximum clock skew. A token that fails this check is appraised as
          contraindicated. Because the host controls the Attester's clock,
          this bound, not the Attester's time source, is the time check that
          a Verifier can enforce.</li>
        </ul>

        <t>Equivocation can be detected only by a party that observes both
        tokens. Detection is therefore strongest at the commitment layer,
        where all batches are visible, and a Relying Party that relies on a
        single Verifier depends on that Verifier's view.</t>
      </section>
    </section>

    <section anchor="threat-model" numbered="true">
      <name>Threat Model</name>

      <t>The following adversaries are explicitly considered.</t>

      <section anchor="threat-mcu" numbered="true">
        <name>Compromised Host MCU</name>

        <t>The host microcontroller adjacent to the secure element may be
        compromised. Because the signing key is generated on-chip and never
        leaves the secure element, a compromised host can lie about what to
        sign but cannot forge signatures under the device's public key.</t>

        <t>The "fwv" and "cfg" claims do not mitigate this threat. They are
        written by the same host that is assumed to be compromised, and the
        secure element signs whatever digest it receives without measuring
        the host: it is not a root of trust for measurement. A compromised
        host can therefore report the expected firmware version and
        configuration digest. Unless those values are measured by the secure
        element or by another root of trust, comparing them with Reference
        Values detects misconfiguration of an honest host, not a tampered
        one (see also <xref target="ear-vector"/>). Deployments
        <bcp14>SHOULD</bcp14> use host secure boot. Layered attestation of
        the host, in which each boot stage is measured before it runs, is
        left for a future revision.</t>
      </section>

      <section anchor="threat-physical" numbered="true">
        <name>Meter Substitution and Physical Tampering</name>

        <t>The Attester is composed of a measurer and a signer (<xref
        target="role-attester"/>). Every cryptographic guarantee in this
        document applies to the signer: a valid attestation proves that a
        particular secure element signed a particular set of numbers. It does
        not, on its own, prove that those numbers came from the meter the
        Endorser expects, nor that they correspond to physical energy flow. The
        measurer-to-signer interface is consequently the weakest link in the
        chain of custody, and it is where the adversaries below operate.</t>

        <t>Meter substitution. An adversary with physical access may replace
        the meter, or interpose on the measurer-to-signer interface, and
        present fabricated readings to the secure element. The secure element
        signs them faithfully and verification succeeds at every later stage:
        the signature is valid, the endorsement chain is intact, the hash chain
        is continuous, and the on-chain commitment is well formed. Where the
        measurer-to-signer interface is unauthenticated, as it is on a bare
        pulse output or an unauthenticated serial connection, no mechanism
        defined in this document detects this attack.</t>

        <t>Substitution after verification. A measurer that is verified only
        once, at commissioning or at Attester power-on, provides no continuing
        guarantee: an adversary may satisfy the check with a genuine meter and
        substitute afterwards. Implementations <bcp14>MUST NOT</bcp14> treat a
        commissioning-time verification of the measurer as evidence about
        readings produced later.</t>

        <t>Physical tampering of a genuine meter. The meter or its sealing may
        be tampered with in order to distort readings at the point of
        measurement. This protocol does not detect such tampering; the existing
        physical-seal and audit regime of revenue-grade metering, which predates
        this protocol, remains necessary. That regime is complementary to the
        mitigations below, not a substitute for them, because a seal constrains
        the meter itself and says nothing about what reaches the signer.</t>

        <t>Secure-element substitution. This case is detected, because the
        device serial number changes and the new public key has no endorsement
        chain.</t>

        <t>The following mitigations apply to the measurer-to-signer
        interface.</t>

        <ul spacing="normal">
          <li>Authenticated measurement. The Attester <bcp14>SHOULD</bcp14> be
          built on a meter whose metrology function authenticates each reading
          under a key held in the meter's own protected storage, and the secure
          element <bcp14>SHOULD</bcp14> verify that authentication before
          including a reading in the claim set.</li>
          <li>Continuous rather than one-time verification. Where the interface
          supports authentication, the Attester <bcp14>SHOULD</bcp14> verify it
          at every reporting interval rather than only at commissioning, so
          that no window exists in which a verified measurer can be exchanged
          for an unverified one without detection.</li>
          <li>Fail-closed behaviour. If the measurer cannot be authenticated,
          becomes unavailable, or returns readings inconsistent with the
          Attester's monotonic energy counter, the Attester
          <bcp14>MUST NOT</bcp14> emit an attestation covering the affected
          interval. Emitting an attestation over unauthenticated readings, or
          falling back to an unauthenticated interface, defeats the purpose of
          signing them. A Relying Party <bcp14>MUST</bcp14> treat the absence
          of an attestation as the absence of attested generation, and
          <bcp14>MUST NOT</bcp14> substitute an unattested reading in its
          place.</li>
        </ul>

        <t>Residual risk. Deployments whose measurer-to-signer interface is
        unauthenticated retain the full meter-substitution risk described above.
        For those deployments the assurance offered by this protocol degrades
        from "this quantity of energy was generated" to "this secure element
        reported this quantity", and the binding to physical generation rests
        entirely on out-of-band procedures. Deployments supporting regulatory
        or financial settlement <bcp14>SHOULD</bcp14> use an authenticated
        measurement interface for this reason. So that a Relying Party can
        apply policy to the class of measurer-to-signer protection rather than
        assuming it, that class is asserted by the Endorser
        (<xref target="corim-endorsements"/>) and is reflected in the
        "sourced-data" claim of the Attestation Result
        (<xref target="ear-vector"/>), which is affirming only when the
        measurer has itself been appraised. A claim by which the Attester itself
        reports that class is left for a future revision.</t>
      </section>

      <section anchor="threat-extraction" numbered="true">
        <name>Secure-Element Key Extraction</name>

        <t>Extraction of the signing key from a Common Criteria EAL5+ secure
        element is currently considered infeasible against the design
        assumptions of state-of-the-art parts. If such an extraction becomes
        feasible, the affected device family's endorsements
        <bcp14>SHALL</bcp14> be revoked. Back-dating with an extracted key
        is limited because revocation and "iat" plausibility are evaluated
        against the Anchor Time of the batch, which the key holder does not
        control (<xref target="device-revocation"/>,
        <xref target="measurement-identity"/>), and because historical
        attestations are already anchored on-chain.</t>
      </section>

      <section anchor="threat-collusion" numbered="true">
        <name>Validator Collusion</name>

        <t>A validator could withhold attestations or propose a batch with a
        Merkle root that does not correspond to the claimed leaves. Three
        mechanisms address this in combination:</t>

        <ol spacing="normal">
          <li>m-of-n threshold quorum. Finalization requires a threshold number
          of distinct validator votes through the propose, vote, and finalize
          sequence. A single party cannot cause a batch to be finalized. The
          threshold <bcp14>MUST</bcp14> be selected such that coalition cost
          exceeds expected fraud value; analogous systems typically use
          ceil(2n/3) for Byzantine fault tolerance.</li>
          <li>Challenge window. Independently of the threshold mechanism,
          between submission and earliest finalization any party
          <bcp14>MAY</bcp14> report evidence of fraud. In the current reference
          implementation this path is off-chain: evidence is reported to
          operators and validators, who block finalization through the pause
          mechanism and apply slashing. An on-chain challenge entry point is
          deferred to a future revision (<xref target="onchain"/>). A batch
          successfully challenged within the window is never finalized.</li>
          <li>Slashing. Validators proven to have voted for fraudulent batches
          <bcp14>MAY</bcp14> be slashed: the validator role is revoked and the
          off-chain evidence hash is recorded on-chain. The current reference
          contract implements administratively triggered slashing; on-chain
          fraud-proof verification feeding slashing automatically is deferred
          to a future revision.</li>
        </ol>

        <t>A coalition of threshold-many validators colluding within the
        challenge window can still finalize a fraudulent batch. This is the
        residual risk; it shrinks but does not disappear with the threshold
        mechanism. Production deployments <bcp14>SHOULD</bcp14> treat the
        challenge-window fraud-proof path as load-bearing.</t>
      </section>

      <section anchor="threat-replay" numbered="true">
        <name>Replay Attacks</name>

        <t>Replay of an old attestation as a new one gains an adversary
        nothing, because a measurement is identified by ("iss", "seq") and
        is counted at most once (<xref target="measurement-identity"/>). A
        token that reuses an existing ("iss", "seq") with a different payload
        is equivocation and is handled as specified in
        <xref target="measurement-identity"/>; the "prev" hash chain links
        each token to its predecessor (<xref target="interval-derivation"/>).
        A Verifier <bcp14>MUST NOT</bcp14> reject a token solely because its
        "seq" is lower than a value it has observed before, since historical
        and out-of-order verification of single tokens is a supported
        use.</t>
      </section>

      <section anchor="threat-sidechannel" numbered="true">
        <name>Side-Channel Observation</name>

        <t>Side-channel attacks against the secure element, including power
        analysis, electromagnetic analysis, and fault injection, are mitigated
        by the Common Criteria certification regime governing the part.
        Operators <bcp14>SHOULD</bcp14> follow vendor guidance on physical
        deployment in order to reduce exposure.</t>
      </section>
    </section>

    <section anchor="privacy" numbered="true">
      <name>Privacy Considerations</name>

      <t>The protocol produces a public, durable record of per-device energy
      generation. This has direct privacy implications, particularly for
      small-scale producers such as residential rooftop solar
      installations.</t>

      <section anchor="privacy-inference" numbered="true">
        <name>Inferences from Attestations</name>

        <t>A continuous record of per-device generation timestamps can be
        correlated with consumption patterns in order to infer the occupancy
        and behavior of a household. Aggregation and timestamp rounding
        mitigate but do not eliminate this risk.</t>
      </section>

      <section anchor="privacy-mitigations" numbered="true">
        <name>Mitigations</name>

        <ul spacing="normal">
          <li>Timestamp rounding. Producers <bcp14>MAY</bcp14> round "iat" to a
          coarser resolution, for example ten-minute buckets, at the cost of
          reduced verification granularity (see also
          <xref target="interval-considerations"/>).</li>
          <li>Batch padding. Aggregators <bcp14>SHOULD</bcp14> pad batches with
          dummy leaves so that a small-scale producer's contribution count is
          not distinguishable.</li>
          <li>Optional zero-knowledge extensions. A future revision will
          specify an optional zero-knowledge-friendly attestation variant in
          which the per-device identifier is replaced by a commitment, with
          selective-disclosure proofs available to authorized auditors.</li>
        </ul>
      </section>

      <section anchor="privacy-optout" numbered="true">
        <name>Right to Opt Out</name>

        <t>Participation in the protocol is, by design, voluntary. Operators
        are not required to publish attestations; the protocol's value derives
        from voluntary adoption by parties that wish to be cryptographically
        credible.</t>
      </section>
    </section>

    <section anchor="security" numbered="true">
      <name>Security Considerations</name>

      <t>In addition to the threat model in <xref target="threat-model"/>,
      implementers are advised of the following.</t>

      <ul spacing="normal">
        <li>Measurement-interface integrity. The protocol binds a signature to
        a set of readings, not to a physical quantity. The strength of the
        overall system is bounded by the protection of the measurer-to-signer
        interface, and an implementation that authenticates every other link
        while leaving that one open gains little. See <xref
        target="threat-physical"/>.</li>
        <li>Time source integrity. The "iat" timestamp depends on the clock
        of the host microcontroller, not of the secure element.
        Implementations <bcp14>SHOULD</bcp14> authenticate the time source,
        for example by using Network Time Security <xref target="RFC8915"/>,
        to protect an honest host against clock manipulation. An
        authenticated time source does not constrain a compromised host, and
        GNSS time can be spoofed; the enforceable bounds are therefore the
        Anchor Time checks of <xref target="measurement-identity"/> and of
        the revocation sections (<xref target="endorser-revocation"/>,
        <xref target="device-revocation"/>). In the terms of
        <xref target="RFC9334"/>, Section 10, this protocol uses implicit,
        timestamp-based freshness; tokens carry no nonce. Clock accuracy
        matters in particular for time-granular accounting
        (<xref target="time-granular"/>), where a skewed clock moves energy
        between hours.</li>
        <li>Attestation Result integrity. An EAR
        (<xref target="attestation-results"/>) is only as trustworthy as the
        Verifier that issued it. Relying Parties <bcp14>SHOULD</bcp14> accept
        EARs only from Verifiers they have chosen to trust, identified by the
        "ear_verifier_id" claim and the key protecting the EAR, and remain
        free to verify tokens themselves.</li>
        <li>Key provisioning. Endorsement integrity depends on a trustworthy
        provisioning ceremony, in which the device's public key is read from
        the secure element under chain-of-custody guarantees. Implementations
        <bcp14>SHOULD</bcp14> use vendor-provided pre-provisioning programs
        where available.</li>
        <li>Smart-contract risk. The on-chain commitment contract is a
        security-critical component. Implementations <bcp14>SHOULD</bcp14>
        subject it to independent audit prior to production deployment and
        <bcp14>SHOULD</bcp14> support upgradability only through a transparent
        governance process.</li>
        <li>Settlement-layer reliance. The protocol depends on the liveness and
        integrity of the chosen settlement layer. Operators
        <bcp14>SHOULD</bcp14> evaluate the settlement layer's security model,
        including its consensus assumptions and its fault-recovery
        procedures.</li>
        <li>Algorithm agility. Because the signature algorithm is named only in
        the COSE protected header (<xref target="alg-id"/>), it is covered by
        the signature itself. Verifiers <bcp14>MUST</bcp14> apply a local
        policy for acceptable algorithms rather than trusting the value found
        in the token, in order to avoid algorithm-downgrade attacks.</li>
      </ul>
    </section>

    <section anchor="iana" numbered="true">
      <name>IANA Considerations</name>

      <t>This document requests that IANA register the following media type in
      the "Media Types" registry.</t>

      <dl newline="false" spacing="compact">
        <dt>Type name:</dt><dd>application</dd>
        <dt>Subtype name:</dt><dd>noethrion+cbor</dd>
        <dt>Required parameters:</dt><dd>N/A</dd>
        <dt>Optional parameters:</dt><dd>profile (a URI identifying the
        attestation profile in use)</dd>
        <dt>Encoding considerations:</dt><dd>binary</dd>
        <dt>Security considerations:</dt><dd>See <xref target="security"/> of
        this document.</dd>
        <dt>Interoperability considerations:</dt><dd>See
        <xref target="token-format"/> of this document.</dd>
        <dt>Published specification:</dt><dd>This document.</dd>
        <dt>Applications that use this media type:</dt><dd>Producers and
        consumers of energy attestation tokens as defined in this
        document.</dd>
        <dt>Fragment identifier considerations:</dt><dd>N/A</dd>
        <dt>Additional information:</dt><dd>Magic number(s): N/A; File
        extension(s): N/A; Macintosh file type code(s): N/A</dd>
        <dt>Person and email address to contact for further
        information:</dt><dd>Aleksey Chursin
        (team@noethrion.com)</dd>
        <dt>Intended usage:</dt><dd>COMMON</dd>
        <dt>Restrictions on usage:</dt><dd>N/A</dd>
        <dt>Author:</dt><dd>See the Author's Address section of this
        document.</dd>
        <dt>Change controller:</dt><dd>IETF</dd>
      </dl>

      <t>Future revisions of this document may request additional CBOR tag
      allocations and CoAP profile registrations.</t>
    </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="RFC8610" target="https://www.rfc-editor.org/info/rfc8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author initials="H." surname="Birkholz" fullname="H. Birkholz"/>
            <author initials="C." surname="Vigano" fullname="C. Vigano"/>
            <author initials="C." surname="Bormann" fullname="C. Bormann"/>
            <date year="2019" month="June"/>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </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" fullname="C. Bormann"/>
            <author initials="P." surname="Hoffman" fullname="P. 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" fullname="J. 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="RFC9711" target="https://www.rfc-editor.org/info/rfc9711">
          <front>
            <title>The Entity Attestation Token (EAT)</title>
            <author initials="L." surname="Lundblade" fullname="L. Lundblade"/>
            <author initials="G." surname="Mandyam" fullname="G. Mandyam"/>
            <author initials="J." surname="O'Donoghue" fullname="J. O'Donoghue"/>
            <author initials="C." surname="Wallace" fullname="C. Wallace"/>
            <date year="2025" month="April"/>
          </front>
          <seriesInfo name="RFC" value="9711"/>
          <seriesInfo name="DOI" value="10.17487/RFC9711"/>
        </reference>

        <reference anchor="I-D.ietf-rats-ear" target="https://datatracker.ietf.org/doc/html/draft-ietf-rats-ear-04">
          <front>
            <title>EAT Attestation Results</title>
            <author fullname="Thomas Fossati" initials="T." surname="Fossati"/>
            <author fullname="Eric Voit" initials="E." surname="Voit"/>
            <author fullname="Sergei Trofimov" initials="S." surname="Trofimov"/>
            <author fullname="Henk Birkholz" initials="H." surname="Birkholz"/>
            <date day="26" month="May" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-ear-04"/>
        </reference>

        <reference anchor="I-D.ietf-rats-ar4si" target="https://datatracker.ietf.org/doc/html/draft-ietf-rats-ar4si-11">
          <front>
            <title>Attestation Results for Secure Interactions</title>
            <author fullname="Eric Voit"/>
            <author fullname="Henk Birkholz"/>
            <author fullname="Thomas Hardjono"/>
            <author fullname="Thomas Fossati"/>
            <author fullname="Vincent Scarlata"/>
            <date day="31" month="October" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-ar4si-11"/>
        </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" fullname="H. Birkholz"/>
            <author initials="D." surname="Thaler" fullname="D. Thaler"/>
            <author initials="M." surname="Richardson" fullname="M. Richardson"/>
            <author initials="N." surname="Smith" fullname="N. Smith"/>
            <author initials="W." surname="Pan" fullname="W. Pan"/>
            <date year="2023" month="January"/>
          </front>
          <seriesInfo name="RFC" value="9334"/>
          <seriesInfo name="DOI" value="10.17487/RFC9334"/>
        </reference>

        <reference anchor="RFC9864" target="https://www.rfc-editor.org/info/rfc9864">
          <front>
            <title>Fully-Specified Algorithms for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE)</title>
            <author initials="M.B." surname="Jones" fullname="M.B. Jones"/>
            <author initials="O." surname="Steele" fullname="O. Steele"/>
            <date year="2025" month="October"/>
          </front>
          <seriesInfo name="RFC" value="9864"/>
          <seriesInfo name="DOI" value="10.17487/RFC9864"/>
        </reference>
      </references>

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

        <reference anchor="I-D.ietf-rats-corim" target="https://datatracker.ietf.org/doc/html/draft-ietf-rats-corim-11">
          <front>
            <title>Concise Reference Integrity Manifest</title>
            <author fullname="Henk Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="Thomas Fossati" initials="T." surname="Fossati"/>
            <author fullname="Yogesh Deshpande" initials="Y." surname="Deshpande"/>
            <author fullname="Ned Smith" initials="N." surname="Smith"/>
            <author fullname="Wei Pan" initials="W." surname="Pan"/>
            <date day="6" month="July" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-corim-11"/>
        </reference>

        <reference anchor="I-D.ietf-rats-endorsements" target="https://datatracker.ietf.org/doc/html/draft-ietf-rats-endorsements-13">
          <front>
            <title>Remote Attestation Procedures (RATS) Endorsements</title>
            <author fullname="Dave Thaler" initials="D." surname="Thaler"/>
            <author fullname="Henk Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="Thomas Fossati" initials="T." surname="Fossati"/>
            <date day="14" month="October" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-endorsements-13"/>
        </reference>

        <reference anchor="I-D.ietf-rats-epoch-markers" target="https://datatracker.ietf.org/doc/html/draft-ietf-rats-epoch-markers-06">
          <front>
            <title>Epoch Markers</title>
            <author fullname="Henk Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="Thomas Fossati" initials="T." surname="Fossati"/>
            <author fullname="Wei Pan" initials="W." surname="Pan"/>
            <author fullname="Ionuț Mihalcea" initials="I." surname="Mihalcea"/>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann"/>
            <date day="20" month="October" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-epoch-markers-06"/>
        </reference>

        <reference anchor="RFC9999" target="https://www.rfc-editor.org/info/rfc9999">
          <front>
            <title>Remote ATtestation procedureS (RATS) Conceptual Message Wrapper (CMW)</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="N. Smith" initials="N." surname="Smith"/>
            <author fullname="T. Fossati" initials="T." surname="Fossati"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <date month="July" year="2026"/>
          </front>
          <seriesInfo name="RFC" value="9999"/>
          <seriesInfo name="DOI" value="10.17487/RFC9999"/>
        </reference>

        <reference anchor="RFC9162" target="https://www.rfc-editor.org/info/rfc9162">
          <front>
            <title>Certificate Transparency Version 2.0</title>
            <author initials="B." surname="Laurie" fullname="B. Laurie"/>
            <author initials="E." surname="Messeri" fullname="E. Messeri"/>
            <author initials="R." surname="Stradling" fullname="R. Stradling"/>
            <date year="2021" month="December"/>
          </front>
          <seriesInfo name="RFC" value="9162"/>
          <seriesInfo name="DOI" value="10.17487/RFC9162"/>
        </reference>

        <reference anchor="FIPS204" target="https://doi.org/10.6028/NIST.FIPS.204">
          <front>
            <title>Module-Lattice-Based Digital Signature Standard</title>
            <author>
              <organization>National Institute of Standards and Technology</organization>
            </author>
            <date year="2024" month="August"/>
          </front>
          <seriesInfo name="FIPS" value="204"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.204"/>
        </reference>

        <reference anchor="CBAM" target="https://eur-lex.europa.eu/eli/reg/2023/956/oj">
          <front>
            <title>Regulation (EU) 2023/956 establishing a carbon border adjustment mechanism</title>
            <author>
              <organization>European Union</organization>
            </author>
            <date year="2023" month="May"/>
          </front>
        </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" fullname="J. Schaad"/>
            <date year="2022" month="August"/>
          </front>
          <seriesInfo name="RFC" value="9053"/>
          <seriesInfo name="DOI" value="10.17487/RFC9053"/>
        </reference>

        <reference anchor="RFC8392" target="https://www.rfc-editor.org/info/rfc8392">
          <front>
            <title>CBOR Web Token (CWT)</title>
            <author initials="M." surname="Jones" fullname="M. Jones"/>
            <author initials="E." surname="Wahlstroem" fullname="E. Wahlstroem"/>
            <author initials="S." surname="Erdtman" fullname="S. Erdtman"/>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig"/>
            <date year="2018" month="May"/>
          </front>
          <seriesInfo name="RFC" value="8392"/>
          <seriesInfo name="DOI" value="10.17487/RFC8392"/>
        </reference>

        <reference anchor="RFC9596" target="https://www.rfc-editor.org/info/rfc9596">
          <front>
            <title>CBOR Object Signing and Encryption (COSE) "typ" (type) Header Parameter</title>
            <author initials="M.B." surname="Jones" fullname="M.B. Jones"/>
            <author initials="O." surname="Steele" fullname="O. Steele"/>
            <date year="2024" month="June"/>
          </front>
          <seriesInfo name="RFC" value="9596"/>
          <seriesInfo name="DOI" value="10.17487/RFC9596"/>
        </reference>

        <reference anchor="RFC8915" target="https://www.rfc-editor.org/info/rfc8915">
          <front>
            <title>Network Time Security for the Network Time Protocol</title>
            <author initials="D." surname="Franke" fullname="D. Franke"/>
            <author initials="D." surname="Sibold" fullname="D. Sibold"/>
            <author initials="K." surname="Teichel" fullname="K. Teichel"/>
            <author initials="M." surname="Dansarie" fullname="M. Dansarie"/>
            <author initials="R." surname="Sundblad" fullname="R. Sundblad"/>
            <date year="2020" month="October"/>
          </front>
          <seriesInfo name="RFC" value="8915"/>
          <seriesInfo name="DOI" value="10.17487/RFC8915"/>
        </reference>

        <reference anchor="RFC9942" target="https://www.rfc-editor.org/info/rfc9942">
          <front>
            <title>CBOR Object Signing and Encryption (COSE) Receipts</title>
            <author initials="O." surname="Steele" fullname="O. Steele"/>
            <author initials="H." surname="Birkholz" fullname="H. Birkholz"/>
            <author initials="A." surname="Delignat-Lavaud" fullname="A. Delignat-Lavaud"/>
            <author initials="C." surname="Fournet" fullname="C. Fournet"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="RFC" value="9942"/>
          <seriesInfo name="DOI" value="10.17487/RFC9942"/>
        </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" fullname="H. Birkholz"/>
            <author initials="A." surname="Delignat-Lavaud" fullname="A. Delignat-Lavaud"/>
            <author initials="C." surname="Fournet" fullname="C. Fournet"/>
            <author initials="Y." surname="Deshpande" fullname="Y. Deshpande"/>
            <author initials="S." surname="Lasker" fullname="S. Lasker"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="RFC" value="9943"/>
          <seriesInfo name="DOI" value="10.17487/RFC9943"/>
        </reference>

        <reference anchor="KECCAK" target="https://keccak.team/files/Keccak-reference-3.0.pdf">
          <front>
            <title>The Keccak reference, version 3.0</title>
            <author initials="G." surname="Bertoni" fullname="Guido Bertoni"/>
            <author initials="J." surname="Daemen" fullname="Joan Daemen"/>
            <author initials="M." surname="Peeters" fullname="Michael Peeters"/>
            <author initials="G." surname="Van Assche" fullname="Gilles Van Assche"/>
            <date year="2011" month="January"/>
          </front>
        </reference>
      </references>
    </references>

    <section anchor="reference-impl" numbered="true">
      <name>Reference Implementation</name>

      <t>A reference implementation of the Attester (firmware) and of the
      Verifier (settlement contract plus off-chain library) is available from
      the project repository identified on the author's organization web site.
      The reference implementation is provided for interoperability testing and
      is not normative; where it differs from this document, this document
      prevails.</t>
    </section>

    <section anchor="changes" numbered="true" removeInRFC="true">
      <name>Changes since -00</name>

      <ul spacing="normal">
        <li>Added <xref target="attestation-results"/>, expressing Verifier
        output as EAT Attestation Results (EAR), including the assignment of
        "ear_status" and of the AR4SI trustworthiness vector. The
        measurer-to-signer protection class is reported in the
        "sourced-data" claim. This resolves the "[TBD in -01]" item that
        -00 carried in its Section 8.2 (now
        <xref target="threat-physical"/>) without adding a token claim.
        Sections 8 to 12 of -00 are Sections 10 to 14 of this revision, and
        Sections 7.2 and 7.3 of -00 are Sections 7.3 and 7.4.</li>
        <li>Added <xref target="corim-endorsements"/>, describing how
        device-key endorsements, Reference Values, and Endorsed Values map
        onto CoRIM. The registry of <xref target="key-registry"/> is retained
        as an option, and may carry or anchor a CoRIM.</li>
        <li>Added <xref target="time-granular"/> on Measurement Intervals and
        hourly matching. No new claims; intervals are derived from verified
        consecutive tokens, gaps are not interpolated, and apportionment
        across hour boundaries is left to Relying Party policy.</li>
        <li>Replaced the "[TBD: EAT profile claim mapping table in -01]" item
        with an informative correspondence table
        (<xref target="tbl-eat-map"/>), and corrected the -00 statement that
        "iss", "iat", and "seq" map directly to CWT-registered claims; only
        "iat" does.</li>
        <li>Added the terms Attestation Result and Measurement Interval, a
        Verifier requirement to encode results per
        <xref target="attestation-results"/>, and Security Considerations
        items on time-source integrity for hourly accounting and on trust in
        Verifiers that issue EARs.</li>
        <li>Added references to current RATS Working Group documents: EAR
        and AR4SI (normative); CoRIM, Endorsements, Epoch Markers, and the
        Conceptual Message Wrapper (RFC 9999) (informative).</li>
        <li>The strengthened treatment of meter substitution in
        <xref target="threat-physical"/> was already present in -00 as
        posted and is unchanged apart from its final sentence.</li>
        <li>Remaining "-01" placeholders retargeted to a future revision.
        No change to the Merkle construction.</li>
        <li><t>Following review before submission:</t>
        <ul spacing="normal">
          <li>"ear_status" can no longer exceed the worst claim of the
          trustworthiness vector, as required by EAR; "affirming" requires
          no Warning or Contraindicated claim. AR4SI values corrected: 97 is
          used only for devices the Verifier expects to recognize,
          "hardware" without an assertion is unasserted, and "sourced-data"
          is 2 only when the measurer has itself been appraised. One
          EAR-appraisal per token, labelled by "iss" and "seq".</li>
          <li>Signature algorithm identifier changed from ES256 (-7),
          deprecated by RFC 9864, to the fully-specified ESP256 (-9), with
          a compatibility allowance for -7 (<xref target="signature-scheme"/>).
          Signatures are unchanged in form.</li>
          <li>Added <xref target="measurement-identity"/>: a measurement is
          identified by ("iss", "seq"), not by the leaf hash; the
          unprotected header is empty; equivocation is contraindicated;
          "iat" is bounded by the Anchor Time. "iat" must strictly increase,
          and hour boundaries are defined. The replay rule of
          <xref target="threat-replay"/> no longer rejects historical
          verification.</li>
          <li>Revocation is evaluated against the Anchor Time of the batch,
          defined in <xref target="onchain"/>, rather than the
          Attester-controlled "iat"; added verification step 8.</li>
          <li>Specified SHA-256 for "prev" (over the previous evidence
          payload) and "cfg"; tightened the CDDL ("alg", "iss", "seq",
          "prev", "cfg", empty unprotected header). "prev" and the
          endorsement check are now MUST throughout.</li>
          <li><xref target="threat-mcu"/> no longer claims that "fwv" and
          "cfg" detect a compromised host. The time-source requirement is
          now a SHOULD, with the Anchor Time bound as the enforceable
          check.</li>
          <li>Restricted the legacy bare encoding to records committed
          before a cutoff; aligned the Verifier, Relying Party, and
          Reference Values definitions with RFC 9334; added a note on SCITT
          and COSE Receipts (<xref target="transparency"/>); IANA contact is
          now the author.</li>
          <li>References: RFC 9334 moved to normative; RFC 9864 added
          (normative); RFC 9053 moved to informative; RFC 8392, RFC 8915,
          RFC 9596, RFC 9942, RFC 9943, and the Keccak reference added
          (informative).</li>
        </ul></li>
      </ul>
    </section>

    <section anchor="acknowledgements" numbered="false">
      <name>Acknowledgements</name>

      <t>The author thanks the participants of the RATS and COSE working groups
      whose published work this specification builds upon.</t>
    </section>
  </back>
</rfc>
