<?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.29 (Ruby 3.4.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-kohbrok-mls-leaf-operation-intents-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.29.0 -->
  <front>
    <title abbrev="LOI">Leaf Operation Intents</title>
    <seriesInfo name="Internet-Draft" value="draft-kohbrok-mls-leaf-operation-intents-00"/>
    <author fullname="Konrad Kohbrok">
      <organization>Phoenix R&amp;D</organization>
      <address>
        <email>konrad@ratchet.ing</email>
      </address>
    </author>
    <date year="2025" month="July" day="04"/>
    <area>Security</area>
    <workgroup>Messaging Layer Security</workgroup>
    <keyword>mls</keyword>
    <abstract>
      <?line 41?>

<t>The Messaging Layer Security (MLS) protocol defined in <xref target="RFC9420"/> is an
asynchronous secure group messaging protocol, which allows group members to
propose their own removal from a group.</t>
      <t>However, in some cases MLS clients can't reliably use regular Remove or
SelfRemove proposals to leave a group because they don't have an up-to-date
group state.</t>
      <t>This document specifies a LeafOperationIntent, which does not need an up-to-date
group state but which retains sufficient binding to the client's current state
to avoid replay attacks.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://kkohbrok.github.io/draft-kohbrok-mls-leaf-operation-intents/draft-kohbrok-mls-leaf-operation-intents.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-kohbrok-mls-leaf-operation-intents/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Messaging Layer Security Working Group mailing list (<eref target="mailto:mls@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/mls/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/mls/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/kkohbrok/draft-kohbrok-mls-leaf-operation-intents"/>.</t>
    </note>
  </front>
  <middle>
    <?line 55?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>To leave an MLS group, a member cannot create a commit, but rather has to
propose its own removal. This can create difficulties, some of which have been
solved by the introduction of the SelfRemove proposal, which may be included in
external commits.</t>
      <t>One drawback of Remove and SelfRemove proposals is that they (like other
proposals) are bound to a specific group epoch. This means that authors of such
proposals must have an up-to-date group state to send such a proposal and
continue to keep track of that group state both to re-send the proposal if
necessary.</t>
      <t>This can be a problem if an application wants to cleanly leave a group and
immediately delete the associated group state, e.g., to erase the assocaited
metadata. The deletion of the group state makes it impossible to for the client
to re-send the proposal in case it's not covered by the next commit. Similarly,
the client might be offline at the time and the group state might not be
up-to-date.</t>
      <t>The LeafOperationIntent specified in this document allow a client to bind an
intent to leave a group or update its own leaf to the leaf's current state. That
intent can then be proposed by any party (e.g. an external sender) in an
arbitrary epoch as long as the leaf doesn't change its state due to an update.</t>
    </section>
    <section anchor="leafoperationintent">
      <name>LeafOperationIntent</name>
      <t>A LeafOperationIntent can be created by clients and distributed either to other
group members or to one or more external senders.</t>
      <sourcecode type="tls"><![CDATA[
HashReference LeafNodeRef;

MakeLeafNodeRef(value)
  = RefHash("MLS 1.0 LeafNode Reference", value)

enum {
  reserved(0),
  update(1)
  remove(2),
  (255)
} IntentType

struct {
  IntentType intent_type;
  select (Intent.intent_type) {
    case remove:
      {}
    case update:
      LeafNode leaf_node;
  }
} Intent

struct {
  opaque group_id<V>;
  uint32 sender_index;
  LeafNodeRef leaf_ref;
  Intent intent;
} LeafOperationIntentTBS

struct {
  opaque group_id<V>;
  uint32 sender_index;
  LeafNodeRef leaf_ref;
  Intent intent;
  /* SignWithLabel(., "LeafOperationIntentTBS", LeafOperationIntentTBS) */
  opaque signature<V>;
} LeafOperationIntent

struct LeafOperationProposal {
  LeafOperationIntent intent;
}
]]></sourcecode>
      <t>LeafNode, RefHash and SignWithLabel are as defined in <xref target="RFC9420"/>.</t>
      <ul spacing="normal">
        <li>
          <t><tt>group_id</tt>: The ID of the group in which context the LeafOperationIntent was
sent</t>
        </li>
        <li>
          <t><tt>sender_index</tt>: The index of the sender's leaf in the group</t>
        </li>
        <li>
          <t><tt>leaf_ref</tt>: A hash computed over the LeafNode of the sender using the
MakeLeafNodeRef function</t>
        </li>
        <li>
          <t><tt>intent</tt>: The intent and a potential payload</t>
        </li>
        <li>
          <t><tt>signature</tt>: A signature over all fields except the signature itself using the
sender's leaf signature key</t>
        </li>
      </ul>
      <section anchor="creating-and-proposing-a-leafoperationintent">
        <name>Creating and proposing a LeafOperationIntent</name>
        <t>A group member creates a LeafOperationIntent by populating the <tt>group_id</tt>,
<tt>sender_index</tt> and <tt>leaf_ref</tt> according to the current state of the group and
the sender's leaf.</t>
        <t>The <tt>intent</tt> indicates the operation the client would like to have proposed. A
proposed and committed intent causes either the removal or the update of the
sender's leaf in the same way as a remove or update proposal would.</t>
        <t>Finally the sender creates the signature by calling <tt>SignWithLabel</tt> on the
LeafOperationIntentTBS populated as described above with
"LeafOperationIntentTBS" as label.</t>
        <t>Recipients of a LeafOperationIntent can include it in a LeafOperationProposal.</t>
      </section>
      <section anchor="processing-a-leafoperationproposal">
        <name>Processing a LeafOperationProposal</name>
        <t>Recipients of a LeafOperationProposal MUST perform the following steps on the
<tt>intent</tt> contained in the proposal.</t>
        <ul spacing="normal">
          <li>
            <t>Verify that the <tt>group_id</tt> matches the group in which the proposal was sent</t>
          </li>
          <li>
            <t>Verify that the <tt>leaf_ref</tt> is the LeafRef of the leaf at the <tt>sender_index</tt></t>
          </li>
          <li>
            <t>Verify the <tt>signature</tt> over the <tt>intent</tt> using the signature public key in the
leaf at the <tt>sender_index</tt></t>
          </li>
        </ul>
        <t>After that, the proposal MUST be validated and processed as if it were a Remove
or Update proposal (depending on the type of the intent) originating from the
sender of the intent (not the sender of the LeafOperationProposal).</t>
        <t>External commits may include one or more LeafOperationProposals.</t>
        <t>Open questions:</t>
        <ul spacing="normal">
          <li>
            <t>Do we want to have an MLS wire format for LeafOperationIntent?</t>
          </li>
          <li>
            <t>Do we need an extension for this (like we do for SelfRemove proposal)?</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>In contrast to proposals, LeafOperationIntents are not bound to an epoch and
thus remain valid as long as the creator's leaf doesn't change its state.</t>
      <t>Each LeafOperationIntent can thus be proposed and committed to until the sender
is either removed from the group or updates its own leaf.</t>
      <t>This allows scenarios, where, for example, members get added to or removed from
a group in the time between the creation and the proposal of the intent.</t>
      <t>If a tighter bound to the epoch, i.e. the current group state is required,
clients should use regular Update, Remove or SelfRemove proposals instead.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requests the addition of a new Proposal Type under the heading of
"Messaging Layer Security".</t>
      <t>The <tt>leaf_operation_intent</tt> MLS Proposal Type is used to allow members or
external sender to convey the intent of a leaf owner to perform an operation on
their leaf.</t>
      <ul spacing="normal">
        <li>
          <t>Value: 0x000c (suggested)</t>
        </li>
        <li>
          <t>Name: leaf_operation_intent</t>
        </li>
        <li>
          <t>Recommended: Y</t>
        </li>
        <li>
          <t>External: Y</t>
        </li>
        <li>
          <t>Path Required: Y</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC9420">
        <front>
          <title>The Messaging Layer Security (MLS) Protocol</title>
          <author fullname="R. Barnes" initials="R." surname="Barnes"/>
          <author fullname="B. Beurdouche" initials="B." surname="Beurdouche"/>
          <author fullname="R. Robert" initials="R." surname="Robert"/>
          <author fullname="J. Millican" initials="J." surname="Millican"/>
          <author fullname="E. Omara" initials="E." surname="Omara"/>
          <author fullname="K. Cohn-Gordon" initials="K." surname="Cohn-Gordon"/>
          <date month="July" year="2023"/>
          <abstract>
            <t>Messaging applications are increasingly making use of end-to-end security mechanisms to ensure that messages are only accessible to the communicating endpoints, and not to any servers involved in delivering messages. Establishing keys to provide such protections is challenging for group chat settings, in which more than two clients need to agree on a key but may not be online at the same time. In this document, we specify a key establishment protocol that provides efficient asynchronous group key establishment with forward secrecy (FS) and post-compromise security (PCS) for groups in size ranging from two to thousands.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9420"/>
        <seriesInfo name="DOI" value="10.17487/RFC9420"/>
      </reference>
    </references>
    <?line 208?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
      <name>Contributors</name>
      <contact initials="R." surname="Robert" fullname="Raphael Robert">
        <organization>Phoenix R&amp;D</organization>
        <address>
          <email>ietf@raphaelrobert.com</email>
        </address>
      </contact>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7VZTZPbNhK941f0ylVrySVpJs7msPJmk4kdJ1PxV81MnNqT
DZKQiBoSYAhwZO3U+Lfva4CkSFmq+LKXZAQCjf54/bobXiwWwmtfqBVNXim5
preVqqXX1tCl8cp4NxEySWp1xxveXk5EKr3a2Hq3Im3WVojMpkaWOJ/Vcu0X
tzZPanu7KAu3KCBwYTuBCx0FLs7PhWuSUjuHVb+rcPby55uXRI9IFs7iIm0y
VSn8x/jJnCYq097WWhb84/LiJ/zP1vjr6ublRJimTFS9Ehn0WonUGqeMa9yK
fN0oAbW/FbJWElKvVdrU2u8mYmvr201tmwqrr5VzcqPNhl7Jnappv+tW7bAx
WwlaEMwRd8o0uILor48SRbsmf+Am3vALH+H1UuoC65D3o1Z+vbT1hpdlneZY
zr2v3OrsjHfxkr5Ty27bGS+cwblbp85w/ozPbbTPmwQnb1vHn31tGPh0AZ85
P7i3k7KMcpfafrW8r964zH1ZTISQjc9tzd6FJkTrpigikCa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