<?xml version="1.0" encoding="utf-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-singh-psi-merkle-01" ipr="trust200902" submissionType="IETF" version="3" xml:lang="en">
<front><title abbrev="PSI Merkle">PSI Merkle Commitment Profile (RFC6962-SHA256)</title><seriesInfo name="Internet-Draft" value="draft-singh-psi-merkle-01"/><author fullname="Kawaljeet Singh" initials="K." surname="Singh"><organization>APEX Infrastructure</organization>
<address><postal><city>Melbourne</city><region>Victoria</region><country>Australia</country></postal>
<email>kawaljeet.singh3008@gmail.com</email><uri>https://ai-governance-standard.com</uri></address></author>
<date year="2026" month="October" day="13"/>
<abstract><t>This document specifies the Merkle commitment profile used by Proof of Stateful Integrity (PSI) receipts.  It adopts the Merkle Tree Hash and inclusion proof of RFC 9162 without modification, fixes leaf order, and defines how a receipt declares the profile and how a verifier obtains and checks an inclusion proof.  A valid proof shows only that a leaf was committed under a root; it says nothing about the truth or lawfulness of the sealed content.</t><t>This revision replaces the lexicographic ordering and odd-leaf duplication of revision 00, which were incompatible with RFC 9162, and withdraws all anchoring claims other than OpenTimestamps.</t></abstract></front><middle><section><name>Introduction</name><t>PSI receipts commit each sealed digest as a leaf of a Merkle tree so that a third party can check membership without the full ledger.  The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>SHOULD</bcp14>", and "<bcp14>MAY</bcp14>" in this document are to be interpreted as described in BCP&#160;14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t></section><section><name>Profile Identifier</name><t>A receipt using this profile MUST carry the member <tt>merkle_profile</tt> with the value <tt>RFC6962-SHA256</tt>.  Receipts without this member MUST NOT be verified under this profile; they were produced under an earlier profile and are out of scope.</t></section><section><name>Tree Construction</name><t>Leaves are the 32-byte PSI leaf digests, ordered by ledger sequence, oldest first.  The tree hash is the Merkle Tree Hash of <xref target="RFC9162" section="2.1.1"/> with SHA-256: a leaf hash is SHA-256(0x00 || leaf) and an interior node is SHA-256(0x01 || left || right).  The tree for n leaves splits at the largest power of two less than n; equivalently, an unpaired node is promoted unchanged and is never duplicated.</t><t>A receipt's root is computed over a window of at most 256 leaves ending with the receipt's own leaf.  The window is identified by the receipt's leaf index and tree size, both returned with the proof.</t></section><section><name>Inclusion Proof</name><t>An issuer SHOULD offer a keyless resolver returning, for a receipt identifier, a JSON object with members <tt>leaf</tt>, <tt>leaf_index</tt>, <tt>tree_size</tt>, <tt>audit_path</tt> (array of lowercase hex digests, bottom-up), <tt>root</tt>, and <tt>root_matches_receipt</tt>.  The reference resolver is <tt>https://qhtntebpcribjiwrdtdd.supabase.co/functions/v1/merkle-proof?receipt_id=</tt>.</t><t>A verifier MUST check the proof with the algorithm of <xref target="RFC9162" section="2.1.3.2"/> and MUST compare the result with the root printed in the receipt, not with the resolver's <tt>root</tt> member.  The verifier needs no further contact with the issuer.</t></section><section><name>Test Vector</name><t>Leaves are SHA-256 of the ASCII strings "a", "b", "c".  For leaf index 2 and tree size 3:</t><artwork><![CDATA[
leaf  = 2e7d2c03a9507ae265ecf5b5356885a5
        3393a2029d241394997265a1a25aefc6
path  = [ad5ca6cddc0b27c6a83e332bf2801176
         9236e6c6a1f786ebf7b5267b37a5bd22]
root  = cac3d448d4e20a2ad5eae1f500e63c2a
        7f9217cd14572ba7fd22e26dc1ec2648
]]></artwork></section><section><name>Security Considerations</name><t>Inclusion shows commitment, not creation time; time is bounded only by an external anchor.  A window shorter than the full ledger means two receipts may commit to different roots; each root is checked against its own receipt.  An issuer that controls the ledger can refuse to issue proofs; receipts already held remain verifiable from their own fields.</t></section><section><name>IANA Considerations</name><t>This document has no IANA actions.</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"/><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"/><date year="2017" month="May"/></front><seriesInfo name="BCP" value="14"/><seriesInfo name="RFC" value="8174"/></reference><reference anchor="RFC9162" target="https://www.rfc-editor.org/info/rfc9162"><front><title>Certificate Transparency Version 2.0</title><author initials="B." surname="Laurie"/><author initials="E." surname="Messeri"/><author initials="R." surname="Stradling"/><date year="2021" month="December"/></front><seriesInfo name="RFC" value="9162"/></reference></references><references><name>Informative References</name><reference anchor="PSI" target="https://datatracker.ietf.org/doc/draft-singh-psi/"><front><title>Proof of Stateful Integrity (PSI): Signed, Merkle-Committed Receipts for Digital Records</title><author initials="K." surname="Singh"/><date year="2026" month="October"/></front><seriesInfo name="Internet-Draft" value="draft-singh-psi-02"/></reference></references></references></back></rfc>