<?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.43 (Ruby 3.4.12) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-scitt-receipts-mmr-profile-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.35.0 -->
  <front>
    <title abbrev="COSE Receipts for MMRs">COSE Receipts for MMRs</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-scitt-receipts-mmr-profile-00"/>
    <author fullname="Robin Bryce">
      <organization/>
      <address>
        <email>robinbryce@proton.me</email>
      </address>
    </author>
    <author fullname="Jon Geater">
      <organization/>
      <address>
        <email>jonathan@bowball-tech.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="21"/>
    <area>Security</area>
    <workgroup>SCITT</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 79?>

<t>This document defines a new verifiable data structure type for COSE Receipts <xref target="RFC9942"/> specifically for use with ledgers based on post-order traversal binary Merkle trees and which are designed for high throughput, ease of replication and compatibility with commodity cloud storage.</t>
      <t>Post-order traversal binary Merkle trees, also known as history trees, are more commonly known as Merkle Mountain Ranges.</t>
    </abstract>
  </front>
  <middle>
    <?line 85?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The COSE Receipts document <xref target="RFC9942"/> defines a common framework for defining different types of proofs, such as proof of inclusion, about verifiable data structures (VDS). For instance, inclusion proofs guarantee to a verifier that a given serializable element is recorded at a given state of the VDS, while consistency proofs are used to establish that an inclusion proof is still consistent with the new state of the VDS at a later time.</t>
      <t>In this document, we define a new type of VDS: a post ordered binary merkle tree <xref target="KnuthTBT"/> is, logically, the unique series of perfect binary merkle trees required to commit its leaves. Such structures are also commonly known as Merkle Mountain Ranges <xref target="PeterTodd"/>.</t>
      <t>Example,</t>
      <artwork><![CDATA[
   6
 2   5
0 1 3 4 7
]]></artwork>
      <t>This illustrates <tt>MMR(8)</tt>, which is comprised of two perfect trees rooted at 6 and 7.
7 is the root of a tree comprised of a single element.</t>
      <t>The peaks of the perfect trees form the accumulator.</t>
      <t>The storage of a tree maintained in this way is addressed as a linear array, and additions to the tree are always appends.</t>
      <t>Proving and verifying are defined in terms of the cryptographic asynchronous accumulator described by <xref target="ReyzinYakoubov"/>.
The technical advantages of post-order traversal binary Merkle trees are discussed in <xref target="CrosbyWallach"/> (Section 3.3, "Storing the log on secondary storage") and <xref target="PostOrderTlog"/>.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

<ul spacing="normal">
        <li>
          <t>A complete MMR(n) defines an mmr with n nodes where no equal height sibling trees exist. MMR(n) is complete if and only if <tt>index_height(n)</tt> is 0, that is, the node that would be stored at index n is a leaf.</t>
        </li>
        <li>
          <t><tt>i</tt> shall be the zero-based index of any node, including leaf nodes, in the MMR. Nodes are assigned indices in the order they are appended to the linear array.</t>
        </li>
        <li>
          <t><tt>pos</tt> shall be the one-based position of a node, <tt>pos = i + 1</tt>. The position is included in the hash of each interior node (see hash_pospair64), binding each interior node's value to its location in the tree.</t>
        </li>
        <li>
          <t>g shall be the zero-based height of a node in the tree.</t>
        </li>
        <li>
          <t><tt>H(x)</tt> shall be the digest of any value x using the hash algorithm identified by the <tt>vds</tt> value, for example SHA-256 for MMR_SHA256; see <xref target="description-of-the-verifiable-data-structure">Description of the Verifiable Data Structure</xref>.</t>
        </li>
        <li>
          <t><tt>||</tt> shall mean concatenation of raw byte representations of the referenced values.</t>
        </li>
      </ul>
      <t>In this specification, all numbers are unsigned 64 bit integers.
The maximum height of a single tree is 63 (which will have <tt>g=62</tt> for its peak), so that every quantity the algorithms compute, in particular the sibling offset <tt>2^(g+1)</tt>, fits in 64 bits.
A tree of that height has <tt>2^63 - 1</tt> nodes.</t>
    </section>
    <section anchor="description-of-the-verifiable-data-structure">
      <name>Description of the Verifiable Data Structure</name>
      <t>The linearly addressed, position committing MMR defined in this document is specified for any hash algorithm <tt>H</tt> that:</t>
      <ul spacing="normal">
        <li>
          <t>is deterministic and computable by any verifier from public inputs alone, and produces an output of a fixed size, which is the node value size; and</t>
        </li>
        <li>
          <t>is collision resistant and second preimage resistant at a security strength of at least 128 bits, so that the node value size is at least 32 bytes.</t>
        </li>
      </ul>
      <t>As Section 4.4.1 of <xref target="RFC9942"/> requires, each value in the "COSE Verifiable Data Structure Algorithms" registry that refers to this MMR identifies exactly one such <tt>H</tt>.
This document registers one value:</t>
      <table align="left" anchor="verifiable-data-structure-values">
        <name>Verifiable Data Structure Algorithms</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Value</th>
            <th align="left">Hash algorithm</th>
            <th align="left">COSE algorithm</th>
            <th align="left">Node value size (bytes)</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">MMR_SHA256</td>
            <td align="left">TBD_1</td>
            <td align="left">SHA-256 <xref target="FIPS180-4"/></td>
            <td align="left">-16 <xref target="RFC9054"/></td>
            <td align="left">32</td>
          </tr>
        </tbody>
      </table>
      <t>Other specifications <bcp14>MAY</bcp14> register further values for this MMR.
Such a specification <bcp14>MUST</bcp14> name <tt>H</tt>, by its identifier in the "COSE Algorithms" registry (<xref target="RFC9054"/>) where it has one, and the node value size, <bcp14>MUST</bcp14> state that <tt>H</tt> meets the requirements above, and <bcp14>MUST</bcp14> register the inclusion proof (-1) and consistency proof (-2) entries in the "COSE Verifiable Data Structure Proofs" registry for its value, as Section 8.2.1 of <xref target="RFC9942"/> requires.
It meets the requirements of Section 4.4.1 of <xref target="RFC9942"/> by normative reference to this document: the proof encodings are those of <xref target="inclusion-proofs">Inclusion Proofs</xref> and <xref target="consistency-proof">Consistency Proof</xref>, and the algorithms of this document apply unchanged, with <tt>H</tt> and the node value size substituted.</t>
      <t>The <tt>vds</tt> value in the protected header of a receipt fixes <tt>H</tt> and the node value size.
