<?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.19 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-pham-mls-additional-wire-formats-00" category="info" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.23.2 -->
  <front>
    <title abbrev="Wire formats without authenticated_data">MLS Wire Formats for PublicMessage and PrivateMessage without authenticated_data</title>
    <seriesInfo name="Internet-Draft" value="draft-pham-mls-additional-wire-formats-00"/>
    <author fullname="Anh Pham">
      <organization>Google</organization>
      <address>
        <email>anhph@google.com</email>
      </address>
    </author>
    <author fullname="Marta Mularczyk">
      <organization>Amazon</organization>
      <address>
        <email>mulmarta@amazon.com</email>
      </address>
    </author>
    <author fullname="Raphael Robert">
      <organization>Phoenix R&amp;D</organization>
      <address>
        <email>ietf@raphaelrobert.com</email>
      </address>
    </author>
    <author fullname="Peter Slatala">
      <organization>Google</organization>
      <address>
        <email>psla@google.com</email>
      </address>
    </author>
    <date year="2024" month="October" day="21"/>
    <area>AREA</area>
    <workgroup>MLS</workgroup>
    <keyword>additional authenticated data</keyword>
    <keyword>AAD</keyword>
    <keyword>Wire formats</keyword>
    <abstract>
      <?line 72?>

<t>This document describes an extension to support two new wire formats for MLS messages: PublicMessageWithoutAAD and PrivateMessageWithoutAAD.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://example.com/LATEST"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-pham-mls-additional-wire-formats/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        mls 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/anhph0/mls-additional-wire-formats"/>.</t>
    </note>
  </front>
  <middle>
    <?line 76?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Sometimes it is desirable to have additional authenticated data to be included in the computation of <tt>MLSMessage</tt> constructions, but not to have it sent on the wire as part of these messages. A use-case is applications that want to have some information available to the server together with a <tt>MLSMessage</tt> and at the same time want to prove the authenticity of the information to other clients.</t>
      <t>An example of this is the case of delivery receipts where the server needs to know that a message from Alice has been delivered to Bob, but at the same time it wants Alice to be able to verify that the delivery receipt indeed comes from Bob.</t>
      <t>This document proposes an extension to support new wire formats for MLS <tt>PrivateMessage</tt> and <tt>PublicMessage</tt> to support such cases. Applications will inject additional data as part of the <tt>MLSMessage</tt> computation, but the additional data is not included in the <tt>MLSMessage</tt>.</t>
      <t>Note that it is the application's responsibility to know what needs to be used as additional data when it processes messages with these new wire formats.</t>
    </section>
    <section anchor="extension-definition">
      <name>Extension Definition</name>
      <artwork><![CDATA[
struct {
    ExtensionType extension_type;
    opaque extension_data<V>;
} ExtensionContent;
]]></artwork>
      <t><tt>extension_type</tt> is a unique uint16 identifier registered in MLS Extension Types IANA registry (see Section 17.3 of <xref target="RFC9420"/>). This extension uses the <tt>mls_extension_message</tt> WireFormat as defined in <eref target="https://messaginglayersecurity.rocks/mls-extensions/draft-ietf-mls-extensions.html#wire-formats">Section 2.1.7.1 of the Extensions Framework</eref>, where the <tt>extension_data</tt> is TLS-serialized <tt>MessageWithoutAAD</tt>.</t>
      <artwork><![CDATA[
enum {
    PublicMessageWithoutAAD(0),
    PrivateMessageWithoutAAD(1),
} MessageWithoutAAD;
]]></artwork>
    </section>
    <section anchor="message-framing">
      <name>Message Framing</name>
      <artwork><![CDATA[
uint16 WireFormat;

struct {
    opaque group_id<V>;
    uint64 epoch;
    Sender sender;

    ContentType content_type;
        select (FramedContent.content_type) {
            case application:
                opaque application_data<V>;
            case proposal:
                Proposal proposal;
            case commit:
                Commit commit;
        };
} FramedContentWithoutAAD;
]]></artwork>
    </section>
    <section anchor="content-authentication">
      <name>Content Authentication</name>
      <t><tt>FramedContentWithoutAAD</tt> is authenticated using the same procedure for <tt>FramedContent</tt> described in Section 6.1 of <xref target="RFC9420"/>. A difference is that in the <tt>FramedContentTBS</tt> definition, we have <tt>FramedContent</tt> with <tt>authenticated_data</tt> being injected from the outside by the application.</t>
      <t>Moreover, the <tt>signature</tt> in the <tt>FramedContentAuthData</tt> is computed by using SafeExtension.</t>
      <artwork><![CDATA[
SignWithLabel(SignatureKey, "LabeledExtensionContent", LabeledExtensionContent)
]]></artwork>
      <t>where <tt>LabeledExtensionContent</tt> is defined as:</t>
      <artwork><![CDATA[
label = Label
extension_type = ExtensionType
extension_data = FramedContent
]]></artwork>
      <t>with <tt>authenticated_data</tt> being injected to <tt>FramedContent</tt> by the application.</t>
    </section>
    <section anchor="publicmessagewithoutaad">
      <name>PublicMessageWithoutAAD</name>
      <artwork><![CDATA[
struct {
    FramedContentWithoutAAD content;
    FramedContentAuthData auth;
    select (PublicMessageWithoutAAD.content.sender.sender_type) {
        case member:
            MAC membership_tag;
        case external:
        case new_member_commit:
        case new_member_proposal:
            struct{};
    };
} PublicMessageWithoutAAD;
]]></artwork>
      <t>The membership_tag in the <tt>PublicMessageWithoutAAD</tt> authenticates the sender's membership in the group. It is computed as follows:</t>
      <artwork><![CDATA[
membership_tag = MAC(membership_key, AuthenticatedContentTBM)
]]></artwork>
      <t>with <tt>AuthenticatedContentTBM</tt> and <tt>membership_key</tt> as defined as in the <xref target="RFC9420"/>. <tt>authenticated_data</tt> in the <tt>FramedContent</tt> is injected by the application.</t>
    </section>
    <section anchor="privatemessagewithoutaad">
      <name>PrivateMessageWithoutAAD</name>
      <artwork><![CDATA[
struct {
    opaque group_id<V>;
    uint64 epoch;
    ContentType content_type;
    opaque encrypted_sender_data<V>;
    opaque ciphertext<V>;
} PrivateMessageWithoutAAD;
]]></artwork>
      <t>Similar to <tt>PrivateMessage</tt>, <tt>encrypted_sender_data</tt> and <tt>ciphertext</tt> are encrypted using the AEAD function specified by the cipher suite in use, using the <tt>SenderData</tt> and <tt>PrivateMessageContent</tt> structures as input.</t>
      <t>The <tt>SenderData</tt> is encrypted using the <tt>sender_data_secret</tt> of the group.</t>
      <t>The actual message content is encrypted using the key derived as follows:</t>
      <ul spacing="normal">
        <li>
          <t>Derive a <tt>secret</tt> as defined in Section 2.1.5 of the <eref target="https://messaginglayersecurity.rocks/mls-extensions/draft-ietf-mls-extensions.html#name-exporting-secrets">Extensions Framework</eref>:  </t>
          <t><tt>
  DeriveExtensionSecret(Secret, Label) = ExpandWithLabel(epoch_secret, "ExtensionExport " + ExtensionType + " " + Label)
            </tt></t>
        </li>
        <li>
          <t>Use the the <tt>secret</tt> in lieu of <tt>encryption_tree</tt> to seed the Secret Tree (Section 9 of <xref target="RFC9420"/>).</t>
        </li>
        <li>
          <t>Follow the procedure of the Secret Tree to generate encryption keys and nonces for the encryption of the message content.</t>
        </li>
      </ul>
    </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?>

