<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-rotzin-spice-afir-profile-00"
  ipr="trust200902"
  submissionType="IETF"
  consensus="false"
  version="3"
  xml:lang="en">

  <front>
    <title abbrev="AFiR SPICE Profile">
      AFiR: Post-Quantum Signed Inference Receipts as a TEE-Free
      Profile for IETF SPICE Inference Chain
    </title>

    <seriesInfo name="Internet-Draft" value="draft-rotzin-spice-afir-profile-00"/>

    <author fullname="Steve Rotzin" initials="S." surname="Rotzin">
      <organization>Hive / AFiR</organization>
      <address>
        <email>steve@thehiveryiq.com</email>
        <uri>https://thehiveryiq.com/afir</uri>
      </address>
    </author>

    <date year="2026" month="June"/>

    <area>Security</area>
    <workgroup>SPICE</workgroup>

    <keyword>inference</keyword>
    <keyword>post-quantum</keyword>
    <keyword>ML-DSA</keyword>
    <keyword>signed receipts</keyword>
    <keyword>agentic AI</keyword>
    <keyword>provenance</keyword>
    <keyword>FIPS 204</keyword>

    <abstract>
      <t>
        This document defines AFiR (Attested Fragmented Inference
        Routing) as a production profile of the IETF SPICE Inference
        Chain specification
        <xref target="I-D.draft-mw-spice-inference-chain"/>.
      </t>
      <t>
        The SPICE Inference Chain defines computational provenance via
        two mechanisms: Zero-Knowledge Machine Learning (ZKML) proofs
        and Trusted Execution Environment (TEE) attestation quotes.
        Both require either significant proof generation latency (ZKML)
        or specialized hardware (TEE). Neither is deployable today in
        commodity serverless inference environments without
        infrastructure changes.
      </t>
      <t>
        AFiR defines a third proof type -- post-quantum digital
        signature attestation using ML-DSA-65 (NIST FIPS 204) -- that
        is deployable on any inference platform, requires no specialized
        hardware, adds 0.785ms of overhead per fragment, and produces a
        384-byte receipt anchored on a public blockchain. AFiR receipts
        are structurally compatible with the SPICE Inference Chain
        Merkle tree and can coexist with ZKML and TEE entries in the
        same session chain.
      </t>
      <t>
        AFiR extends the SPICE inference chain with five concrete
        production primitives: Signed Tool Calls (P1), Cross-Agent
        Receipt Trees (P2), KV Cache Signing (P3), Model Manifest
        attestation (P4), and a Crypto-Agile Signature Layer (P5). All
        five are deployed and serving production traffic as of June
        2026, making AFiR the first production implementation of the
        SPICE inference_root claim for multi-agent pipelines.
      </t>
    </abstract>
  </front>

  <middle>

    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>

      <section anchor="gap" numbered="true" toc="default">
        <name>The Deployment Gap in the SPICE Inference Chain</name>
        <t>
          The SPICE Inference Chain
          <xref target="I-D.draft-mw-spice-inference-chain"/> defines
          two proof types for computational provenance:
        </t>
        <ul spacing="normal">
          <li>
            ZKML proofs: mathematically certain, but proof generation
            takes minutes to hours per inference and is currently
            limited to models of approximately 100 million parameters
            or fewer.
          </li>
          <li>
            TEE attestation: production-scale and real-time, but
            requires specific hardware (Intel TDX, AMD SEV-SNP, NVIDIA
            H100 Confidential Computing) and manufacturer PKI
            dependencies. Most serverless inference environments do not
            expose TEE primitives to the application layer.
          </li>
        </ul>
        <t>
          The practical effect is that the SPICE Inference Chain, as
          currently defined, cannot be adopted in commodity cloud
          environments (serverless functions, container-based inference
          runtimes, shared GPU pools) without either accepting ZKML
          latency incompatible with real-time serving, or deploying
          specialized hardware unavailable in most production inference
          clouds. This leaves the majority of production AI inference
          volume outside the scope of any SPICE-conformant inference
          attestation.
        </t>
      </section>

      <section anchor="approach" numbered="true" toc="default">
        <name>AFiR Approach</name>
        <t>
          AFiR addresses this gap by defining a third proof type:
          post-quantum digital signature attestation using ML-DSA-65
          (NIST FIPS 204 <xref target="FIPS204"/>).
        </t>
        <t>
          A post-quantum signature attestation makes the following
          proof statement:
        </t>
        <t>
          "Agent A, at timestamp T, signed a commitment over
          (input_hash, output_hash, model_id, tool_name, session_id)
          using ML-DSA-65 with key K. Key K is registered and publicly
          verifiable. The signature is unforgeable under standard
          lattice hardness assumptions (Module Learning With Errors,
          MLWE). A cryptographic receipt anchored on Base Mainnet via
          USDC provides a tamper-evident timestamp independent of any
          single party's infrastructure."
        </t>
        <t>This proof type does not require:</t>
        <ul spacing="normal">
          <li>Specialized hardware (no TEE, no GPU confidential compute)</li>
          <li>Proof generation delay (signing is 0.785ms per fragment)</li>
          <li>Trust in a hardware manufacturer's PKI</li>
          <li>Any changes to the inference runtime or model serving stack</li>
        </ul>
        <t>
          AFiR is in production as of June 2026, operating on
          serverless infrastructure. All five primitives defined in
          this document are deployed, smoke-tested, and serving live
          traffic.
        </t>
      </section>

      <section anchor="relationship" numbered="true" toc="default">
        <name>Relationship to Existing SPICE Drafts</name>
        <t>
          This document is a companion to, not a replacement of:
        </t>
        <ul spacing="normal">
          <li>
            <xref target="I-D.draft-mw-spice-inference-chain"/>:
            defines the inference chain Merkle structure and ZKML/TEE
            proof types. AFiR adds a third proof type to this
            framework.
          </li>
          <li>
            <xref target="I-D.draft-mw-spice-actor-chain"/>: AFiR's P1
            (Signed Tool Calls) extends the actor chain by adding
            per-tool-invocation receipts at the tool execution layer.
          </li>
          <li>
            <xref target="I-D.draft-mw-spice-intent-chain"/>: AFiR's
            P3 (KV Cache Signing) addresses a gap not covered by the
            intent chain: provenance of cached token prefixes served
            from distributed KV stores.
          </li>
        </ul>
        <t>
          AFiR receipt entries are structurally compatible with the
          SPICE inference chain Merkle tree and <bcp14>MAY</bcp14>
          coexist with ZKML and TEE entries in the same session's
          inference chain.
        </t>
      </section>
    </section>

    <section anchor="terminology" numbered="true" toc="default">
      <name>Terminology</name>
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
        "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",
        "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document
        are to be interpreted as described in BCP 14
        <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
        only when, they appear in all capitals, as shown here.
      </t>
      <dl newline="true" spacing="normal">
        <dt>AFiR Receipt:</dt>
        <dd>
          A signed record produced by the AFiR signing layer before
          an inference output propagates to the next stage. Contains
          input commitment, output commitment, model identity,
          timestamp, nullifier, and a post-quantum digital signature.
        </dd>
        <dt>Nullifier:</dt>
        <dd>
          A unique, non-reusable identifier bound to each AFiR receipt,
          preventing replay of a valid receipt against a different
          output.
        </dd>
        <dt>On-Chain Anchor:</dt>
        <dd>
          A transaction on Base Mainnet containing the Merkle root of
          a session's inference chain, providing a tamper-evident
          timestamp independent of any single operator's
          infrastructure.
        </dd>
        <dt>ML-DSA-65:</dt>
        <dd>
          Module Lattice-based Digital Signature Algorithm, security
          parameter set 65, as defined in NIST FIPS 204
          <xref target="FIPS204"/>. Post-quantum secure under MLWE
          hardness assumptions.
        </dd>
        <dt>Fragment:</dt>
        <dd>
          The smallest unit of inference output for which an AFiR
          receipt is produced. In streaming inference, a fragment is a
          single generation step. In non-streaming inference, a
          fragment is the complete response.
        </dd>
        <dt>KV Cache Prefix:</dt>
        <dd>
          The cached key-value state from prior turns in a multi-turn
          conversation or agentic session, reused by the inference
          engine to avoid recomputing attention over prior tokens.
        </dd>
      </dl>
    </section>

    <section anchor="proof-type" numbered="true" toc="default">
      <name>The AFiR Proof Type</name>

      <section anchor="algorithm" numbered="true" toc="default">
        <name>Algorithm: ML-DSA-65 (NIST FIPS 204)</name>
        <t>
          AFiR uses ML-DSA-65 as its primary signature algorithm.
          ML-DSA-65 is the NIST-standardized post-quantum digital
          signature algorithm (FIPS 204, August 2024), providing:
        </t>
        <ul spacing="normal">
          <li>Security level: NIST Level 3 (approximately 128-bit classical security, quantum-secure under MLWE)</li>
          <li>Signature size: 3309 bytes</li>
          <li>Public key size: 1952 bytes</li>
          <li>Signing time: under 1ms on commodity hardware</li>
          <li>Verification time: under 1ms on commodity hardware</li>
        </ul>
        <t>
          The signed message for each AFiR receipt is the SHA-256 hash
          of the canonical JSON serialization
          <xref target="RFC8785"/> of the receipt payload fields:
          input_hash, output_hash, model_id, model_fingerprint,
          tool_name (if applicable), session_id, iat, nullifier.
        </t>
      </section>

      <section anchor="performance" numbered="true" toc="default">
        <name>Performance Characteristics</name>
        <t>
          AFiR measured performance on commodity serverless
          infrastructure (2026):
        </t>
        <ul spacing="normal">
          <li>Signing overhead per fragment: 0.785ms</li>
          <li>End-to-end median wall latency: 241ms</li>
          <li>On-chain receipt anchoring: approximately 7ms (Base Mainnet via USDC)</li>
          <li>Throughput cost vs. baseline: 98.5% cheaper (tiered routing)</li>
          <li>Speed vs. prior signing approach: 6.1x faster (223ms vs 1,369ms P50 wall-clock)</li>
        </ul>
        <t>
          These measurements are from production traffic and represent
          the overhead of the complete AFiR signing pipeline including
          on-chain anchoring.
        </t>
      </section>

      <section anchor="onchain" numbered="true" toc="default">
        <name>On-Chain Anchoring</name>
        <t>
          AFiR anchors the Merkle root of each session's inference
          chain on Base Mainnet via a USDC transfer carrying the root
          hash as calldata. This provides:
        </t>
        <ul spacing="normal">
          <li>Tamper-evident timestamp from a public, decentralized ledger</li>
          <li>Independence from any single operator's infrastructure</li>
          <li>Permanent, publicly auditable record of the session root</li>
          <li>Approximately 7ms latency from signing to on-chain confirmation</li>
        </ul>
        <t>
          The on-chain anchor does not contain individual receipt
          payloads. Per-entry proof retrieval uses the inference
          registry URI, following the same architecture as defined in
          <xref target="I-D.draft-mw-spice-inference-chain"/>
          Section 5.
        </t>
      </section>
    </section>

    <section anchor="entry-structure" numbered="true" toc="default">
      <name>AFiR Entry Structure</name>

      <section anchor="common-fields" numbered="true" toc="default">
        <name>Common Fields (SPICE-Compatible)</name>
        <t>
          AFiR entries include all REQUIRED common fields from
          <xref target="I-D.draft-mw-spice-inference-chain"/>
          Section 4.1. The entry type value is
          <tt>afir_pq_signature</tt>.
        </t>
      </section>

      <section anchor="afir-fields" numbered="true" toc="default">
        <name>AFiR-Specific Fields</name>
        <dl newline="true" spacing="normal">
          <dt>input_hash:</dt>
          <dd>SHA-256 hash of the inference input (prompt or tool call parameters).</dd>
          <dt>nullifier:</dt>
          <dd>Unique non-reusable identifier for this receipt. Format: hex string, 32 bytes.</dd>
          <dt>algorithm:</dt>
          <dd>
            Signature algorithm used. One of: "ML-DSA-65" (primary,
            post-quantum), "ML-DSA-44" (compact, post-quantum),
            "Ed25519" (classical, transition support), "SLH-DSA"
            (reserved, FIPS 205), "FN-DSA" (reserved, FIPS 206).
          </dd>
          <dt>public_key_hint:</dt>
          <dd>First 16 bytes (hex) of the signing public key, for key disambiguation without transmitting the full key inline.</dd>
          <dt>receipt_chain:</dt>
          <dd>URI of the AFiR inference registry partition for this session.</dd>
          <dt>on_chain_anchor:</dt>
          <dd>Base Mainnet transaction hash containing the session Merkle root. OPTIONAL at entry level; REQUIRED in the token's inference_registry response for completed sessions.</dd>
          <dt>phase:</dt>
          <dd>For P1 (Signed Tool Calls): "before" or "after", indicating whether the receipt was produced before or after tool execution.</dd>
        </dl>
      </section>

      <section anchor="entry-example" numbered="true" toc="default">
        <name>Full Entry Example</name>
        <t>
          The following is an example AFiR inference chain entry for
          a signed tool call (P1, before phase):
        </t>
        <sourcecode type="json"><![CDATA[
{
  "type": "afir_pq_signature",
  "sub": "spiffe://thehiveryiq.com/agent/orchestrator",
  "model_fingerprint": "sha256:a3f9...",
  "model_id": "claude-opus-4-20260401",
  "input_hash": "sha256:b7c2...",
  "output_hash": "sha256:d4e1...",
  "intent_entry_ref": 2,
  "iat": 1749780000,
  "nullifier": "8a3f2c91b0e74d56a1f3c8b2e9d07f4a...",
  "algorithm": "ML-DSA-65",
  "public_key_hint": "79c1383bb1ba226d",
  "phase": "before",
  "receipt_chain":
    "https://api.thehiveryiq.com/afir/receipts/sess-uuid-12345",
  "on_chain_anchor": null,
  "inference_digest": "sha256:f8a3...",
  "inference_sig": "eyJhbGciOiJNTC1EU0EtNjUi..."
}
        ]]></sourcecode>
      </section>
    </section>

    <section anchor="primitives" numbered="true" toc="default">
      <name>Five Signing Primitives</name>
      <t>
        AFiR ships five production primitives, each corresponding to a
        distinct layer of the AI inference stack.
      </t>

      <section anchor="p1" numbered="true" toc="default">
        <name>P1 -- Signed Tool Calls</name>
        <t>
          Endpoints: POST /v1/afir/tool/sign and POST /v1/afir/tool/verify
        </t>
        <t>
          P1 produces a before-and-after receipt for every MCP or
          Agent-to-Agent (A2A) tool invocation. The "before" receipt
          is produced before the tool executes, binding: tool_name,
          tool_version, input_hash, model_id, session_id,
          parent_receipt_nullifier, iat. The "after" receipt is
          produced after the tool returns, binding: output_hash,
          tool_exit_status, latency_ms,
          parent_receipt_nullifier (the nullifier of the "before"
          receipt), iat.
        </t>
        <t>
          The nullifier chain from before to after ensures that a tool
          call receipt cannot be detached from its corresponding
          response receipt, and that replay of a valid before-receipt
          against a different tool response is detectable.
        </t>
        <t>
          P1 directly addresses the unsigned tool invocation
          vulnerability class present in MCP deployments. The AFiR
          signing sidecar intercepts the call before the MCP transport
          layer, requiring no changes to MCP server implementations.
        </t>
      </section>

      <section anchor="p2" numbered="true" toc="default">
        <name>P2 -- Cross-Agent Receipt Trees</name>
        <t>
          Endpoint: POST /v1/afir/tree/build
        </t>
        <t>
          P2 implements the inference chain Merkle tree architecture
          defined in
          <xref target="I-D.draft-mw-spice-inference-chain"/> using
          AFiR receipt entries as leaf nodes. When Agent A calls Agent
          B which calls Agent C, P2 builds a Merkle tree across all
          receipts produced in the session. The root hash is the
          inference_root included in the OAuth token.
        </t>
        <t>
          P2 is the AFiR reference implementation of the
          inference_root claim defined in
          <xref target="I-D.draft-mw-spice-inference-chain"/>
          Section 5.3. It is deployed and serving production traffic
          as of June 2026.
        </t>
      </section>

      <section anchor="p3" numbered="true" toc="default">
        <name>P3 -- KV Cache Signing</name>
        <t>
          Endpoint: POST /v1/afir/cache/sign
        </t>
        <t>
          P3 addresses a provenance gap not covered by the intent
          chain or the existing inference chain draft: the attestation
          of cached token prefixes served from distributed KV stores.
          In production agentic deployments using disaggregated
          prefill architectures, KV cache hit rates exceeding 90% have
          been measured. This means the majority of tokens served to
          the model in high-cache-hit deployments have no provenance
          attestation.
        </t>
        <t>
          P3 signs each KV cache entry at write time and validates the
          signature at read time before cached tokens are injected into
          the model's context. If a cached prefix does not match its
          receipt on retrieval, the request <bcp14>MUST</bcp14> fail
          before the prefix is injected into the model's context.
        </t>
      </section>

      <section anchor="p4" numbered="true" toc="default">
        <name>P4 -- Model Manifest</name>
        <t>
          Endpoints: POST /v1/afir/manifest/publish and GET /v1/afir/manifest/{nullifier}
        </t>
        <t>
          P4 provides TEE-free attestation of which model, which
          weights, and which quantization configuration served a given
          request. A Model Manifest is a signed document binding:
          model_id, model_fingerprint (SHA-256 of model weights plus
          architecture), quantization, serving_runtime, infrastructure,
          iat, and nullifier.
        </t>
        <t>
          The Model Manifest nullifier is included in all subsequent
          AFiR receipt entries produced during a session, creating a
          binding between every inference receipt and the specific
          model configuration that produced it.
        </t>
        <t>
          P4 addresses the Model Masquerading attack class identified
          in <xref target="I-D.draft-mw-spice-inference-chain"/>
          Section 1.1 without requiring TEE hardware. The trust basis
          is the operator's key management rather than hardware
          isolation. P4 is therefore appropriate for environments where
          TEE is unavailable, with this distinction explicitly
          understood.
        </t>
      </section>

      <section anchor="p5" numbered="true" toc="default">
        <name>P5 -- Crypto-Agile Signature Layer</name>
        <t>
          Endpoints: POST /v1/afir/sign and GET /v1/afir/algorithms
        </t>
        <t>
          P5 implements a crypto-agile signing endpoint supporting
          multiple post-quantum and classical signature algorithms
          under a single API surface. The algorithm is specified
          per-request and recorded in the receipt entry, making
          receipts from different algorithm generations
          cross-verifiable via the Merkle structure.
        </t>
        <table align="center">
          <name>P5 Supported Algorithms</name>
          <thead>
            <tr>
              <th>Algorithm</th>
              <th>Status</th>
              <th>Standard</th>
              <th>Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr><td>ML-DSA-65</td><td>Active</td><td>NIST FIPS 204</td><td>Primary, post-quantum</td></tr>
            <tr><td>ML-DSA-44</td><td>Active</td><td>NIST FIPS 204</td><td>Compact, post-quantum</td></tr>
            <tr><td>Ed25519</td><td>Active</td><td>RFC 8032</td><td>Classical, transition support</td></tr>
            <tr><td>SLH-DSA</td><td>Reserved</td><td>NIST FIPS 205</td><td>Planned</td></tr>
            <tr><td>FN-DSA</td><td>Reserved</td><td>NIST FIPS 206</td><td>Planned</td></tr>
          </tbody>
        </table>
        <t>
          Algorithm negotiation follows the same model as TLS cipher
          suite negotiation. When a customer needs to upgrade from
          ML-DSA-65 to a future algorithm, they change a single
          configuration field. Prior receipts remain verifiable under
          their original algorithm.
        </t>
      </section>
    </section>

    <section anchor="merkle-compat" numbered="true" toc="default">
      <name>Merkle Tree Compatibility</name>
      <t>
        AFiR receipt entries are structurally compatible with the
        SPICE inference chain Merkle tree defined in
        <xref target="I-D.draft-mw-spice-inference-chain"/>
        Section 5.2. Leaf nodes are SHA-256 hashes of canonically
        serialized AFiR receipt entries (JSON Canonicalization Scheme
        <xref target="RFC8785"/>). The Merkle tree construction
        algorithm is identical to that defined in
        <xref target="I-D.draft-mw-spice-intent-chain"/>
        Section 5.3.
      </t>
      <t>
        The resulting inference_root is included in the OAuth token
        using the claim structure defined in
        <xref target="I-D.draft-mw-spice-inference-chain"/>
        Section 5.3, with inference_proof_type set to
        <tt>afir_ml_dsa_65</tt> (see <xref target="iana"/>).
      </t>
    </section>

    <section anchor="token" numbered="true" toc="default">
      <name>Token Structure</name>
      <t>
        A token carrying an AFiR inference chain follows the full
        Truth Stack structure defined in
        <xref target="I-D.draft-mw-spice-inference-chain"/>
        Section 6, with inference_proof_type set to an AFiR algorithm
        identifier:
      </t>
      <sourcecode type="json"><![CDATA[
{
  "iss": "https://auth.example.com",
  "sub": "user-alice",
  "aud": "https://api.example.com",
  "jti": "tok-afir-12345",
  "sid": "sess-uuid-12345",
  "iat": 1749780000,
  "exp": 1749783600,

  "actor_chain": [ "..." ],

  "intent_root": "sha256:abc123...",
  "intent_registry": "https://intent-log.example.com/...",

  "inference_root": "sha256:xyz789...",
  "inference_proof_type": "afir_ml_dsa_65",
  "inference_registry":
    "https://api.thehiveryiq.com/afir/receipts/sess-uuid-12345"
}
      ]]></sourcecode>
    </section>

    <section anchor="tiered-verification" numbered="true" toc="default">
      <name>Tiered Verification with AFiR</name>
      <t>
        AFiR extends the tiered verification strategy from
        <xref target="I-D.draft-mw-spice-inference-chain"/>
        Section 7.4:
      </t>
      <table align="center">
        <name>AFiR Tiered Verification</name>
        <thead>
          <tr>
            <th>Risk Level</th>
            <th>Actor Chain</th>
            <th>Intent Chain</th>
            <th>Inference Chain</th>
          </tr>
        </thead>
        <tbody>
          <tr><td>Low</td><td>Sync</td><td>Skip</td><td>Skip</td></tr>
          <tr><td>Medium</td><td>Sync</td><td>Cached proof</td><td>AFiR signature check (&lt;1ms)</td></tr>
          <tr><td>High</td><td>Sync</td><td>Full</td><td>AFiR + on-chain anchor (~7ms)</td></tr>
          <tr><td>Critical</td><td>Sync</td><td>Full</td><td>AFiR + on-chain + ZKML/TEE</td></tr>
        </tbody>
      </table>
    </section>

    <section anchor="coexistence" numbered="true" toc="default">
      <name>Coexistence with ZKML and TEE Entries</name>
      <t>
        AFiR entries and ZKML/TEE entries <bcp14>MAY</bcp14> coexist
        in the same inference chain. The SPICE Inference Chain Merkle
        tree is agnostic to the proof type of individual entries; the
        root hash covers all entries regardless of type. Verifiers
        <bcp14>MUST</bcp14> check the "type" field of each entry and
        apply the verification procedure appropriate to that type.
      </t>
      <t>
        This is useful for deployments that use AFiR for real-time
        signing during inference and generate ZKML proofs
        asynchronously for high-value operations, or that run some
        agents on TEE-equipped hardware and others on commodity
        infrastructure.
      </t>
    </section>

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

      <section anchor="pq-security" numbered="true" toc="default">
        <name>Post-Quantum Security Basis</name>
        <t>
          ML-DSA-65 is secure under the hardness of the Module
          Learning With Errors (MLWE) problem, which is believed to
          be hard for both classical and quantum computers. NIST
          standardized ML-DSA-65 in FIPS 204
          <xref target="FIPS204"/> (August 2024) following an
          eight-year public evaluation process. The security basis of
          AFiR signatures is mathematical (lattice hardness), not
          hardware-rooted. Both trust bases are valid; they are
          appropriate for different deployment contexts and threat
          models.
        </t>
      </section>

      <section anchor="onchain-security" numbered="true" toc="default">
        <name>On-Chain Anchoring and Tamper Evidence</name>
        <t>
          The Base Mainnet on-chain anchor provides tamper evidence
          independent of AFiR operator infrastructure. An adversary
          wishing to forge an AFiR receipt for a past session must
          either forge an ML-DSA-65 signature (computationally
          infeasible under MLWE hardness) or rewrite Base Mainnet
          history (computationally infeasible under proof-of-stake
          consensus). Neither is feasible under standard assumptions.
        </t>
      </section>

      <section anchor="threat-coverage" numbered="true" toc="default">
        <name>Threat Coverage Compared to ZKML and TEE</name>
        <table align="center">
          <name>Threat Coverage by Proof Type</name>
          <thead>
            <tr>
              <th>Threat</th>
              <th>ZKML</th>
              <th>TEE</th>
              <th>AFiR</th>
            </tr>
          </thead>
          <tbody>
            <tr><td>Model substitution</td><td>Yes</td><td>Yes</td><td>P4</td></tr>
            <tr><td>Weight tampering</td><td>Yes</td><td>Yes</td><td>P4</td></tr>
            <tr><td>Environment spoofing</td><td>No</td><td>Yes</td><td>No*</td></tr>
            <tr><td>Replay of stale proofs</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
            <tr><td>Tool call repudiation</td><td>No</td><td>No</td><td>P1</td></tr>
            <tr><td>Cache poisoning</td><td>No</td><td>No</td><td>P3</td></tr>
            <tr><td>Cross-agent chain break</td><td>No</td><td>No</td><td>P2</td></tr>
            <tr><td>Output repudiation</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
          </tbody>
        </table>
        <t>
          * AFiR does not provide hardware-rooted proof that inference
          ran inside an isolated enclave. For deployments requiring
          environment isolation proof, TEE entries
          <bcp14>SHOULD</bcp14> be used for the relevant chain
          segments, potentially coexisting with AFiR entries as
          described in <xref target="coexistence"/>.
        </t>
      </section>

      <section anchor="key-mgmt" numbered="true" toc="default">
        <name>Key Management</name>
        <t>
          AFiR signing keys <bcp14>MUST</bcp14> be generated as
          ML-DSA-65 key pairs per FIPS 204, stored in a key management
          system with access logging, rotated on a configurable
          schedule (90 days RECOMMENDED), and bound to a single
          operator identity per key pair. Public keys
          <bcp14>SHOULD</bcp14> be published in a discoverable
          registry to allow verifiers to retrieve the full public key
          given the public_key_hint in an AFiR receipt entry.
        </t>
      </section>
    </section>

    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
        This document requests registration of the following
        inference_proof_type values for use with the inference_root
        claim defined in
        <xref target="I-D.draft-mw-spice-inference-chain"/>:
      </t>
      <ul spacing="normal">
        <li>
          "afir_ml_dsa_65": AFiR post-quantum signature profile
          (ML-DSA-65, NIST FIPS 204)
        </li>
        <li>
          "afir_ml_dsa_44": AFiR post-quantum signature profile
          (ML-DSA-44, NIST FIPS 204, compact)
        </li>
        <li>
          "afir_ed25519": AFiR classical signature profile
          (Ed25519, transition)
        </li>
      </ul>
      <t>
        No new JWT claims are defined by this document. The existing
        inference_root, inference_proof_type, and inference_registry
        claims defined in
        <xref target="I-D.draft-mw-spice-inference-chain"/> are used
        without modification.
      </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"/>
        </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"/>
        </reference>

        <reference anchor="RFC8785" target="https://www.rfc-editor.org/info/rfc8785">
          <front>
            <title>JSON Canonicalization Scheme (JCS)</title>
            <author initials="A." surname="Rundgren" fullname="A. Rundgren"/>
            <author initials="B." surname="Jordan" fullname="B. Jordan"/>
            <author initials="S." surname="Erdtman" fullname="S. Erdtman"/>
            <date year="2020" month="June"/>
          </front>
          <seriesInfo name="RFC" value="8785"/>
        </reference>

        <reference anchor="FIPS204" target="https://csrc.nist.gov/pubs/fips/204/final">
          <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="NIST FIPS" value="204"/>
        </reference>

        <reference anchor="I-D.draft-mw-spice-inference-chain">
          <front>
            <title>Cryptographically Verifiable Inference Chain for AI Agent Computational Provenance</title>
            <author initials="R." surname="Krishnan" fullname="R. Krishnan"/>
            <author initials="A." surname="Prasad" fullname="A. Prasad"/>
            <author initials="D." surname="Lopez" fullname="D. Lopez"/>
            <author initials="S." surname="Addepalli" fullname="S. Addepalli"/>
            <date year="2026" month="March"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mw-spice-inference-chain-00"/>
        </reference>

        <reference anchor="I-D.draft-mw-spice-actor-chain">
          <front>
            <title>Cryptographically Verifiable Actor Chains for OAuth 2.0 Token Exchange</title>
            <author initials="A." surname="Prasad" fullname="A. Prasad"/>
            <author initials="R." surname="Krishnan" fullname="R. Krishnan"/>
            <author initials="D." surname="Lopez" fullname="D. Lopez"/>
            <author initials="S." surname="Addepalli" fullname="S. Addepalli"/>
            <date year="2026" month="April"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mw-spice-actor-chain-05"/>
        </reference>

        <reference anchor="I-D.draft-mw-spice-intent-chain">
          <front>
            <title>Cryptographically Verifiable Intent Chain for AI Agent Content Provenance</title>
            <author initials="R." surname="Krishnan" fullname="R. Krishnan"/>
            <author initials="A." surname="Prasad" fullname="A. Prasad"/>
            <author initials="D." surname="Lopez" fullname="D. Lopez"/>
            <author initials="S." surname="Addepalli" fullname="S. Addepalli"/>
            <date year="2026" month="March"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mw-spice-intent-chain-00"/>
        </reference>

      </references>

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

        <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"/>
            <date year="2023" month="January"/>
          </front>
          <seriesInfo name="RFC" value="9334"/>
        </reference>

      </references>
    </references>

  </back>
</rfc>