The hash algorithm of the tree is declared only by the <tt>vds</tt> value.
A verifier <bcp14>MUST</bcp14> reject a receipt whose <tt>vds</tt> value it does not support.</t>
    </section>
    <section anchor="inclusion-proofs">
      <name>Inclusion Proofs</name>
      <t>The CBOR representation of an inclusion proof is</t>
      <sourcecode type="cddl"><![CDATA[
; a node value: the output of H, whose size is fixed by
; the vds value, for example 32 bytes for MMR_SHA256
hash = bstr

inclusion-proof = bstr .cbor inclusion-proof-content

inclusion-proof-content = [

  ; zero-based index of a tree node
  index: uint

  ; path proving the node's inclusion,
  ; empty when the node is a peak
  inclusion-path: [ * hash ]
]
]]></sourcecode>
      <t>Every element of an inclusion-path, a consistency-path or right-peaks is a node value.
The size of a node value is fixed by the <tt>vds</tt> value, see <xref target="verifiable-data-structure-values"/>.
A verifier <bcp14>MUST</bcp14> reject a proof in which any such element is not of that size.</t>
      <t>Note that the inclusion path for the index leads to a single permanent node in the tree.
This node will initially be a peak in the accumulator, as the tree grows it will eventually be "buried" by a new peak.</t>
      <section anchor="inclusionproofpath">
        <name>inclusion_proof_path</name>
        <t><tt>inclusion_proof_path(i, c)</tt> is used to produce the verification paths for inclusion proofs and consistency proofs.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>c</tt> the index of the last node in any tree which contains <tt>i</tt>.</t>
          </li>
          <li>
            <t><tt>i</tt> the index of the mmr node whose verification path is required.</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="indexheight">index_height</xref> which obtains the zero-based height <tt>g</tt> of any node.</t>
          </li>
        </ul>
        <t>And the constraints:</t>
        <ul spacing="normal">
          <li>
            <t><tt>i &lt;= c</tt></t>
          </li>
        </ul>
        <t>We define <tt>inclusion_proof_path</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def inclusion_proof_path(i, c):

    path = []

    g = index_height(i)

    while True:

      # The sibling of i is at i +/- 2^(g+1)
      siblingoffset = (2 << g)

      # If the index after i is higher, it is the left parent,
      # and i is the right sibling
      if index_height(i+1) > g:

        # The witness to the right sibling is offset behind i
        isibling = i - siblingoffset + 1

        # The parent of a right sibling is stored immediately
        # after
        i += 1
      else:

        # The witness to a left sibling is offset ahead of i
        isibling = i + siblingoffset - 1

        # The parent of a left sibling is stored immediately after
        # its right sibling
        i += siblingoffset

      # When the computed sibling exceeds the range of MMR(C+1),
      # we have completed the path
      if isibling > c:
          return path

      path.append(isibling)

      # Set g to the height of the next item in the path.
      g += 1
]]></sourcecode>
      </section>
    </section>
    <section anchor="cose-receipt-of-inclusion">
      <name>COSE Receipt of Inclusion</name>
      <t>The cbor representation of an inclusion proof is:</t>
      <sourcecode type="cddl"><![CDATA[
protected-header-map = {
  &(alg: 1) => int
  &(vds: 395) => int ; e.g. MMR_SHA256 (TBD_1)
  * cose-label => cose-value
}
]]></sourcecode>
      <ul spacing="normal">
        <li>
          <t>alg (label: 1): <bcp14>REQUIRED</bcp14>. Signature algorithm identifier. Value type: int.</t>
        </li>
        <li>
          <t>vds (label: 395): <bcp14>REQUIRED</bcp14>. verifiable data structure algorithm identifier, a value identifying the MMR defined in this document, such as MMR_SHA256, see <xref target="description-of-the-verifiable-data-structure"/>. It fixes the hash algorithm <tt>H</tt>. Value type: int.</t>
        </li>
      </ul>
      <t>The protected header <bcp14>MUST</bcp14> meet the encoding requirements given in <xref target="cose-receipt-of-consistency">COSE Receipt of Consistency</xref>, and a verifier <bcp14>MUST</bcp14> apply the same acceptance rules to it.</t>
      <t>The unprotected header for an inclusion proof signature is:</t>
      <sourcecode type="cddl"><![CDATA[
inclusion-proofs = [ + inclusion-proof ]

verifiable-proofs = {
  &(inclusion-proof: -1) => inclusion-proofs
}

unprotected-header-map = {
  &(vdp: 396) => verifiable-proofs
  * cose-label => cose-value
}
]]></sourcecode>
      <t>The payload of an inclusion proof signature is the tree peak committing to the nodes inclusion, or the node itself where the proof path is empty.
The algorithm <xref target="includedroot">included_root</xref> obtains this value.</t>
      <t>The payload <bcp14>MUST</bcp14> be detached.
Detaching the payload forces verifiers to recompute the root from the inclusion proof,
this protects against implementation errors where the signature is verified but the payload merkle root does not match the inclusion proof.</t>
      <section anchor="verifying-the-receipt-of-inclusion">
        <name>Verifying the Receipt of inclusion</name>
        <t>A receipt of inclusion proves that a value is a node of the tree.
When the inclusion-path is not empty, the path also binds the index because each step hashes the position of the parent; when it is empty, see <xref target="tree-size-of-a-receipt-of-inclusion">Tree size of a receipt of inclusion</xref>.</t>
        <t>Whether a node is a leaf, and what its entry commits to, are properties of the leaf commitment scheme, which this profile leaves to the application; see <xref target="leaf-commitment-scheme">Leaf commitment scheme</xref>.</t>
        <t>Perform the following, in order.
Verification fails if any step fails.</t>
        <ol spacing="normal" type="1"><li>
            <t>Decode the protected header. It <bcp14>MUST</bcp14> be deterministically encoded as required in <xref target="cose-receipt-of-consistency">COSE Receipt of Consistency</xref>; the <tt>vds</tt> value <bcp14>MUST</bcp14> be one the verifier supports, see <xref target="description-of-the-verifiable-data-structure">Description of the Verifiable Data Structure</xref>. Labels the verifier does not recognise are skipped.</t>
          </li>
          <li>
            <t>Apply <xref target="includedroot">included_root</xref> to the index, the value and the inclusion-path. The result is the peak the path implies.</t>
          </li>
          <li>
            <t>Set the COSE Sign1 payload to the bytes of that peak and verify the signature of the COSE Sign1.</t>
          </li>
        </ol>
        <t>It is recommended that implementations return a single boolean result for Receipt verification operations, to reduce the chance of accepting a valid signature over an invalid inclusion proof.</t>
        <t>A verifier that holds a trusted tree size and accumulator can additionally check that the proven node is the accumulator peak for the index at that size, which fixes the length of the inclusion path and binds the index when the path is empty.