</section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>No implications on the security of the base MLS protocol due to the use of SafeExtension.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requests the addition of various new values under the heading of "Messaging Layer Security".</t>
    </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>
      <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>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA71Z63IbtxX+v0+B0jON1IiU5bhJTDmOaV0STUVbFemmmUxG
BHdBEdVysQWwommP3qXP0ifrdwDsVaTrH53qh0hiD87lO1dg+/1+9OTJk+gJ
u8is0Jmw/VPNF5aNub5L1DpjU7HKU25FRETXIuMrwexSGraQqWALrVYsoR19
qxLV36hCE0k/18qqWKWDVcKsYrfCMmO5tiIZgI+X4XgtlF5xy8Cw5/m8LHm8
6r9cK313q1WR47tbArvewKlyrjSTmbSSp8wIW+QHDBuZytINy4RwUkUiLZSF
EKmNZfNUxXdMLfBTpIkhRd4Rec9Km4qe22Zo31yweMmzW5Ecs0SkwgrW4/O5
Fvc9JhckRzO3h9Q2S6Ut8RplG6YgTbNYAczMsphnxIvUEMkBmxfWseZaLIqU
ZcqSMJlZrZIiBp3WSju1JoqQcVqytUxT2gYjGS+sAloy5in0Tgots1tvPekF
2RsG5qzIgvoeqlOVfQWEszgtEljSf/q0x4Ber09+NRY2ZQGl1PmXNLjkc5Ga
6gmcxL7APYGjV8LACfMNeBEHq1TqsIXtQAhfaDUutCag7oU2UmXHsAUKJiom
bj0Sy8QHjgAU3pIpBZ4NEUkSDLvTfEWB2teLeMiW1uZmeHh4K+2ymA9itTqM
+VwdNqnA51dECjlHC3CKhdMFekjtQQhOZrlXlrNELvCFNPXhSgidOIgr4KAo
fE5WkHGgiZcVdIjvvcGHVeoM+vv48oAJGw8Gg30yCtnnYmnIeuPLCfuFlDh3
m4yjvyrmqYzHwhgOcTxL2JWW97C/XFrDVlW44FiSETGeJTcJt7wX+agFa8d2
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