<?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" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.31 (Ruby 3.2.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-todd-mas-01" category="info" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.32.0 -->
  <front>
    <title abbrev="MAS">Monotonic Attestation Service (MAS)</title>
    <seriesInfo name="Internet-Draft" value="draft-todd-mas-01"/>
    <author initials="N." surname="Todd" fullname="Norman Todd">
      <organization>Infinitum Nihil</organization>
      <address>
        <postal>
          <city>Oxford</city>
          <region>Mississippi</region>
          <country>United States of America</country>
        </postal>
        <email>nt@infinitum-nihil.com</email>
      </address>
    </author>
    <date year="2026"/>
    <area>Security</area>
    <workgroup>Individual Submission</workgroup>
    <keyword>attestation</keyword>
    <keyword>ordering</keyword>
    <keyword>hash chain</keyword>
    <keyword>monotonic</keyword>
    <keyword>integrity</keyword>
    <abstract>
      <?line 43?>

<t>This document defines the Monotonic Attestation Service (MAS), a
protocol for issuing cryptographically attested, monotonically
increasing sequence numbers within named namespaces. Each attestation
includes a hash chain linking it to all prior entries in the
namespace, providing verifiable proof of ordering and completeness.
MAS is designed to complement RFC 3161 Trusted Timestamping: where
RFC 3161 proves when an event occurred, MAS proves in what order and
that the sequence is complete.</t>
    </abstract>
  </front>
  <middle>
    <?line 54?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Many systems require proof that events occurred in a specific order
and that no events have been inserted, removed, or reordered after
the fact. Wall-clock timestamps (including RFC 3161 trusted
timestamps) prove temporal existence but do not guarantee causal
ordering -- two events timestamped milliseconds apart may have
arrived in either order, and a compromised clock can backdate events.</t>
      <t>MAS addresses this gap by providing a monotonic counter with hash
chain attestation per namespace. Each attestation includes:</t>
      <ul spacing="normal">
        <li>
          <t>A sequence number that strictly increases and never repeats</t>
        </li>
        <li>
          <t>A cryptographic hash of the payload being attested</t>
        </li>
        <li>
          <t>A cryptographic hash linking to the previous attestation in the chain</t>
        </li>
        <li>
          <t>A digital signature from the MAS operator</t>
        </li>
      </ul>
      <t>The combination of monotonic sequencing and hash chaining provides
two guarantees that timestamps alone cannot:</t>
      <dl>
        <dt>Total ordering:</dt>
        <dd>
          <t>Event N happened before event N+1. Not "at roughly the same
time" -- before. Unambiguously.</t>
        </dd>
        <dt>Completeness:</dt>
        <dd>
          <t>If the verifier has attestations 1 through N with a valid hash
chain, no attestations have been inserted or removed. The
sequence is intact.</t>
        </dd>
      </dl>
      <section anchor="relationship-to-rfc-3161">
        <name>Relationship to RFC 3161</name>
        <t>MAS is designed to operate alongside RFC 3161 <xref target="RFC3161"/>, not
replace it. A system MAY request both a MAS attestation (for
ordering) and an RFC 3161 timestamp (for wall-clock anchoring) for
the same event. The combination provides four independent guarantees:</t>
        <table>
          <thead>
            <tr>
              <th align="left">Guarantee</th>
              <th align="left">Provider</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">Wall-clock existence</td>
              <td align="left">RFC 3161 TSA</td>
            </tr>
            <tr>
              <td align="left">Causal ordering</td>
              <td align="left">MAS sequence number</td>
            </tr>
            <tr>
              <td align="left">Sequence completeness</td>
              <td align="left">MAS hash chain</td>
            </tr>
            <tr>
              <td align="left">Authority</td>
              <td align="left">MAS Ed25519 signature</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in <xref target="RFC2119"/>.</t>
        <dl>
          <dt>Namespace:</dt>
          <dd>
            <t>A named scope within which sequence numbers are issued. Sequence
numbers are unique and monotonically increasing within a namespace
but independent across namespaces.</t>
          </dd>
          <dt>Attestation:</dt>
          <dd>
            <t>A signed record binding a sequence number to a payload hash within
a namespace, chained to the previous attestation.</t>
          </dd>
          <dt>Chain:</dt>
          <dd>
            <t>The ordered, hash-linked sequence of all attestations within a