When it does so, the protected <tt>vds</tt> value <bcp14>MUST</bcp14> equal the <tt>vds</tt> value of the trusted accumulator.</t>
      </section>
      <section anchor="includedroot">
        <name>included_root</name>
        <t>The algorithm <tt>included_root</tt> calculates the accumulator peak for the provided proof and node value.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>i</tt> is the index the <tt>nodeHash</tt> is to be shown at</t>
          </li>
          <li>
            <t><tt>nodehash</tt> the value whose inclusion is to be shown</t>
          </li>
          <li>
            <t><tt>proof</tt> is the path of sibling values committing i.</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="indexheight">index_height</xref> which obtains the zero-based height <tt>g</tt> of any node.</t>
          </li>
          <li>
            <t><xref target="hashpospair64">hash_pospair64</xref> which applies <tt>H</tt> to the new node position and its children.</t>
          </li>
        </ul>
        <t>We define <tt>included_root</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def included_root(i, nodehash, proof):

    root = nodehash

    g = index_height(i)

    for sibling in proof:

      # If the index after i is higher, it is the left parent,
      # and i is the right sibling

      if index_height(i + 1) > g:

        # The parent of a right sibling is stored immediately after

        i = i + 1

        # Set `root` to `H(i+1 || sibling || root)`
        root = hash_pospair64(i + 1, sibling, root)
      else:

        # The parent of a left sibling is stored immediately after
        # its right sibling.

        i = i + (2 << g)

        # Set `root` to `H(i+1 || root || sibling)`
        root = hash_pospair64(i + 1, root, sibling)

      # Set g to the height of the next item in the path.
      g = g + 1

    # If the path length was zero, the original nodehash is returned
    return root
]]></sourcecode>
      </section>
    </section>
    <section anchor="consistency-proof">
      <name>Consistency Proof</name>
      <t>A consistency proof shows that the accumulator, defined in <xref target="ReyzinYakoubov"/>,
for tree-size-1 is a prefix of the accumulator for tree-size-2.</t>
      <t>The signature is over the complete accumulator for tree-size-2 obtained using the proof and the, supplied, possibly empty, list of <tt>right-peaks</tt> which complete the accumulator for tree-size-2.
The detached payload is the node values of that accumulator concatenated in descending height order.</t>
      <t>The receipt of consistency is defined so that a chain of cumulative consistency proofs can be verified together.</t>
      <t>The cbor representation of a consistency proof is:</t>
      <sourcecode type="cddl"><![CDATA[
consistency-path = [ * hash ]

consistency-proof = bstr .cbor consistency-proof-content

consistency-proof-content = [

  ; previous tree size
  tree-size-1: uint

  ; latest tree size
  tree-size-2: uint

  ; the inclusion path from each accumulator peak in
  ; tree-size-1 to its new peak in tree-size-2.
  ; empty when tree-size-1 is 0: the empty tree has no peaks
  consistency-paths: [ * consistency-path ]

  ; the additional peaks that
  ; complete the accumulator for tree-size-2,
  ; when appended to those produced by the consistency paths
  right-peaks: [ * hash ]
]
]]></sourcecode>
      <section anchor="consistencyproofpaths">
        <name>consistency_proof_paths</name>
        <t>Produces the verification paths for inclusion of the peaks of tree-size-1 under the peaks of tree-size-2.</t>
        <t>right-peaks are the node values of the peaks of tree-size-2 that no consistency path leads to, in descending height order.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>ifrom</tt> is the last index of tree-size-1</t>
          </li>
          <li>
            <t><tt>ito</tt> is the last index of tree-size-2</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="inclusionproofpath">inclusion_proof_path</xref></t>
          </li>
          <li>
            <t><xref target="peaks"/></t>
          </li>
        </ul>
        <t>And the constraints:</t>
        <ul spacing="normal">
          <li>
            <t><tt>ifrom &lt;= ito</tt></t>
          </li>
        </ul>
        <t>We define <tt>consistency_proof_paths</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def consistency_proof_paths(ifrom, ito):

    proof = []

    for i in peaks(ifrom):
      proof.append(inclusion_proof_path(i, ito))

    return proof
]]></sourcecode>
      </section>
    </section>
    <section anchor="cose-receipt-of-consistency">
      <name>COSE Receipt of Consistency</name>
      <t>The cbor representation of the protected header of a receipt of consistency is:</t>
      <sourcecode type="cddl"><![CDATA[
protected-header-map = {
  &(alg: 1) => int
  &(vds: 395) => int ; e.g. MMR_SHA256 (TBD_1)
  &(tree-size-2: -65933) => uint ; TBD_2, private use until assigned
  * cose-label => cose-value
}
]]></sourcecode>
      <ul spacing="normal">
        <li>
          <t>alg (label: 1): <bcp14>REQUIRED</bcp14>. Signature algorithm identifier. Value type: int.</t>
        </li>
        <li>
          <t>vds (label: 395): <bcp14>REQUIRED</bcp14>. verifiable data structure algorithm identifier, a value identifying the MMR defined in this document, such as MMR_SHA256, see <xref target="description-of-the-verifiable-data-structure"/>. It fixes the hash algorithm <tt>H</tt>. Value type: int.</t>
        </li>
        <li>
          <t>tree-size-2 (label: TBD_2): <bcp14>REQUIRED</bcp14>. The tree size to which consistency is proven; the accumulator of this tree size is the detached payload. <bcp14>MUST</bcp14> equal tree-size-2 of the last consistency-proof in the unprotected header. Value type: uint (CBOR major type 0).</t>
        </li>
      </ul>
      <t>tree-size-1 is not carried in the protected header: the verifier holds the tree size and accumulator it verifies consistency from, as described in <xref target="verifying-the-receipt-of-consistency">Verifying the Receipt of consistency</xref>.
A receipt of consistency under this profile that omits the protected tree-size-2 <bcp14>MUST</bcp14> be rejected.</t>
      <t>The protected header <bcp14>MUST</bcp14> be encoded as deterministic CBOR (<xref target="RFC8949"/>, Section 4.2.1): definite lengths only, arguments in shortest form, and keys sorted in the bytewise lexicographic order of their encodings.
The protected header map <bcp14>MUST</bcp14> occupy the whole of the protected header byte string.
A verifier <bcp14>MUST</bcp14> reject a receipt whose protected header is not so encoded, contains duplicate labels, or contains bytes beyond the protected header map.
A verifier <bcp14>MUST</bcp14> ignore protected header labels it does not recognise, whatever the type of their values, unless the label is listed in the crit header parameter (<xref target="RFC9052"/>, Section 3.1).
tree-size-2 need not be listed in crit; a receipt that omits it is rejected regardless.
These requirements give the protected header a single encoding, so that a verifier can meet the duplicate-label prohibition of <xref target="RFC9052"/>, Section 9, by checking that labels strictly increase, without a general CBOR decoder.</t>
      <t>The unprotected header for a consistency proof signature is:</t>
      <sourcecode type="cddl"><![CDATA[
consistency-proofs = [ + consistency-proof ]

verifiable-proofs = {
  &(consistency-proof: -2) => consistency-proofs
}

unprotected-header-map = {
  &(vdp: 396) => verifiable-proofs
  * cose-label => cose-value
}
]]></sourcecode>
      <t>The payload <bcp14>MUST</bcp14> be detached.
