<?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-00" 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-00"/>
    <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>norm@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
s8DLaWVu6mFdpulwYdxwf18lprazslod6ay4KZVrpovMOexYr5aWPkzt0uKf
olbZsjrSddW4+mB//+3+gTKVNUc4OWmqrF6p+7K6nVVlszzSZ0Wa3WVpY3I9
aXdUKc460gf7B2/UrV1heXqktB5q092Df8cDW2XFjH+ZGzfXydxk8mwRbs+/
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