namespace.</t>
          </dd>
          <dt>Operator:</dt>
          <dd>
            <t>The entity running the MAS instance and holding the signing key.</t>
          </dd>
          <dt>Requester:</dt>
          <dd>
            <t>The entity requesting an attestation for a payload.</t>
          </dd>
          <dt>Verifier:</dt>
          <dd>
            <t>Any entity validating an attestation or chain of attestations.</t>
          </dd>
        </dl>
      </section>
    </section>
    <section anchor="data-model">
      <name>Data Model</name>
      <section anchor="attestation-record">
        <name>Attestation Record</name>
        <t>An attestation record contains the following fields:</t>
        <table>
          <thead>
            <tr>
              <th align="left">Field</th>
              <th align="left">Type</th>
              <th align="left">Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">version</td>
              <td align="left">unsigned integer</td>
              <td align="left">Protocol version. This document defines version 1.</td>
            </tr>
            <tr>
              <td align="left">namespace</td>
              <td align="left">text string</td>
              <td align="left">The namespace this attestation belongs to. UTF-8 encoded.</td>
            </tr>
            <tr>
              <td align="left">sequence</td>
              <td align="left">unsigned integer (64-bit)</td>
              <td align="left">Monotonically increasing sequence number within the namespace. Starts at 1.</td>
            </tr>
            <tr>
              <td align="left">payload_hash</td>
              <td align="left">byte string</td>
              <td align="left">SHA-256 hash of the payload being attested. The MAS never sees the payload itself.</td>
            </tr>
            <tr>
              <td align="left">previous_hash</td>
              <td align="left">byte string</td>
              <td align="left">SHA-256 hash of the previous attestation record in serialized form. For sequence 1, this is 32 zero bytes.</td>
            </tr>
            <tr>
              <td align="left">timestamp</td>
              <td align="left">unsigned integer (64-bit)</td>
              <td align="left">UNIX timestamp in milliseconds when the attestation was issued. This is the operator's local time and is NOT a trusted timestamp -- use RFC 3161 for trusted wall-clock time.</td>
            </tr>
            <tr>
              <td align="left">signature</td>
              <td align="left">byte string</td>
              <td align="left">Ed25519 signature over the canonical serialization of all preceding fields.</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="canonical-serialization">
        <name>Canonical Serialization</name>
        <t>The canonical serialization of an attestation for hashing and signing
is CBOR <xref target="RFC8949"/> encoded as a definite-length array in field order:</t>
        <artwork><![CDATA[
[
  version,          // unsigned integer
  namespace,        // text string
  sequence,         // unsigned integer
  payload_hash,     // byte string (32 bytes, SHA-256)
  previous_hash,    // byte string (32 bytes, SHA-256)
  timestamp         // unsigned integer
]
]]></artwork>
        <t>The signature is computed over the SHA-256 hash of this serialized
array. The signature itself is NOT included in the array that is
hashed.</t>
      </section>
      <section anchor="chain-genesis">
        <name>Chain Genesis</name>
        <t>The first attestation in a namespace (sequence = 1) MUST use 32 zero
bytes as the previous_hash. This is the chain genesis.</t>
      </section>
      <section anchor="chain-integrity">
        <name>Chain Integrity</name>
        <t>For any attestation with sequence N &gt; 1, the previous_hash field
MUST equal the SHA-256 <xref target="RFC6234"/> hash of the canonical serialization of
the attestation with sequence N-1.</t>
        <t>A verifier can confirm chain integrity by iterating from sequence 1
to N, verifying that each attestation's previous_hash matches the
hash of the prior record.</t>
      </section>
    </section>
    <section anchor="protocol">
      <name>Protocol</name>
      <section anchor="transport">
        <name>Transport</name>
        <t>MAS is transport-agnostic. This document defines bindings for HTTPS
(<xref target="https-binding"/>) and Service Binding RPC (<xref target="service-binding-rpc-binding"/>).
Implementations MAY define additional transport bindings.</t>
      </section>
      <section anchor="https-binding">
        <name>HTTPS Binding</name>
        <section anchor="request-attestation">
          <name>Request Attestation</name>
          <artwork><![CDATA[
POST /attest HTTP/1.1
Content-Type: application/cbor

{
  "namespace": "com.example.orders",
  "payload_hash": <32 bytes, SHA-256 of payload>
}
]]></artwork>
        </section>
        <section anchor="attestation-response">
          <name>Attestation Response</name>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/cbor