Detaching the payload forces verifiers to recompute the roots from the consistency proofs.
This protects against implementation errors where the signature is verified but the payload is not genuinely produced by the included proof.</t>
      <section anchor="verifying-the-receipt-of-consistency">
        <name>Verifying the Receipt of consistency</name>
        <t>Verification accommodates verifying the result of a cumulative series of consistency proofs.</t>
        <t>The verifier <bcp14>MUST</bcp14> hold, from a source it already trusts, the <tt>vds</tt> value, the tree size and the accumulator of the state it is verifying consistency from; these are referred to below as the trusted <tt>vds</tt> value, the trusted tree size and the trusted accumulator.
The empty tree, with tree size 0 and an empty accumulator, is a valid trusted state; see <xref target="the-empty-tree-as-trusted-state">The empty tree as trusted state</xref> for what verification from it establishes.
A verifier that verifies from the empty tree takes the trusted <tt>vds</tt> value from the protected header of that receipt; it is thereafter part of the trusted state.</t>
        <t>Trusted state advances only forwards.
Step 3 below rejects a receipt whose first consistency-proof starts from any size other than the trusted size, including a receipt that starts from the empty tree once a later state is held.
A verifier <bcp14>MAY</bcp14> nevertheless choose to accept such a receipt, for example after a ledger has re-issued receipts under new credentials following a key compromise (<xref target="RFC9943"/>, Section 9.4.2), but it <bcp14>MUST</bcp14> do so as a new verification from a trusted state at the size the receipt declares, discarding the state it previously held, and <bcp14>MUST NOT</bcp14> treat the receipt as a continuation of that state.</t>
        <t>Perform the following, in order.
Verification fails if any step fails.</t>
        <ol spacing="normal" type="1"><li>
            <t>Decode the protected header. It <bcp14>MUST</bcp14> be deterministically encoded as required in <xref target="cose-receipt-of-consistency">COSE Receipt of Consistency</xref>; tree-size-2 <bcp14>MUST</bcp14> be present and <bcp14>MUST</bcp14> be an unsigned integer. Labels the verifier does not recognise are skipped.</t>
          </li>
          <li>
            <t>The protected <tt>vds</tt> value <bcp14>MUST</bcp14> equal the trusted <tt>vds</tt> value.</t>
          </li>
          <li>
            <t>The protected tree-size-2 <bcp14>MUST</bcp14> equal tree-size-2 of the last consistency-proof.</t>
          </li>
          <li>
            <t>tree-size-1 of the first consistency-proof <bcp14>MUST</bcp14> equal the trusted tree size.</t>
          </li>
          <li>
            <t>Initialize sizefrom to the trusted tree size and accumulatorfrom to the trusted accumulator.</t>
          </li>
          <li>
            <t>For each consistency-proof, in order:
            </t>
            <ol spacing="normal" type="1"><li>
                <t>tree-size-1 of the proof <bcp14>MUST</bcp14> equal sizefrom.</t>
              </li>
              <li>
                <t>Apply <xref target="consistentroots">consistent_roots</xref> to sizefrom, tree-size-2 of the proof, accumulatorfrom and the consistency-paths of the proof, obtaining roots and nright.</t>
              </li>
              <li>
                <t>The length of right-peaks <bcp14>MUST</bcp14> equal nright.</t>
              </li>
              <li>
                <t>Set accumulatorfrom to roots followed by right-peaks, and sizefrom to tree-size-2 of the proof.</t>
              </li>
            </ol>
          </li>
          <li>
            <t>Use the final accumulatorfrom as the detached payload and verify the signature of the COSE Sign1.</t>
          </li>
        </ol>
        <t><tt>consistent_roots</tt> requires the proof to have exactly the shape the two sizes imply: tree-size-2 <bcp14>MUST</bcp14> be a complete MMR size; each consistency path <bcp14>MUST</bcp14> have exactly the length that <xref target="inclusionproofpath">inclusion_proof_path</xref> produces for its peak; and every path leading to the same peak of tree-size-2 <bcp14>MUST</bcp14> produce the same value.
The number of roots it returns and the number of right-peaks it requires are fixed by the two sizes.</t>
        <t>It is recommended that implementations return a single boolean result for Receipt verification operations, to reduce the chance of accepting a valid signature over an invalid consistency proof.</t>
        <section anchor="consistentroots">
          <name>consistent_roots</name>
          <t><tt>consistent_roots</tt> returns the peaks of the accumulator for tree-size-2 that the proof proves from the accumulator for tree-size-1, in descending height order, together with the number of right-peaks the prover must supply to complete that accumulator.
It requires the proof to have exactly the shape the two tree sizes imply.</t>
          <t>For a complete MMR the set bits of <xref target="leafcount">leaf_count</xref><tt>(size - 1)</tt> are the heights of the accumulator peaks, from the highest bit to the lowest, which is accumulator order.
Let <tt>split</tt> be the highest bit on which the leaf counts of the two sizes differ.
Because tree-size-2 is greater than tree-size-1, the target has that bit set and the origin does not.
An origin peak above <tt>split</tt> is also a peak of the target: its path is empty and its value is returned unchanged.
Every origin peak below <tt>split</tt> is committed by the target peak of height <tt>split</tt>: its path has length <tt>split - h</tt>, and every such path <bcp14>MUST</bcp14> produce the same value.
The remaining peaks of the target are below every origin peak, so no path reaches them; the prover supplies them as right-peaks and their number is returned.</t>
          <t>Given:</t>
          <ul spacing="normal">
            <li>
              <t><tt>sizefrom</tt> the trusted tree size, tree-size-1.</t>
            </li>
            <li>
              <t><tt>sizeto</tt> the tree size consistency is proven to, tree-size-2.</t>
            </li>
            <li>
              <t><tt>accumulatorfrom</tt> the node values of the accumulator for <tt>sizefrom</tt>.</t>
            </li>
            <li>
              <t><tt>proofs</tt> the consistency-paths, one for each entry in <tt>accumulatorfrom</tt>.</t>
            </li>
          </ul>
          <t>And the methods:</t>
          <ul spacing="normal">
            <li>
              <t><xref target="includedroot">included_root</xref></t>
            </li>
            <li>
              <t><xref target="leafcount">leaf_count</xref></t>
            </li>
            <li>
              <t><xref target="mmrsizeforleafcount">mmr_size_for_leaf_count</xref></t>
            </li>
            <li>
              <t><xref target="bitlength">bit_length</xref></t>
            </li>
            <li>
              <t><xref target="onescount">ones_count</xref></t>
            </li>
          </ul>
          <t>And the constraints:</t>
          <ul spacing="normal">
            <li>
              <t><tt>sizefrom &lt; sizeto</tt></t>
            </li>
            <li>
              <t><tt>sizeto</tt> is a complete MMR size.</t>
            </li>
            <li>
              <t><tt>sizefrom</tt> is a complete MMR size, or 0. This is not checked: every trusted size was itself a checked tree-size-2.</t>
            </li>
          </ul>
          <t>We define <tt>consistent_roots</tt> as</t>
          <sourcecode type="python"><![CDATA[
  def consistent_roots(
      sizefrom, sizeto, accumulatorfrom, proofs):

    # if sizeto <= sizefrom -> ERROR

    leavesto = leaf_count(sizeto - 1)
    # if mmr_size_for_leaf_count(leavesto) != sizeto -> ERROR

    if sizefrom > 0:
      leavesfrom = leaf_count(sizefrom - 1)
    else:
      leavesfrom = 0

    n = ones_count(leavesfrom)
    # if length(accumulatorfrom) != n -> ERROR
    # if length(proofs) != n -> ERROR

    nto = ones_count(leavesto)
    if n == 0:
      return [], nto

    # The highest bit on which the leaf counts differ.
    split = bit_length(leavesfrom ^ leavesto) - 1

    roots = []

    # The number of nodes preceding the sub tree of the
    # current origin peak. A peak of height h is at
    # offset + 2^(h+1) - 2, and its sub tree has 2^(h+1) - 1 nodes.
    offset = 0
    i = 0

    # Origin peaks above the split are peaks of the target.
    # The path is not read; requiring it to be empty
    # rejects unused material.
    for h in range(bit_length(leavesfrom) - 1, split, -1):
      if not (leavesfrom >> h) & 1:
        continue
      # if length(proofs[i]) != 0 -> ERROR
      roots.append(accumulatorfrom[i])
      offset += (1 << (h + 1)) - 1
      i += 1

    # Origin peaks below the split are all committed by the
    # target peak of height split, so each path has length
    # split - h and every path must produce the same value.
    above = len(roots)
    root = None
    for h in range(split - 1, -1, -1):
      if not (leavesfrom >> h) & 1:
        continue
      # if length(proofs[i]) != split - h -> ERROR
      subtree = (1 << (h + 1)) - 1
      proven = included_root(
          offset + subtree - 1, accumulatorfrom[i], proofs[i])
      if i == above:
        root = proven
      # elif proven != root -> ERROR
      offset += subtree
      i += 1

    if n > above:
      roots.append(root)

    return roots, nto - len(roots)
]]></sourcecode>
        </section>
      </section>
    </section>
    <section anchor="appending-a-leaf">
      <name>Appending a leaf</name>
      <t>An algorithm for appending to a tree maintained in post order layout is provided.</t>
      <section anchor="addleafhash">
        <name>add_leaf_hash</name>
        <t>When a new node is appended, if its height matches the height of its immediate predecessor, then the two equal height siblings <bcp14>MUST</bcp14> be merged.
Merging is defined as the append of a new node which takes the adjacent peaks as its left and right children.
This process <bcp14>MUST</bcp14> proceed until there are no more completable sub trees.</t>
        <t><tt>add_leaf_hash(f)</tt> adds the leaf hash value f to the tree.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>f</tt> the leaf value resulting from <tt>H(x)</tt> for the caller defined leaf value <tt>x</tt></t>
          </li>
          <li>
            <t><tt>db</tt> an interface supporting <tt>append(entry) -&gt; count</tt> and <tt>get(index) -&gt; entry</tt> methods.
<tt>append</tt> stores the entry and returns the number of nodes in the store after the append, which is the index at which the next node will be stored.</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="indexheight">index_height</xref></t>
          </li>
          <li>
            <t><xref target="hashpospair64"/></t>
          </li>
        </ul>
        <t>We define <tt>add_leaf_hash</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def add_leaf_hash(db, f: bytes):

    # Set g to 0, the height of the leaf item f
    g = 0

    # Set i to the index the next node will occupy, which is the
    # number of nodes after appending f
    i = db.append(f)

    # While the node that would be stored at i is a parent, which
    # is exactly when MMR(i) is not complete (#looptarget)
    while index_height(i) > g:

      # Set ileft to the index of the left child of i,
      # which is i - 2^(g+1)

      ileft = i - (2 << g)

      # Set iright to the index of the right child of i,
      # which is i - 1

      iright = i - 1

      # Set v to H(i + 1 || Get(ileft) || Get(iright))
      # Set i to the result of invoking Append(v)

      i = db.append(
        hash_pospair64(i+1, db.get(ileft), db.get(iright)))

      # Set g to the height of the node just appended, which is g + 1
      g += 1

    # i is the number of nodes, the MMR size after the append
    return i
]]></sourcecode>
        <t><tt>add_leaf_hash</tt> returns the MMR size after the append, which is a complete MMR size.