{
  "version": 1,
  "namespace": "com.example.orders",
  "sequence": 4713,
  "payload_hash": <32 bytes>,
  "previous_hash": <32 bytes>,
  "timestamp": 1710590400000,
  "signature": <64 bytes, Ed25519>
}
]]></artwork>
        </section>
        <section anchor="verify-single-attestation">
          <name>Verify Single Attestation</name>
          <artwork><![CDATA[
POST /verify HTTP/1.1
Content-Type: application/cbor

{
  "attestation": <attestation record>,
  "operator_public_key": <32 bytes, Ed25519 public key>
}
]]></artwork>
          <t>Response:</t>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/cbor

{
  "valid": true,
  "sequence": 4713,
  "namespace": "com.example.orders"
}
]]></artwork>
        </section>
        <section anchor="verify-chain-segment">
          <name>Verify Chain Segment</name>
          <artwork><![CDATA[
POST /verify-chain HTTP/1.1
Content-Type: application/cbor

{
  "attestations": [<attestation 1>, ... <attestation N>],
  "operator_public_key": <32 bytes>
}
]]></artwork>
          <t>Response (complete chain):</t>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/cbor

{
  "valid": true,
  "namespace": "com.example.orders",
  "start_sequence": 1,
  "end_sequence": 4713,
  "complete": true,
  "gaps": []
}
]]></artwork>
          <t>Response (broken chain):</t>
          <artwork><![CDATA[
{
  "valid": false,
  "namespace": "com.example.orders",
  "start_sequence": 1,
  "end_sequence": 4713,
  "complete": false,
  "gaps": [{"after": 2001, "before": 2003}],
  "first_break": 2002
}
]]></artwork>
        </section>
        <section anchor="retrieve-attestation-by-sequence">
          <name>Retrieve Attestation by Sequence</name>
          <artwork><![CDATA[
GET /attestation/{namespace}/{sequence} HTTP/1.1
]]></artwork>
        </section>
        <section anchor="retrieve-chain-segment">
          <name>Retrieve Chain Segment</name>
          <artwork><![CDATA[
GET /chain/{namespace}?from={start}&to={end} HTTP/1.1
]]></artwork>
        </section>
        <section anchor="retrieve-operator-public-key">
          <name>Retrieve Operator Public Key</name>
          <artwork><![CDATA[
GET /key HTTP/1.1
]]></artwork>
          <t>Response:</t>
          <artwork><![CDATA[
{
  "algorithm": "Ed25519",
  "public_key": <32 bytes>,
  "valid_from": 1710590400000,
  "valid_until": null,
  "previous_keys": [
    {
      "public_key": <32 bytes>,
      "valid_from": 1700000000000,
      "valid_until": 1710590400000
    }
  ]
}
]]></artwork>
        </section>
      </section>
      <section anchor="service-binding-rpc-binding">
        <name>Service Binding RPC Binding</name>
        <t>For environments where the MAS operator runs on the same
infrastructure as the requester (e.g., Cloudflare Service Bindings,
AWS Lambda extensions, sidecar containers), the same request/response
format is used but transported via the platform's native RPC
mechanism instead of HTTPS.</t>
        <t>The serialization format (CBOR) and field semantics are identical.
The transport binding simply replaces the HTTP layer with the
platform's internal call mechanism.</t>
        <t>This is the RECOMMENDED binding when the MAS is co-located with the
requester, as it eliminates TLS overhead and DNS resolution.</t>
      </section>
    </section>
    <section anchor="operational-considerations">
      <name>Operational Considerations</name>
      <section anchor="single-writer-requirement">
        <name>Single-Writer Requirement</name>
        <t>A MAS instance MUST guarantee that sequence numbers within a
namespace are issued by exactly one writer. Concurrent writers on the
same namespace would violate monotonicity.</t>
        <t>Implementations SHOULD use a mechanism that provides single-writer
semantics natively, such as:</t>
        <ul spacing="normal">
          <li>
            <t>A serialized process with exclusive access to the counter</t>
          </li>
          <li>
            <t>A database with serializable isolation on the counter row</t>
          </li>
          <li>
            <t>A distributed coordination primitive with leader election</t>
          </li>
        </ul>
        <t>The specific mechanism is an implementation choice and not specified
by this protocol.</t>
      </section>
      <section anchor="namespace-isolation">
        <name>Namespace Isolation</name>
        <t>Sequence numbers in different namespaces are independent. An operator