The index of the leaf itself is one less than the value of <tt>i</tt> immediately after the first append.</t>
      </section>
      <section anchor="node-values">
        <name>Node values</name>
        <t>Interior nodes in the tree <bcp14>MUST</bcp14> prefix the value provided to <tt>H(x)</tt> with <tt>pos</tt>.</t>
        <t>The value <tt>v</tt> for any interior node <bcp14>MUST</bcp14> be <tt>H(pos || Get(LEFT_CHILD) || Get(RIGHT_CHILD))</tt></t>
        <t>The algorithm for leaf addition is provided the result of <tt>H(x)</tt> directly.</t>
        <section anchor="hashpospair64">
          <name>hash_pospair64</name>
          <t>Returns <tt>H(pos || a || b)</tt></t>
          <t>Given:</t>
          <ul spacing="normal">
            <li>
              <t><tt>pos</tt> the one-based position of the node being computed</t>
            </li>
            <li>
              <t><tt>a</tt> the first value to include in the hash after <tt>pos</tt></t>
            </li>
            <li>
              <t><tt>b</tt> the second value to include in the hash after <tt>pos</tt></t>
            </li>
          </ul>
          <t>And the constraints:</t>
          <ul spacing="normal">
            <li>
              <t><tt>pos &lt; 2^64</tt></t>
            </li>
            <li>
              <t><tt>a</tt> and <tt>b</tt> <bcp14>MUST</bcp14> be node values produced by <tt>H</tt>.</t>
            </li>
          </ul>
          <t>We define <tt>hash_pospair64</tt> as</t>
          <sourcecode type="python"><![CDATA[
  def hash_pospair64(pos, a, b):

    # H is the hash algorithm identified by the vds value,
    # SHA-256 (MMR_SHA256) in this example
    h = hashlib.sha256()

    # Take the big endian representation of pos
    h.update(pos.to_bytes(8, byteorder="big", signed=False))
    h.update(a)
    h.update(b)
    return h.digest()
]]></sourcecode>
        </section>
      </section>
    </section>
    <section anchor="essential-supporting-algorithms">
      <name>Essential supporting algorithms</name>
      <section anchor="indexheight">
        <name>index_height</name>
        <t><tt>index_height(i)</tt> returns the zero-based height <tt>g</tt> of the node index <tt>i</tt></t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>i</tt> the index of any mmr node.</t>
          </li>
        </ul>
        <t>We define <tt>index_height</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def index_height(i) -> int:
    pos = i + 1
    while not all_ones(pos):
      pos = pos - most_sig_bit(pos) + 1

    return bit_length(pos) - 1
]]></sourcecode>
      </section>
      <section anchor="peaks">
        <name>peaks</name>
        <t><tt>peaks(i)</tt> returns the peak indices for <tt>MMR(i+1)</tt>, which is also its accumulator.</t>
        <t>Requires MMR(i+1) to be complete.
MMR(i+1) is complete if and only if <tt>index_height(i+1)</tt> is 0, that is, the next node to be appended would be a leaf; see <xref target="conventions-and-definitions">Conventions and Definitions</xref>.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>i</tt> the index of any mmr node.</t>
          </li>
        </ul>
        <t>We define <tt>peaks</tt></t>
        <sourcecode type="python"><![CDATA[
  def peaks(i):
    peak = 0
    peaks = []
    s = i+1
    while s != 0:
      # find the highest peak size in the current MMR(s)
      highest_size = (1 << log2floor(s+1)) - 1
      peak = peak + highest_size
      peaks.append(peak-1)
      s -= highest_size

    return peaks
]]></sourcecode>
      </section>
      <section anchor="leafcount">
        <name>leaf_count</name>
        <t><tt>leaf_count(i)</tt> returns the number of leaves in <tt>MMR(i+1)</tt>.</t>
        <t>The bits of the count also form a mask with a single bit set for each peak in the accumulator, where the bit position is the height of the peak.
Read from the highest bit to the lowest, the set bits give the accumulator peaks in order.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>i</tt> the index of any mmr node.</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="bitlength">bit_length</xref></t>
          </li>
        </ul>
        <t>We define <tt>leaf_count</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def leaf_count(i):
    s = i + 1

    peaksize = (1 << bit_length(s)) - 1
    peakmap = 0
    while peaksize > 0:
      peakmap <<= 1
      if s >= peaksize:
        s -= peaksize
        peakmap |= 1
      peaksize >>= 1

    return peakmap
]]></sourcecode>
      </section>
      <section anchor="mmrsizeforleafcount">
        <name>mmr_size_for_leaf_count</name>
        <t><tt>mmr_size_for_leaf_count(leaves)</tt> returns the number of nodes in the complete MMR with <tt>leaves</tt> leaves.</t>
        <t>Every leaf adds itself and one interior node for each binary carry, and each peak is a carry that has not happened.
Because <tt>leaf_count</tt> rounds an incomplete size down to the largest complete MMR below it, <tt>mmr_size_for_leaf_count(leaf_count(size - 1)) == size</tt> holds exactly when <tt>size</tt> is a complete MMR size.</t>
        <t>Given:</t>
        <ul spacing="normal">
          <li>
            <t><tt>leaves</tt> a leaf count.</t>
          </li>
        </ul>
        <t>And the methods:</t>
        <ul spacing="normal">
          <li>
            <t><xref target="onescount">ones_count</xref></t>
          </li>
        </ul>
        <t>We define <tt>mmr_size_for_leaf_count</tt> as</t>
        <sourcecode type="python"><![CDATA[
  def mmr_size_for_leaf_count(leaves):
    return 2 * leaves - ones_count(leaves)
]]></sourcecode>
      </section>
    </section>
    <section anchor="privacy-considerations">
      <name>Privacy Considerations</name>
      <t>See the privacy considerations section of <xref target="RFC9942"/>.</t>
      <t>This profile does not define the leaf pre-image <tt>x</tt>.
Confidentiality of entry contents, including resistance to guess-and-confirm of low-entropy entries, is the responsibility of the application that constructs <tt>x</tt> (for SCITT, see the privacy considerations of <xref target="RFC9943"/>).</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security considerations of <xref target="RFC9942"/> apply.</t>
      <section anchor="tree-size-of-a-receipt-of-inclusion">
        <name>Tree size of a receipt of inclusion</name>
        <t>A receipt of inclusion carries no tree size: it verifies in every later tree size, and alone does not tie the proven node to the history a verifier has established by receipts of consistency.
When the inclusion path is empty the signature is over the node value alone and the index is not bound.
An application that needs the position bound in this case can include it in the entry (see <xref target="leaf-commitment-scheme">Leaf commitment scheme</xref>) or check the node against a trusted accumulator for a tree size in which it is a peak.</t>
      </section>
      <section anchor="leaf-commitment-scheme">
        <name>Leaf commitment scheme</name>
        <t>Leaf values are not domain separated from interior values as they are in <xref target="RFC9162"/>: an <tt>x</tt> equal to the pre-image <tt>pos || left || right</tt> of an interior node hashes to that node.
With a non-empty inclusion path the position is bound and the height of the index shows whether the node is a leaf.
With an empty path such an <tt>x</tt> verifies as an entry at any leaf index.
An application should choose a form for <tt>x</tt> that no interior pre-image can take, for example a leading domain byte, and include the position in <tt>x</tt> if it needs the position bound when the path is empty.</t>
      </section>
      <section anchor="declared-tree-sizes">
        <name>Declared tree sizes</name>
        <t>The shape of a consistency proof does not fix tree-size-2 when there are right-peaks: a right-peak carries no height, so the same consistency paths and right-peaks complete the accumulator of every tree size that adds the same number of peaks.
A verifier that takes tree-size-2 from the unprotected proof, or omits the comparison with the protected tree-size-2, lets the presenter choose the size it records, and the ledger's next receipt then fails against that state although the ledger has behaved correctly.</t>
      </section>
      <section anchor="the-empty-tree-as-trusted-state">
        <name>The empty tree as trusted state</name>
        <t>Every accumulator is consistent with the empty tree.
A verifier that verifies from the empty tree places all of its trust in the signing key, the signed <tt>vds</tt> value and the signed tree-size-2; the hash algorithm and size it records are the signer's assertion, not values derived from a state it held.
The rules for accepting such a receipt once a later state is held are given in <xref target="verifying-the-receipt-of-consistency">Verifying the Receipt of consistency</xref>.</t>
      </section>
      <section anchor="hash-algorithm">
        <name>Hash algorithm</name>
        <t>A log uses one hash algorithm for its lifetime, as in Section 9 of <xref target="RFC9162"/>.
Consistency verification carries origin peaks above the split and the right-peaks without rehashing them, so a verifier that does not compare the protected <tt>vds</tt> value with its trusted one can be left holding peaks computed with two hash algorithms.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="additions-to-existing-registries">
        <name>Additions to Existing Registries</name>
        <section anchor="cose-verifiable-data-structure-algorithms">
          <name>COSE Verifiable Data Structure Algorithms</name>
          <t>IANA is requested to add the following value to the "COSE Verifiable Data Structure Algorithms" registry established by <xref target="RFC9942"/>.
Values for other hash algorithms may be registered by other specifications, as described in <xref target="description-of-the-verifiable-data-structure"/>.</t>
          <table align="left" anchor="iana-vds-algorithms">
            <name>Additions to the COSE Verifiable Data Structure Algorithms registry</name>
            <thead>
              <tr>
                <th align="left">Name</th>
                <th align="left">Value</th>
                <th align="left">Description</th>
                <th align="left">Change Controller</th>
                <th align="left">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left">MMR_SHA256</td>
                <td align="left">TBD_1</td>
                <td align="left">SHA-256 Merkle Mountain Range</td>
                <td align="left">IETF</td>
                <td align="left">RFCthis</td>
              </tr>
            </tbody>
          </table>
        </section>
        <section anchor="cose-verifiable-data-structure-proofs">
          <name>COSE Verifiable Data Structure Proofs</name>
          <t>Section 8.2.1 of <xref target="RFC9942"/> requires each entry in the "COSE Verifiable Data Structure Algorithms" registry to have corresponding entries in the "COSE Verifiable Data Structure Proofs" registry.
IANA is requested to add the following entries for MMR_SHA256 to that registry:</t>
          <table align="left" anchor="iana-vds-proofs">
            <name>Additions to the COSE Verifiable Data Structure Proofs registry</name>
            <thead>
              <tr>
                <th align="left">Verifiable Data Structure</th>
                <th align="left">Name</th>
                <th align="left">Label</th>
                <th align="left">CBOR Type</th>
                <th align="left">Description</th>
                <th align="left">Change Controller</th>
                <th align="left">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left">TBD_1</td>
                <td align="left">inclusion proofs</td>
                <td align="left">-1</td>
                <td align="left">array (of bstr)</td>
                <td align="left">Proof of inclusion</td>
                <td align="left">IETF</td>
                <td align="left">
                  <xref target="inclusion-proofs"/> of RFCthis</td>
              </tr>
              <tr>
                <td align="left">TBD_1</td>
                <td align="left">consistency proofs</td>
                <td align="left">-2</td>
                <td align="left">array (of bstr)</td>
                <td align="left">Proof of append-only property</td>
                <td align="left">IETF</td>
                <td align="left">
                  <xref target="consistency-proof"/> of RFCthis</td>
              </tr>
            </tbody>
          </table>
        </section>
        <section anchor="cose-header-parameters">
          <name>COSE Header Parameters</name>
          <t>IANA is requested to add the following entry to the "COSE Header Parameters" registry established by <xref target="RFC9053"/>, in the Specification Required range:</t>
          <ul spacing="normal">
            <li>
              <t>Name: tree-size-2</t>
            </li>
            <li>
              <t>Label: TBD_2</t>
            </li>
            <li>
              <t>Value Type: uint</t>
            </li>
            <li>
              <t>Value Registry: none</t>
            </li>
            <li>
              <t>Description: The tree size to which a receipt of consistency proves consistency, and whose accumulator is its payload</t>
            </li>
            <li>
              <t>Reference: RFCthis</t>
            </li>
          </ul>
          <t>Until this label is assigned, implementations use the private use value -65933 for tree-size-2.</t>
        </section>
      </section>
      <section anchor="new-registries">
        <name>New Registries</name>
        <t>This document requests no new registries.</t>
      </section>
    </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="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </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>
        <reference anchor="RFC9052">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.</t>
              <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="96"/>
          <seriesInfo name="RFC" value="9052"/>
          <seriesInfo name="DOI" value="10.17487/RFC9052"/>
        </reference>
        <reference anchor="RFC9053">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Initial Algorithms</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines a set of algorithms that can be used with the CBOR Object Signing and Encryption (COSE) protocol (RFC 9052).</t>
              <t>This document, along with RFC 9052, obsoletes RFC 8152.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9053"/>
          <seriesInfo name="DOI" value="10.17487/RFC9053"/>
        </reference>
        <reference anchor="RFC9942">
          <front>
            <title>CBOR Object Signing and Encryption (COSE) Receipts</title>
            <author fullname="O. Steele" initials="O." surname="Steele"/>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="A. Delignat-Lavaud" initials="A." surname="Delignat-Lavaud"/>
            <author fullname="C. Fournet" initials="C." surname="Fournet"/>
            <date month="June" year="2026"/>
            <abstract>
              <t>CBOR Object Signing and Encryption (COSE) Receipts prove properties of a Verifiable Data Structure (VDS) to a verifier. VDSs and associated Proof Types enable security properties, such as minimal disclosure, transparency, and non-equivocation. Transparency helps maintain trust over time and has been applied to certificates, end-to-end encrypted messaging systems, and supply chain security. This specification enables concise transparency-oriented systems by building on Concise Binary Object Representation (CBOR) and COSE. The extensibility of the approach is demonstrated by providing CBOR encodings for Merkle inclusion and consistency proofs.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9942"/>
          <seriesInfo name="DOI" value="10.17487/RFC9942"/>
        </reference>
        <reference anchor="FIPS180-4" target="https://doi.org/10.6028/NIST.FIPS.180-4">
          <front>
            <title>Secure Hash Standard (SHS)</title>
            <author>
              <organization>National Institute of Standards and Technology</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="FIPS" value="PUB 180-4"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC9054">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Hash Algorithms</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>The CBOR Object Signing and Encryption (COSE) syntax (see RFC 9052) does not define any direct methods for using hash algorithms. There are, however, circumstances where hash algorithms are used, such as indirect signatures, where the hash of one or more contents are signed, and identification of an X.509 certificate or other object by the use of a fingerprint. This document defines hash algorithms that are identified by COSE algorithm identifiers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9054"/>
          <seriesInfo name="DOI" value="10.17487/RFC9054"/>
        </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>
        <reference anchor="RFC9943">
          <front>
            <title>An Architecture for Trustworthy and Transparent Digital Supply Chains</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="A. Delignat-Lavaud" initials="A." surname="Delignat-Lavaud"/>
            <author fullname="C. Fournet" initials="C." surname="Fournet"/>
            <author fullname="Y. Deshpande" initials="Y." surname="Deshpande"/>
            <author fullname="S. Lasker" initials="S." surname="Lasker"/>
            <date month="June" year="2026"/>
            <abstract>
              <t>Traceability in supply chains is a growing security concern. While Verifiable Data Structures (VDSs) have addressed specific issues, such as equivocation over digital certificates, they lack a universal architecture for all supply chains. This document defines such an architecture for single-issuer signed statement transparency. It ensures extensibility and interoperability between different transparency services as well as compliance with various auditing procedures and regulatory requirements.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9943"/>
          <seriesInfo name="DOI" value="10.17487/RFC9943"/>
        </reference>
        <reference anchor="ReyzinYakoubov" target="https://eprint.iacr.org/2015/718.pdf">
          <front>
            <title>Efficient Asynchronous Accumulators for Distributed PKI</title>
            <author initials="L." surname="Reyzin" fullname="Leonid Reyzin">
              <organization/>
            </author>
            <author initials="S." surname="Yakoubov" fullname="Sophia Yakoubov">
              <organization/>
            </author>
            <date year="2015"/>
          </front>
        </reference>
        <reference anchor="CrosbyWallach" target="https://static.usenix.org/event/sec09/tech/full_papers/crosby.pdf">
          <front>
            <title>Efficient Data Structures for Tamper-Evident Logging</title>
            <author initials="S. A." surname="Crosby" fullname="Scott A. Crosby">
              <organization/>
            </author>
            <author initials="D. S." surname="Wallach" fullname="Dan S. Wallach">
              <organization/>
            </author>
            <date year="2009"/>
          </front>
        </reference>
        <reference anchor="PostOrderTlog" target="https://research.swtch.com/tlog#appendix_a">
          <front>
            <title>Transparent Logs for Skeptical Clients (Appendix A: Storing the Log)</title>
            <author initials="R." surname="Cox" fullname="Russ Cox">
              <organization/>
            </author>
            <date year="2019"/>
          </front>
        </reference>
        <reference anchor="PeterTodd" target="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-May/012715.html">
          <front>
            <title>Merkle Mountain Ranges (bitcoin-dev mailing list)</title>
            <author initials="P." surname="Todd" fullname="Peter Todd">
              <organization/>
            </author>
            <date year="2016"/>
          </front>
        </reference>
        <reference anchor="KnuthTBT" target="https://www-cs-faculty.stanford.edu/~knuth/taocp.html">
          <front>
            <title>The Art of Computer Programming, Volume 1: Fundamental Algorithms, Section 2.3.1 Traversing Binary Trees</title>
            <author initials="D. E." surname="Knuth" fullname="Donald E. Knuth">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
      </references>
    </references>
    <?line 910?>