MAY host many namespaces. There is no ordering relationship between
attestations in different namespaces.</t>
      </section>
      <section anchor="key-management">
        <name>Key Management</name>
        <t>The operator SHOULD rotate signing keys periodically. When rotating,
the operator MUST:</t>
        <ol spacing="normal" type="1"><li>
            <t>Publish the new public key via the /key endpoint before using it</t>
          </li>
          <li>
            <t>Include the old key in the previous_keys array with its validity period</t>
          </li>
          <li>
            <t>Sign a transition attestation in the old key that references the new key</t>
          </li>
        </ol>
        <t>Verifiers MUST use the key that was valid at the attestation's
timestamp when verifying signatures.</t>
      </section>
      <section anchor="persistence">
        <name>Persistence</name>
        <t>The operator MUST persist all attestations durably. Loss of
attestation records breaks the hash chain for all subsequent records.</t>
        <t>The operator SHOULD provide a retrieval API (<xref target="retrieve-attestation-by-sequence"/>,
<xref target="retrieve-chain-segment"/>) so that verifiers can reconstruct and verify chain
segments.</t>
      </section>
      <section anchor="clock-advisory">
        <name>Clock Advisory</name>
        <t>The timestamp field is advisory only -- it reflects the operator's
local clock and is NOT a trusted timestamp. Systems requiring trusted
wall-clock time SHOULD additionally obtain an RFC 3161 timestamp for
the same payload.</t>
        <t>The timestamp field exists to assist verifiers in correlating
attestations with real-world time ranges. It MUST NOT be used as the
sole basis for temporal claims.</t>
      </section>
    </section>
    <section anchor="verification">
      <name>Verification</name>
      <section anchor="single-attestation-verification">
        <name>Single Attestation Verification</name>
        <t>To verify a single attestation, a verifier MUST:</t>
        <ol spacing="normal" type="1"><li>
            <t>Obtain the operator's public key that was valid at the attestation's timestamp</t>
          </li>
          <li>
            <t>Reconstruct the canonical serialization (<xref target="canonical-serialization"/>) from the attestation fields</t>
          </li>
          <li>
            <t>Compute the SHA-256 hash of the canonical serialization</t>
          </li>
          <li>
            <t>Verify the Ed25519 <xref target="RFC8032"/> signature over this hash using the operator's public key</t>
          </li>
        </ol>
        <t>A valid signature proves the operator issued this attestation with
these exact field values.</t>
      </section>
      <section anchor="chain-verification">
        <name>Chain Verification</name>
        <t>To verify a chain segment from sequence S to sequence E, a verifier
MUST:</t>
        <ol spacing="normal" type="1"><li>
            <t>Verify each individual attestation per <xref target="single-attestation-verification"/></t>
          </li>
          <li>
            <t>For each attestation with sequence N &gt; S, verify that previous_hash equals SHA-256 of the canonical serialization of attestation N-1</t>
          </li>
          <li>
            <t>If S = 1, verify that attestation 1 has previous_hash equal to 32 zero bytes</t>
          </li>
        </ol>
        <t>If all verifications pass, the chain segment is complete and
unmodified.</t>
      </section>
      <section anchor="gap-detection">
        <name>Gap Detection</name>
        <t>If a verifier has attestations with non-contiguous sequence numbers
(e.g., 100, 101, 103), this indicates either:</t>
        <ul spacing="normal">
          <li>
            <t>Attestation 102 was not provided (incomplete disclosure)</t>
          </li>
          <li>
            <t>Attestation 102 never existed (operator error)</t>
          </li>
        </ul>
        <t>The verifier SHOULD report the gap and MUST NOT treat the chain as
complete.</t>
      </section>
      <section anchor="fork-detection">
        <name>Fork Detection</name>
        <t>If a verifier encounters two different attestations with the same
namespace and sequence number but different content, this indicates a
fork -- the operator (or an attacker) issued conflicting
attestations. This is a critical integrity violation.</t>
        <t>A verifier that detects a fork MUST reject both attestations and
SHOULD alert the relying party.</t>
      </section>
    </section>
    <section anchor="interaction-with-rfc-3161">
      <name>Interaction with RFC 3161</name>
      <t>A system that uses both MAS and RFC 3161 <xref target="RFC3161"/> for the same event has