<section anchor="assumed-bit-primitives">
      <name>Assumed bit primitives</name>
      <section anchor="log2floor">
        <name>log2floor</name>
        <t>Returns the floor of log base 2 x</t>
        <sourcecode type="python"><![CDATA[
  def log2floor(x):
    return x.bit_length() - 1
]]></sourcecode>
      </section>
      <section anchor="mostsigbit">
        <name>most_sig_bit</name>
        <t>Returns the mask for the most significant bit in pos</t>
        <sourcecode type="python"><![CDATA[
  def most_sig_bit(pos) -> int:
    return 1 << (pos.bit_length() - 1)
]]></sourcecode>
        <t>The following primitives are assumed for working with bits as they commonly have library or hardware support.</t>
      </section>
      <section anchor="bitlength">
        <name>bit_length</name>
        <t>The minimum number of bits to represent pos. b011 would be 2, b010 would be 2, and b001 would be 1.</t>
        <sourcecode type="python"><![CDATA[
  def bit_length(pos):
    return pos.bit_length()
]]></sourcecode>
      </section>
      <section anchor="allones">
        <name>all_ones</name>
        <t>Tests if all bits, from the most significant that is set, are 1, b0111 would be true, b0101 would be false.</t>
        <sourcecode type="python"><![CDATA[
  def all_ones(pos) -> bool:
    # most_sig_bit returns a mask, so shifting it left by one
    # and subtracting one sets every bit below and including it
    mask = (most_sig_bit(pos) << 1) - 1
    return pos == mask
]]></sourcecode>
      </section>
      <section anchor="onescount">
        <name>ones_count</name>
        <t>Count of set bits.
For example <tt>ones_count(b101)</tt> is 2</t>
      </section>
      <section anchor="trailingzeros">
        <name>trailing_zeros</name>
        <sourcecode type="python"><![CDATA[
  (v & -v).bit_length() - 1
]]></sourcecode>
      </section>
    </section>
    <section anchor="acknowledgments">
      <name>Acknowledgments</name>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+19a3PbVpLod/yKs3LVDDkmYVF2HJu2vKv4MfauY/taSlIp
V0YEiUMSMQlwAFASJ87+lvtb7i+7/TovAJTlbDZbu7VTNbEInGd3n373wXA4
jOqsXumxOnj69vS5eq9nOtvUlZoXpfr22/fVQZRMp6W+uKbBLKn1oih3Y1XV
aRSlxSxP1jBiWibzepjpej6sZlldD0vpO1yvy+GmLObZSg8PD6NqO11nVZUV
eb3bQMdXz89eRPl2PdXlOEph9HE0K/JK59W2Gqu63OoI1nM3SkqdwLpO9Wxb
ZvXuILosyo+Lsthuxur06auzs+ij3sGzdBxFQ/Uqr3WZ63r4DNcVRcm2XhYw
gRpGCv43365WvO73xTTL1TflbqbpjV4n2WqsSnw8xaf/Amuvizxe63bnfy1y
9VcNay79vj8XeVIvk/xfpsXlNFmthrWeLeNZsY6ivCjXSZ1dwCaVev/i6dFo
9FD+fDD6+p758+E98/Th4VdH7s+7Y4V4kd8P7x2N1ayotIU1vHjx6t3p6MHh
kMZSyuCbwKbVy6RaqtM6ydOkTFXv9OVp/4DbJeVC12O1rOtNNb5zJy2yuCgX
d0aH8f3Dowd33rw6PYtx7JgGpz6ELHV0OPpqePiAnlgo0/+GCkYYqzewYYDI
CnBSwXK2tVbF3C6iUvCvOgMI5cW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