two independent attestations:</t>
      <ol spacing="normal" type="1"><li>
          <t>MAS attestation: proves ordering and chain completeness</t>
        </li>
        <li>
          <t>RFC 3161 timestamp token: proves wall-clock existence</t>
        </li>
      </ol>
      <t>These can be bundled together as a dual attestation:</t>
      <artwork><![CDATA[
{
  "mas_attestation": <MAS attestation record>,
  "rfc3161_token": <RFC 3161 timestamp token (DER-encoded)>,
  "binding_hash": <SHA-256 of (MAS canonical serialization ||
                   RFC 3161 token)>
}
]]></artwork>
      <t>The binding_hash cryptographically links the two attestations,
preventing an attacker from mixing attestations from different
events.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="operator-trust">
        <name>Operator Trust</name>
        <t>MAS requires trust in the operator. A compromised operator can issue
false attestations, skip sequence numbers, or maintain a shadow
chain. This is analogous to the trust model of RFC 3161 TSAs.</t>
        <t>Mitigation: requesters MAY submit the same payload to multiple
independent MAS operators and compare sequence assignments.
Disagreement indicates compromise.</t>
      </section>
      <section anchor="denial-of-service">
        <name>Denial of Service</name>
        <t>An attacker flooding the MAS with requests could exhaust sequence
space or degrade performance. Operators SHOULD implement rate
limiting per requester.</t>
        <t>The 64-bit sequence space supports 2^64 attestations per namespace,
which is sufficient for all practical purposes.</t>
      </section>
      <section anchor="replay">
        <name>Replay</name>
        <t>Attestation responses are deterministic for a given input and state.
An attacker replaying an old attestation request will receive a new
attestation with a new sequence number, not a replay of the old
response. The hash chain prevents inserting the replayed response
into the chain.</t>
      </section>
      <section anchor="namespace-squatting">
        <name>Namespace Squatting</name>
        <t>Namespaces are first-come-first-served within an operator. Operators
SHOULD implement namespace registration and access control to
prevent unauthorized use.</t>
      </section>
      <section anchor="quantum-resistance">
        <name>Quantum Resistance</name>
        <t>Ed25519 is not quantum-resistant. Future versions of this
specification MAY define additional signature algorithms (e.g.,
ML-DSA / CRYSTALS-Dilithium) for post-quantum security. The version
field enables algorithm negotiation.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions at this time. A future version may
request registration of a well-known URI (e.g., /.well-known/mas)
and a media type for MAS attestations.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8949">
          <front>
            <title>Concise Binary Object Representation (CBOR)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <date month="December" year="2020"/>
            <abstract>
              <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
              <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="94"/>
          <seriesInfo name="RFC" value="8949"/>
          <seriesInfo name="DOI" value="10.17487/RFC8949"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC3161">
          <front>
            <title>Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)</title>
            <author fullname="C. Adams" initials="C." surname="Adams"/>
            <author fullname="P. Cain" initials="P." surname="Cain"/>
            <author fullname="D. Pinkas" initials="D." surname="Pinkas"/>
            <author fullname="R. Zuccherato" initials="R." surname="Zuccherato"/>
            <date month="August" year="2001"/>
            <abstract>
              <t>This document describes the format of a request sent to a Time Stamping Authority (TSA) and of the response that is returned. It also establishes several security-relevant requirements for TSA operation, with regards to processing requests to generate responses. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3161"/>
          <seriesInfo name="DOI" value="10.17487/RFC3161"/>
        </reference>
        <reference anchor="RFC6234">
          <front>
            <title>US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="T. Hansen" initials="T." surname="Hansen"/>
            <date month="May" year="2011"/>
            <abstract>
              <t>Federal Information Processing Standard, FIPS</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6234"/>
          <seriesInfo name="DOI" value="10.17487/RFC6234"/>
        </reference>
        <reference anchor="RFC8032">
          <front>
            <title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <author fullname="I. Liusvaara" initials="I." surname="Liusvaara"/>
            <date month="January" year="2017"/>
            <abstract>
              <t>This document describes elliptic curve signature scheme Edwards-curve Digital Signature Algorithm (EdDSA). The algorithm is instantiated with recommended parameters for the edwards25519 and edwards448 curves. An example implementation and test vectors are provided.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8032"/>
          <seriesInfo name="DOI" value="10.17487/RFC8032"/>
        </reference>
        <reference anchor="RFC9162">
          <front>
            <title>Certificate Transparency Version 2.0</title>
            <author fullname="B. Laurie" initials="B." surname="Laurie"/>
            <author fullname="E. Messeri" initials="E." surname="Messeri"/>
            <author fullname="R. Stradling" initials="R." surname="Stradling"/>
            <date month="December" year="2021"/>
            <abstract>
              <t>This document describes version 2.0 of the Certificate Transparency (CT) protocol for publicly logging the existence of Transport Layer Security (TLS) server certificates as they are issued or observed, in a manner that allows anyone to audit certification authority (CA) activity and notice the issuance of suspect certificates as well as to audit the certificate logs themselves. The intent is that eventually clients would refuse to honor certificates that do not appear in a log, effectively forcing CAs to add all issued certificates to the logs.</t>
              <t>This document obsoletes RFC 6962. It also specifies a new TLS extension that is used to send various CT log artifacts.</t>
              <t>Logs are network services that implement the protocol operations for submissions and queries that are defined in this document.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9162"/>
          <seriesInfo name="DOI" value="10.17487/RFC9162"/>
        </reference>
      </references>
    </references>
    <?line 509?>

<section anchor="reference-implementation">
      <name>Reference Implementation</name>
      <t>A reference implementation is available as a Cloudflare Durable
Object with Service Binding RPC transport. The implementation uses:</t>
      <ul spacing="normal">
        <li>
          <t>ed25519-dalek for Ed25519 signatures</t>
        </li>
        <li>
          <t>sha2 for SHA-256 hashing</t>
        </li>
        <li>
          <t>ciborium for CBOR serialization</t>
        </li>
        <li>
          <t>Durable Object SQLite for counter persistence and attestation storage</t>
        </li>
      </ul>
      <t>The reference implementation is approximately 300 lines of Rust.</t>
    </section>
    <section anchor="example-chain">
      <name>Example Chain</name>
      <section anchor="genesis-sequence-1">
        <name>Genesis (sequence 1)</name>
        <artwork><![CDATA[
{
  "version": 1,
  "namespace": "com.example.orders",
  "sequence": 1,
  "payload_hash": "a1b2c3...",
  "previous_hash": "00000000000000000000000000000000
                     00000000000000000000000000000000",
  "timestamp": 1710590400000,
  "signature": "ed25519:..."
}
]]></artwork>
      </section>
      <section anchor="sequence-2">
        <name>Sequence 2</name>
        <artwork><![CDATA[
{
  "version": 1,
  "namespace": "com.example.orders",
  "sequence": 2,
  "payload_hash": "d4e5f6...",
  "previous_hash": "sha256(canonical_serialization(
                     attestation_1))",
  "timestamp": 1710590400050,
  "signature": "ed25519:..."
}
]]></artwork>
      </section>
      <section anchor="verification-1">
        <name>Verification</name>
        <t>A verifier with both records confirms:</t>
        <ol spacing="normal" type="1"><li>
            <t>Attestation 1: previous_hash is 32 zero bytes (genesis). Signature valid.</t>
          </li>
          <li>
            <t>Attestation 2: previous_hash equals SHA-256 of attestation 1's canonical serialization. Signature valid.</t>
          </li>
          <li>
            <t>Sequence is contiguous (1, 2). Chain is complete.</t>
          </li>
        </ol>
      </section>
    </section>
    <section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The concept of hash-chained monotonic attestation draws from
Certificate Transparency <xref target="RFC9162"/>, blockchain consensus mechanisms,
and the Merkle tree structures underlying distributed ledger
technologies. MAS simplifies these into a single-writer model
suitable for centralized trust contexts where distributed consensus
is unnecessary.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA71bbXPbRpL+Pr9iSq66lepIWpRs71p1yZ1WcrKqtSVHlC+3
tZVTDYERiRMIMBhAMiMrv/2e7p4BBiSlOLdb53IciRjM9PTL068cDoeqzurc
HumdD2VR1mWRJfq4rq2rTZ2VhZ7Y6i5LrN79cDzZ21FmOq3sHa0+nuyotEwK
s8DLaWVu6mFdpulwYdxwf6wSU9tZWa2OdFbclMo100XmHHasV0tLH6Z2afFP
UatsWR3pumpcfbC//3b/QJnKmiOcnDRVVq/UfVndzqqyWR7psyLN7rK0Mbme
tDuqFGcd6YP9gzfq1q6wPD1SWg+16e7Bv+OBrbJixr/MjZvrZG4yebYIt+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