CINXE.COM
RFC 9420: The Messaging Layer Security (MLS) Protocol
<!DOCTYPE html> <html lang="en" class="RFC"> <head> <meta charset="utf-8"> <meta content="Common,Latin" name="scripts"> <meta content="initial-scale=1.0" name="viewport"> <title>RFC 9420: The Messaging Layer Security (MLS) Protocol</title> <meta content="Richard Barnes" name="author"> <meta content="Benjamin Beurdouche" name="author"> <meta content="Raphael Robert" name="author"> <meta content="Jon Millican" name="author"> <meta content="Emad Omara" name="author"> <meta content="Katriel Cohn-Gordon" name="author"> <meta content=" 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. " name="description"> <meta content="xml2rfc 3.17.4" name="generator"> <meta content="security" name="keyword"> <meta content="authenticated key exchange" name="keyword"> <meta content="end-to-end encryption" name="keyword"> <meta content="9420" name="rfc.number"> <!-- Generator version information: xml2rfc 3.17.4 Python 3.9.15 ConfigArgParse 1.5.3 google-i18n-address 3.0.0 intervaltree 3.1.0 Jinja2 3.1.2 lxml 4.9.0 platformdirs 3.8.0 pycountry 22.3.5 PyYAML 6.0 requests 2.28.0 setuptools 44.1.1 six 1.16.0 wcwidth 0.2.5 weasyprint 56.1 --> <link href="rfc9420.xml" rel="alternate" type="application/rfc+xml"> <link href="#copyright" rel="license"> <style type="text/css">/* NOTE: Changes at the bottom of this file overrides some earlier settings. Once the style has stabilized and has been adopted as an official RFC style, this can be consolidated so that style settings occur only in one place, but for now the contents of this file consists first of the initial CSS work as provided to the RFC Formatter (xml2rfc) work, followed by itemized and commented changes found necessary during the development of the v3 formatters. */ /* fonts */ @import url('https://fonts.googleapis.com/css?family=Noto+Sans'); /* Sans-serif */ @import url('https://fonts.googleapis.com/css?family=Noto+Serif'); /* Serif (print) */ @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); /* Monospace */ :root { --font-sans: 'Noto Sans', Arial, Helvetica, sans-serif; --font-serif: 'Noto Serif', 'Times', 'Times New Roman', serif; --font-mono: 'Roboto Mono', Courier, 'Courier New', monospace; } @viewport { zoom: 1.0; } @-ms-viewport { width: extend-to-zoom; zoom: 1.0; } /* general and mobile first */ html { } body { max-width: 90%; margin: 1.5em auto; color: #222; background-color: #fff; font-size: 14px; font-family: var(--font-sans); line-height: 1.6; scroll-behavior: smooth; } .ears { display: none; } /* headings */ #title, h1, h2, h3, h4, h5, h6 { margin: 1em 0 0.5em; font-weight: bold; line-height: 1.3; } #title { clear: both; border-bottom: 1px solid #ddd; margin: 0 0 0.5em 0; padding: 1em 0 0.5em; } .author { padding-bottom: 4px; } h1 { font-size: 26px; margin: 1em 0; } h2 { font-size: 22px; margin-top: -20px; /* provide offset for in-page anchors */ padding-top: 33px; } h3 { font-size: 18px; margin-top: -36px; /* provide offset for in-page anchors */ padding-top: 42px; } h4 { font-size: 16px; margin-top: -36px; /* provide offset for in-page anchors */ padding-top: 42px; } h5, h6 { font-size: 14px; } #n-copyright-notice { border-bottom: 1px solid #ddd; padding-bottom: 1em; margin-bottom: 1em; } /* general structure */ p { padding: 0; margin: 0 0 1em 0; text-align: left; } div, span { position: relative; } div { margin: 0; } .alignRight.art-text { background-color: #f9f9f9; border: 1px solid #eee; border-radius: 3px; padding: 1em 1em 0; margin-bottom: 1.5em; } .alignRight.art-text pre { padding: 0; } .alignRight { margin: 1em 0; } .alignRight > *:first-child { border: none; margin: 0; float: right; clear: both; } .alignRight > *:nth-child(2) { clear: both; display: block; border: none; } svg { display: block; } svg[font-family~="serif" i], svg [font-family~="serif" i] { font-family: var(--font-serif); } svg[font-family~="sans-serif" i], svg [font-family~="sans-serif" i] { font-family: var(--font-sans); } svg[font-family~="monospace" i], svg [font-family~="monospace" i] { font-family: var(--font-mono); } .alignCenter.art-text { background-color: #f9f9f9; border: 1px solid #eee; border-radius: 3px; padding: 1em 1em 0; margin-bottom: 1.5em; } .alignCenter.art-text pre { padding: 0; } .alignCenter { margin: 1em 0; } .alignCenter > *:first-child { display: table; border: none; margin: 0 auto; } /* lists */ ol, ul { padding: 0; margin: 0 0 1em 2em; } ol ol, ul ul, ol ul, ul ol { margin-left: 1em; } li { margin: 0 0 0.25em 0; } .ulCompact li { margin: 0; } ul.empty, .ulEmpty { list-style-type: none; } ul.empty li, .ulEmpty li { margin-top: 0.5em; } ul.ulBare, li.ulBare { margin-left: 0em !important; } ul.compact, .ulCompact, ol.compact, .olCompact { line-height: 100%; margin: 0 0 0 2em; } /* definition lists */ dl { } dl > dt { float: left; margin-right: 1em; } /* dl.nohang > dt { float: none; } */ dl > dd { margin-bottom: .8em; min-height: 1.3em; } dl.compact > dd, .dlCompact > dd { margin-bottom: 0em; } dl > dd > dl { margin-top: 0.5em; margin-bottom: 0em; } /* links */ a { text-decoration: none; } a[href] { color: #22e; /* Arlen: WCAG 2019 */ } a[href]:hover { background-color: #f2f2f2; } figcaption a[href], a[href].selfRef, .iref + a[href].internal { color: #222; } /* XXX probably not this: a.selfRef:hover { background-color: transparent; cursor: default; } */ /* Figures */ tt, code, pre { background-color: #f9f9f9; font-family: var(--font-mono); } pre { border: 1px solid #eee; margin: 0; padding: 1em; } img { max-width: 100%; } figure { margin: 0; } figure blockquote { margin: 0.8em 0.4em 0.4em; } figcaption { font-style: italic; margin: 0 0 1em 0; } @media screen { pre { overflow-x: auto; max-width: 100%; max-width: calc(100% - 22px); } } /* aside, blockquote */ aside, blockquote { margin-left: 0; padding: 1.2em 2em; } blockquote { background-color: #f9f9f9; color: #111; /* Arlen: WCAG 2019 */ border: 1px solid #ddd; border-radius: 3px; margin: 1em 0; } cite { display: block; text-align: right; font-style: italic; } /* tables */ table { width: 100%; margin: 0 0 1em; border-collapse: collapse; border: 1px solid #eee; } th, td { text-align: left; vertical-align: top; padding: 0.5em 0.75em; } th { text-align: left; background-color: #e9e9e9; } tr:nth-child(2n+1) > td { background-color: #f5f5f5; } table caption { font-style: italic; margin: 0; padding: 0; text-align: left; } table p { /* XXX to avoid bottom margin on table row signifiers. If paragraphs should be allowed within tables more generally, it would be far better to select on a class. */ margin: 0; } /* pilcrow */ a.pilcrow { color: #666; /* Arlen: AHDJ 2019 */ text-decoration: none; visibility: hidden; user-select: none; -ms-user-select: none; -o-user-select:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } @media screen { aside:hover > a.pilcrow, p:hover > a.pilcrow, blockquote:hover > a.pilcrow, div:hover > a.pilcrow, li:hover > a.pilcrow, pre:hover > a.pilcrow { visibility: visible; } a.pilcrow:hover { background-color: transparent; } } /* misc */ hr { border: 0; border-top: 1px solid #eee; } .bcp14 { font-variant: small-caps; } .role { font-variant: all-small-caps; } /* info block */ #identifiers { margin: 0; font-size: 0.9em; } #identifiers dt { width: 3em; clear: left; } #identifiers dd { float: left; margin-bottom: 0; } /* Fix PDF info block run off issue */ @media print { #identifiers dd { float: none; } } #identifiers .authors .author { display: inline-block; margin-right: 1.5em; } #identifiers .authors .org { font-style: italic; } /* The prepared/rendered info at the very bottom of the page */ .docInfo { color: #666; /* Arlen: WCAG 2019 */ font-size: 0.9em; font-style: italic; margin-top: 2em; } .docInfo .prepared { float: left; } .docInfo .prepared { float: right; } /* table of contents */ #toc { padding: 0.75em 0 2em 0; margin-bottom: 1em; } nav.toc ul { margin: 0 0.5em 0 0; padding: 0; list-style: none; } nav.toc li { line-height: 1.3em; margin: 0.75em 0; padding-left: 1.2em; text-indent: -1.2em; } /* references */ .references dt { text-align: right; font-weight: bold; min-width: 7em; } .references dd { margin-left: 8em; overflow: auto; } .refInstance { margin-bottom: 1.25em; } .references .ascii { margin-bottom: 0.25em; } /* index */ .index ul { margin: 0 0 0 1em; padding: 0; list-style: none; } .index ul ul { margin: 0; } .index li { margin: 0; text-indent: -2em; padding-left: 2em; padding-bottom: 5px; } .indexIndex { margin: 0.5em 0 1em; } .index a { font-weight: 700; } /* make the index two-column on all but the smallest screens */ @media (min-width: 600px) { .index ul { -moz-column-count: 2; -moz-column-gap: 20px; } .index ul ul { -moz-column-count: 1; -moz-column-gap: 0; } } /* authors */ address.vcard { font-style: normal; margin: 1em 0; } address.vcard .nameRole { font-weight: 700; margin-left: 0; } address.vcard .label { font-family: var(--font-sans); margin: 0.5em 0; } address.vcard .type { display: none; } .alternative-contact { margin: 1.5em 0 1em; } hr.addr { border-top: 1px dashed; margin: 0; color: #ddd; max-width: calc(100% - 16px); } /* temporary notes */ .rfcEditorRemove::before { position: absolute; top: 0.2em; right: 0.2em; padding: 0.2em; content: "The RFC Editor will remove this note"; color: #9e2a00; /* Arlen: WCAG 2019 */ background-color: #ffd; /* Arlen: WCAG 2019 */ } .rfcEditorRemove { position: relative; padding-top: 1.8em; background-color: #ffd; /* Arlen: WCAG 2019 */ border-radius: 3px; } .cref { background-color: #ffd; /* Arlen: WCAG 2019 */ padding: 2px 4px; } .crefSource { font-style: italic; } /* alternative layout for smaller screens */ @media screen and (max-width: 1023px) { body { padding-top: 2em; } #title { padding: 1em 0; } h1 { font-size: 24px; } h2 { font-size: 20px; margin-top: -18px; /* provide offset for in-page anchors */ padding-top: 38px; } #identifiers dd { max-width: 60%; } #toc { position: fixed; z-index: 2; top: 0; right: 0; padding: 0; margin: 0; background-color: inherit; border-bottom: 1px solid #ccc; } #toc h2 { margin: -1px 0 0 0; padding: 4px 0 4px 6px; padding-right: 1em; min-width: 190px; font-size: 1.1em; text-align: right; background-color: #444; color: white; cursor: pointer; } #toc h2::before { /* css hamburger */ float: right; position: relative; width: 1em; height: 1px; left: -164px; margin: 6px 0 0 0; background: white none repeat scroll 0 0; box-shadow: 0 4px 0 0 white, 0 8px 0 0 white; content: ""; } #toc nav { display: none; padding: 0.5em 1em 1em; overflow: auto; height: calc(100vh - 48px); border-left: 1px solid #ddd; } } /* alternative layout for wide screens */ @media screen and (min-width: 1024px) { body { max-width: 724px; margin: 42px auto; padding-left: 1.5em; padding-right: 29em; } #toc { position: fixed; top: 42px; right: 42px; width: 25%; margin: 0; padding: 0 1em; z-index: 1; } #toc h2 { border-top: none; border-bottom: 1px solid #ddd; font-size: 1em; font-weight: normal; margin: 0; padding: 0.25em 1em 1em 0; } #toc nav { display: block; height: calc(90vh - 84px); bottom: 0; padding: 0.5em 0 0; overflow: auto; } img { /* future proofing */ max-width: 100%; height: auto; } } /* pagination */ @media print { body { width: 100%; } p { orphans: 3; widows: 3; } #n-copyright-notice { border-bottom: none; } #toc, #n-introduction { page-break-before: always; } #toc { border-top: none; padding-top: 0; } figure, pre { page-break-inside: avoid; } figure { overflow: scroll; } .breakable pre { break-inside: auto; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } h2+*, h3+*, h4+*, h5+*, h6+* { page-break-before: avoid; } pre { white-space: pre-wrap; word-wrap: break-word; font-size: 10pt; } table { border: 1px solid #ddd; } td { border-top: 1px solid #ddd; } } /* This is commented out here, as the string-set: doesn't pass W3C validation currently */ /* .ears thead .left { string-set: ears-top-left content(); } .ears thead .center { string-set: ears-top-center content(); } .ears thead .right { string-set: ears-top-right content(); } .ears tfoot .left { string-set: ears-bottom-left content(); } .ears tfoot .center { string-set: ears-bottom-center content(); } .ears tfoot .right { string-set: ears-bottom-right content(); } */ @page :first { padding-top: 0; @top-left { content: normal; border: none; } @top-center { content: normal; border: none; } @top-right { content: normal; border: none; } } @page { size: A4; margin-bottom: 45mm; padding-top: 20px; /* The following is commented out here, but set appropriately by in code, as the content depends on the document */ /* @top-left { content: 'Internet-Draft'; vertical-align: bottom; border-bottom: solid 1px #ccc; } @top-left { content: string(ears-top-left); vertical-align: bottom; border-bottom: solid 1px #ccc; } @top-center { content: string(ears-top-center); vertical-align: bottom; border-bottom: solid 1px #ccc; } @top-right { content: string(ears-top-right); vertical-align: bottom; border-bottom: solid 1px #ccc; } @bottom-left { content: string(ears-bottom-left); vertical-align: top; border-top: solid 1px #ccc; } @bottom-center { content: string(ears-bottom-center); vertical-align: top; border-top: solid 1px #ccc; } @bottom-right { content: '[Page ' counter(page) ']'; vertical-align: top; border-top: solid 1px #ccc; } */ } /* Changes introduced to fix issues found during implementation */ /* Make sure links are clickable even if overlapped by following H* */ a { z-index: 2; } /* Separate body from document info even without intervening H1 */ section { clear: both; } /* Top align author divs, to avoid names without organization dropping level with org names */ .author { vertical-align: top; } /* Leave room in document info to show Internet-Draft on one line */ #identifiers dt { width: 8em; } /* Don't waste quite as much whitespace between label and value in doc info */ #identifiers dd { margin-left: 1em; } /* Give floating toc a background color (needed when it's a div inside section */ #toc { background-color: white; } /* Make the collapsed ToC header render white on gray also when it's a link */ @media screen and (max-width: 1023px) { #toc h2 a, #toc h2 a:link, #toc h2 a:focus, #toc h2 a:hover, #toc a.toplink, #toc a.toplink:hover { color: white; background-color: #444; text-decoration: none; } } /* Give the bottom of the ToC some whitespace */ @media screen and (min-width: 1024px) { #toc { padding: 0 0 1em 1em; } } /* Style section numbers with more space between number and title */ .section-number { padding-right: 0.5em; } /* prevent monospace from becoming overly large */ tt, code, pre { font-size: 95%; } /* Fix the height/width aspect for ascii art*/ .sourcecode pre, .art-text pre { line-height: 1.12; } /* Add styling for a link in the ToC that points to the top of the document */ a.toplink { float: right; margin-right: 0.5em; } /* Fix the dl styling to match the RFC 7992 attributes */ dl > dt, dl.dlParallel > dt { float: left; margin-right: 1em; } dl.dlNewline > dt { float: none; } /* Provide styling for table cell text alignment */ table td.text-left, table th.text-left { text-align: left; } table td.text-center, table th.text-center { text-align: center; } table td.text-right, table th.text-right { text-align: right; } /* Make the alternative author contact information look less like just another author, and group it closer with the primary author contact information */ .alternative-contact { margin: 0.5em 0 0.25em 0; } address .non-ascii { margin: 0 0 0 2em; } /* With it being possible to set tables with alignment left, center, and right, { width: 100%; } does not make sense */ table { width: auto; } /* Avoid reference text that sits in a block with very wide left margin, because of a long floating dt label.*/ .references dd { overflow: visible; } /* Control caption placement */ caption { caption-side: bottom; } /* Limit the width of the author address vcard, so names in right-to-left script don't end up on the other side of the page. */ address.vcard { max-width: 30em; margin-right: auto; } /* For address alignment dependent on LTR or RTL scripts */ address div.left { text-align: left; } address div.right { text-align: right; } /* Provide table alignment support. We can't use the alignX classes above since they do unwanted things with caption and other styling. */ table.right { margin-left: auto; margin-right: 0; } table.center { margin-left: auto; margin-right: auto; } table.left { margin-left: 0; margin-right: auto; } /* Give the table caption label the same styling as the figcaption */ caption a[href] { color: #222; } @media print { .toplink { display: none; } /* avoid overwriting the top border line with the ToC header */ #toc { padding-top: 1px; } /* Avoid page breaks inside dl and author address entries */ .vcard { page-break-inside: avoid; } } /* Tweak the bcp14 keyword presentation */ .bcp14 { font-variant: small-caps; font-weight: bold; font-size: 0.9em; } /* Tweak the invisible space above H* in order not to overlay links in text above */ h2 { margin-top: -18px; /* provide offset for in-page anchors */ padding-top: 31px; } h3 { margin-top: -18px; /* provide offset for in-page anchors */ padding-top: 24px; } h4 { margin-top: -18px; /* provide offset for in-page anchors */ padding-top: 24px; } /* Float artwork pilcrow to the right */ @media screen { .artwork a.pilcrow { display: block; line-height: 0.7; margin-top: 0.15em; } } /* Make pilcrows on dd visible */ @media screen { dd:hover > a.pilcrow { visibility: visible; } } /* Make the placement of figcaption match that of a table's caption by removing the figure's added bottom margin */ .alignLeft.art-text, .alignCenter.art-text, .alignRight.art-text { margin-bottom: 0; } .alignLeft, .alignCenter, .alignRight { margin: 1em 0 0 0; } /* In print, the pilcrow won't show on hover, so prevent it from taking up space, possibly even requiring a new line */ @media print { a.pilcrow { display: none; } } /* Styling for the external metadata */ div#external-metadata { background-color: #eee; padding: 0.5em; margin-bottom: 0.5em; display: none; } div#internal-metadata { padding: 0.5em; /* to match the external-metadata padding */ } /* Styling for title RFC Number */ h1#rfcnum { clear: both; margin: 0 0 -1em; padding: 1em 0 0 0; } /* Make .olPercent look the same as <ol><li> */ dl.olPercent > dd { margin-bottom: 0.25em; min-height: initial; } /* Give aside some styling to set it apart */ aside { border-left: 1px solid #ddd; margin: 1em 0 1em 2em; padding: 0.2em 2em; } aside > dl, aside > ol, aside > ul, aside > table, aside > p { margin-bottom: 0.5em; } /* Additional page break settings */ @media print { figcaption, table caption { page-break-before: avoid; } } /* Font size adjustments for print */ @media print { body { font-size: 10pt; line-height: normal; max-width: 96%; } h1 { font-size: 1.72em; padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */ h2 { font-size: 1.44em; padding-top: 1.5em; } /* 1*1.2*1.2 */ h3 { font-size: 1.2em; padding-top: 1.5em; } /* 1*1.2 */ h4 { font-size: 1em; padding-top: 1.5em; } h5, h6 { font-size: 1em; margin: initial; padding: 0.5em 0 0.3em; } } /* Sourcecode margin in print, when there's no pilcrow */ @media print { .artwork, .artwork > pre, .sourcecode { margin-bottom: 1em; } } /* Avoid narrow tables forcing too narrow table captions, which may render badly */ table { min-width: 20em; } /* ol type a */ ol.type-a { list-style-type: lower-alpha; } ol.type-A { list-style-type: upper-alpha; } ol.type-i { list-style-type: lower-roman; } ol.type-I { list-style-type: lower-roman; } /* Apply the print table and row borders in general, on request from the RPC, and increase the contrast between border and odd row background slightly */ table { border: 1px solid #ddd; } td { border-top: 1px solid #ddd; } tr { break-inside: avoid; } tr:nth-child(2n+1) > td { background-color: #f8f8f8; } /* Use style rules to govern display of the TOC. */ @media screen and (max-width: 1023px) { #toc nav { display: none; } #toc.active nav { display: block; } } /* Add support for keepWithNext */ .keepWithNext { break-after: avoid-page; break-after: avoid-page; } /* Add support for keepWithPrevious */ .keepWithPrevious { break-before: avoid-page; } /* Change the approach to avoiding breaks inside artwork etc. */ figure, pre, table, .artwork, .sourcecode { break-before: auto; break-after: auto; } /* Avoid breaks between <dt> and <dd> */ dl { break-before: auto; break-inside: auto; } dt { break-before: auto; break-after: avoid-page; } dd { break-before: avoid-page; break-after: auto; orphans: 3; widows: 3 } span.break, dd.break { margin-bottom: 0; min-height: 0; break-before: auto; break-inside: auto; break-after: auto; } /* Undo break-before ToC */ @media print { #toc { break-before: auto; } } /* Text in compact lists should not get extra bottom margin space, since that would makes the list not compact */ ul.compact p, .ulCompact p, ol.compact p, .olCompact p { margin: 0; } /* But the list as a whole needs the extra space at the end */ section ul.compact, section .ulCompact, section ol.compact, section .olCompact { margin-bottom: 1em; /* same as p not within ul.compact etc. */ } /* The tt and code background above interferes with for instance table cell backgrounds. Changed to something a bit more selective. */ tt, code { background-color: transparent; } p tt, p code, li tt, li code { background-color: #f8f8f8; } /* Tweak the pre margin -- 0px doesn't come out well */ pre { margin-top: 0.5px; } /* Tweak the compact list text */ ul.compact, .ulCompact, ol.compact, .olCompact, dl.compact, .dlCompact { line-height: normal; } /* Don't add top margin for nested lists */ li > ul, li > ol, li > dl, dd > ul, dd > ol, dd > dl, dl > dd > dl { margin-top: initial; } /* Elements that should not be rendered on the same line as a <dt> */ /* This should match the element list in writer.text.TextWriter.render_dl() */ dd > div.artwork:first-child, dd > aside:first-child, dd > figure:first-child, dd > ol:first-child, dd > div.sourcecode:first-child, dd > table:first-child, dd > ul:first-child { clear: left; } /* fix for weird browser behaviour when <dd/> is empty */ dt+dd:empty::before{ content: "\00a0"; } /* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */ li > p { margin-bottom: 0.5em } /* Don't let p margin spill out from inside list items */ li > p:last-of-type:only-child { margin-bottom: 0; } </style> <link href="rfc-local.css" rel="stylesheet" type="text/css"> <link href="https://dx.doi.org/10.17487/rfc9420" rel="alternate"> <link href="urn:issn:2070-1721" rel="alternate"> <link href="https://datatracker.ietf.org/doc/draft-ietf-mls-protocol-20" rel="prev"> </head> <body class="xml2rfc"> <script src="https://www.rfc-editor.org/js/metadata.min.js"></script> <table class="ears"> <thead><tr> <td class="left">RFC 9420</td> <td class="center">MLS</td> <td class="right">July 2023</td> </tr></thead> <tfoot><tr> <td class="left">Barnes, et al.</td> <td class="center">Standards Track</td> <td class="right">[Page]</td> </tr></tfoot> </table> <div id="external-metadata" class="document-information"></div> <div id="internal-metadata" class="document-information"> <dl id="identifiers"> <dt class="label-stream">Stream:</dt> <dd class="stream">Internet Engineering Task Force (IETF)</dd> <dt class="label-rfc">RFC:</dt> <dd class="rfc"><a href="https://www.rfc-editor.org/rfc/rfc9420" class="eref">9420</a></dd> <dt class="label-category">Category:</dt> <dd class="category">Standards Track</dd> <dt class="label-published">Published:</dt> <dd class="published"> <time datetime="2023-07" class="published">July 2023</time> </dd> <dt class="label-issn">ISSN:</dt> <dd class="issn">2070-1721</dd> <dt class="label-authors">Authors:</dt> <dd class="authors"> <div class="author"> <div class="author-name">R. Barnes</div> <div class="org">Cisco</div> </div> <div class="author"> <div class="author-name">B. Beurdouche</div> <div class="org">Inria & Mozilla</div> </div> <div class="author"> <div class="author-name">R. Robert</div> <div class="org">Phoenix R&D</div> </div> <div class="author"> <div class="author-name">J. Millican</div> <div class="org">Meta Platforms</div> </div> <div class="author"> <div class="author-name">E. Omara</div> </div> <div class="author"> <div class="author-name">K. Cohn-Gordon</div> <div class="org">University of Oxford</div> </div> </dd> </dl> </div> <h1 id="rfcnum">RFC 9420</h1> <h1 id="title">The Messaging Layer Security (MLS) Protocol</h1> <section id="section-abstract"> <h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2> <p id="section-abstract-1">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.<a href="#section-abstract-1" class="pilcrow">¶</a></p> </section> <div id="status-of-memo"> <section id="section-boilerplate.1"> <h2 id="name-status-of-this-memo"> <a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a> </h2> <p id="section-boilerplate.1-1"> This is an Internet Standards Track document.<a href="#section-boilerplate.1-1" class="pilcrow">¶</a></p> <p id="section-boilerplate.1-2"> This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.<a href="#section-boilerplate.1-2" class="pilcrow">¶</a></p> <p id="section-boilerplate.1-3"> Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <span><a href="https://www.rfc-editor.org/info/rfc9420">https://www.rfc-editor.org/info/rfc9420</a></span>.<a href="#section-boilerplate.1-3" class="pilcrow">¶</a></p> </section> </div> <div id="copyright"> <section id="section-boilerplate.2"> <h2 id="name-copyright-notice"> <a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a> </h2> <p id="section-boilerplate.2-1"> Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow">¶</a></p> <p id="section-boilerplate.2-2"> This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.<a href="#section-boilerplate.2-2" class="pilcrow">¶</a></p> </section> </div> <div id="toc"> <section id="section-toc.1"> <a href="#" onclick="scroll(0,0)" class="toplink">▲</a><h2 id="name-table-of-contents"> <a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a> </h2> <nav class="toc"><ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1"> <p id="section-toc.1-1.1.1" class="keepWithNext"><a href="#section-1" class="auto internal xref">1</a>. <a href="#name-introduction" class="internal xref">Introduction</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2"> <p id="section-toc.1-1.2.1"><a href="#section-2" class="auto internal xref">2</a>. <a href="#name-terminology" class="internal xref">Terminology</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1"> <p id="section-toc.1-1.2.2.1.1"><a href="#section-2.1" class="auto internal xref">2.1</a>. <a href="#name-presentation-language" class="internal xref">Presentation Language</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.1"> <p id="section-toc.1-1.2.2.1.2.1.1" class="keepWithNext"><a href="#section-2.1.1" class="auto internal xref">2.1.1</a>. <a href="#name-optional-value" class="internal xref">Optional Value</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.2"> <p id="section-toc.1-1.2.2.1.2.2.1" class="keepWithNext"><a href="#section-2.1.2" class="auto internal xref">2.1.2</a>. <a href="#name-variable-size-vector-length" class="internal xref">Variable-Size Vector Length Headers</a></p> </li> </ul> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3"> <p id="section-toc.1-1.3.1"><a href="#section-3" class="auto internal xref">3</a>. <a href="#name-protocol-overview" class="internal xref">Protocol Overview</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.1"> <p id="section-toc.1-1.3.2.1.1"><a href="#section-3.1" class="auto internal xref">3.1</a>. <a href="#name-cryptographic-state-and-evo" class="internal xref">Cryptographic State and Evolution</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2"> <p id="section-toc.1-1.3.2.2.1"><a href="#section-3.2" class="auto internal xref">3.2</a>. <a href="#name-example-protocol-execution" class="internal xref">Example Protocol Execution</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.3"> <p id="section-toc.1-1.3.2.3.1"><a href="#section-3.3" class="auto internal xref">3.3</a>. <a href="#name-external-joins" class="internal xref">External Joins</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.4"> <p id="section-toc.1-1.3.2.4.1"><a href="#section-3.4" class="auto internal xref">3.4</a>. <a href="#name-relationships-between-epoch" class="internal xref">Relationships between Epochs</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4"> <p id="section-toc.1-1.4.1"><a href="#section-4" class="auto internal xref">4</a>. <a href="#name-ratchet-tree-concepts" class="internal xref">Ratchet Tree Concepts</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1"> <p id="section-toc.1-1.4.2.1.1"><a href="#section-4.1" class="auto internal xref">4.1</a>. <a href="#name-ratchet-tree-terminology" class="internal xref">Ratchet Tree Terminology</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1.2.1"> <p id="section-toc.1-1.4.2.1.2.1.1"><a href="#section-4.1.1" class="auto internal xref">4.1.1</a>. <a href="#name-ratchet-tree-nodes" class="internal xref">Ratchet Tree Nodes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1.2.2"> <p id="section-toc.1-1.4.2.1.2.2.1"><a href="#section-4.1.2" class="auto internal xref">4.1.2</a>. <a href="#name-paths-through-a-ratchet-tre" class="internal xref">Paths through a Ratchet Tree</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.2"> <p id="section-toc.1-1.4.2.2.1"><a href="#section-4.2" class="auto internal xref">4.2</a>. <a href="#name-views-of-a-ratchet-tree" class="internal xref">Views of a Ratchet Tree</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5"> <p id="section-toc.1-1.5.1"><a href="#section-5" class="auto internal xref">5</a>. <a href="#name-cryptographic-objects" class="internal xref">Cryptographic Objects</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1"> <p id="section-toc.1-1.5.2.1.1"><a href="#section-5.1" class="auto internal xref">5.1</a>. <a href="#name-cipher-suites" class="internal xref">Cipher Suites</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1.2.1"> <p id="section-toc.1-1.5.2.1.2.1.1"><a href="#section-5.1.1" class="auto internal xref">5.1.1</a>. <a href="#name-public-keys" class="internal xref">Public Keys</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1.2.2"> <p id="section-toc.1-1.5.2.1.2.2.1"><a href="#section-5.1.2" class="auto internal xref">5.1.2</a>. <a href="#name-signing" class="internal xref">Signing</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.1.2.3"> <p id="section-toc.1-1.5.2.1.2.3.1"><a href="#section-5.1.3" class="auto internal xref">5.1.3</a>. <a href="#name-public-key-encryption" class="internal xref">Public Key Encryption</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.2"> <p id="section-toc.1-1.5.2.2.1"><a href="#section-5.2" class="auto internal xref">5.2</a>. <a href="#name-hash-based-identifiers" class="internal xref">Hash-Based Identifiers</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.3"> <p id="section-toc.1-1.5.2.3.1"><a href="#section-5.3" class="auto internal xref">5.3</a>. <a href="#name-credentials" class="internal xref">Credentials</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.3.2.1"> <p id="section-toc.1-1.5.2.3.2.1.1"><a href="#section-5.3.1" class="auto internal xref">5.3.1</a>. <a href="#name-credential-validation" class="internal xref">Credential Validation</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.3.2.2"> <p id="section-toc.1-1.5.2.3.2.2.1"><a href="#section-5.3.2" class="auto internal xref">5.3.2</a>. <a href="#name-credential-expiry-and-revoc" class="internal xref">Credential Expiry and Revocation</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5.2.3.2.3"> <p id="section-toc.1-1.5.2.3.2.3.1"><a href="#section-5.3.3" class="auto internal xref">5.3.3</a>. <a href="#name-uniquely-identifying-client" class="internal xref">Uniquely Identifying Clients</a></p> </li> </ul> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6"> <p id="section-toc.1-1.6.1"><a href="#section-6" class="auto internal xref">6</a>. <a href="#name-message-framing" class="internal xref">Message Framing</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.1"> <p id="section-toc.1-1.6.2.1.1"><a href="#section-6.1" class="auto internal xref">6.1</a>. <a href="#name-content-authentication" class="internal xref">Content Authentication</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.2"> <p id="section-toc.1-1.6.2.2.1"><a href="#section-6.2" class="auto internal xref">6.2</a>. <a href="#name-encoding-and-decoding-a-pub" class="internal xref">Encoding and Decoding a Public Message</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.3"> <p id="section-toc.1-1.6.2.3.1"><a href="#section-6.3" class="auto internal xref">6.3</a>. <a href="#name-encoding-and-decoding-a-pri" class="internal xref">Encoding and Decoding a Private Message</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.3.2.1"> <p id="section-toc.1-1.6.2.3.2.1.1"><a href="#section-6.3.1" class="auto internal xref">6.3.1</a>. <a href="#name-content-encryption" class="internal xref">Content Encryption</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.3.2.2"> <p id="section-toc.1-1.6.2.3.2.2.1"><a href="#section-6.3.2" class="auto internal xref">6.3.2</a>. <a href="#name-sender-data-encryption" class="internal xref">Sender Data Encryption</a></p> </li> </ul> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7"> <p id="section-toc.1-1.7.1"><a href="#section-7" class="auto internal xref">7</a>. <a href="#name-ratchet-tree-operations" class="internal xref">Ratchet Tree Operations</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1"> <p id="section-toc.1-1.7.2.1.1"><a href="#section-7.1" class="auto internal xref">7.1</a>. <a href="#name-parent-node-contents" class="internal xref">Parent Node Contents</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.2"> <p id="section-toc.1-1.7.2.2.1"><a href="#section-7.2" class="auto internal xref">7.2</a>. <a href="#name-leaf-node-contents" class="internal xref">Leaf Node Contents</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.3"> <p id="section-toc.1-1.7.2.3.1"><a href="#section-7.3" class="auto internal xref">7.3</a>. <a href="#name-leaf-node-validation" class="internal xref">Leaf Node Validation</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.4"> <p id="section-toc.1-1.7.2.4.1"><a href="#section-7.4" class="auto internal xref">7.4</a>. <a href="#name-ratchet-tree-evolution" class="internal xref">Ratchet Tree Evolution</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.5"> <p id="section-toc.1-1.7.2.5.1"><a href="#section-7.5" class="auto internal xref">7.5</a>. <a href="#name-synchronizing-views-of-the-" class="internal xref">Synchronizing Views of the Tree</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.6"> <p id="section-toc.1-1.7.2.6.1"><a href="#section-7.6" class="auto internal xref">7.6</a>. <a href="#name-update-paths" class="internal xref">Update Paths</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.7"> <p id="section-toc.1-1.7.2.7.1"><a href="#section-7.7" class="auto internal xref">7.7</a>. <a href="#name-adding-and-removing-leaves" class="internal xref">Adding and Removing Leaves</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.8"> <p id="section-toc.1-1.7.2.8.1"><a href="#section-7.8" class="auto internal xref">7.8</a>. <a href="#name-tree-hashes" class="internal xref">Tree Hashes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.9"> <p id="section-toc.1-1.7.2.9.1"><a href="#section-7.9" class="auto internal xref">7.9</a>. <a href="#name-parent-hashes" class="internal xref">Parent Hashes</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.9.2.1"> <p id="section-toc.1-1.7.2.9.2.1.1"><a href="#section-7.9.1" class="auto internal xref">7.9.1</a>. <a href="#name-using-parent-hashes" class="internal xref">Using Parent Hashes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.9.2.2"> <p id="section-toc.1-1.7.2.9.2.2.1"><a href="#section-7.9.2" class="auto internal xref">7.9.2</a>. <a href="#name-verifying-parent-hashes" class="internal xref">Verifying Parent Hashes</a></p> </li> </ul> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8"> <p id="section-toc.1-1.8.1"><a href="#section-8" class="auto internal xref">8</a>. <a href="#name-key-schedule" class="internal xref">Key Schedule</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.1"> <p id="section-toc.1-1.8.2.1.1"><a href="#section-8.1" class="auto internal xref">8.1</a>. <a href="#name-group-context" class="internal xref">Group Context</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.2"> <p id="section-toc.1-1.8.2.2.1"><a href="#section-8.2" class="auto internal xref">8.2</a>. <a href="#name-transcript-hashes" class="internal xref">Transcript Hashes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.3"> <p id="section-toc.1-1.8.2.3.1"><a href="#section-8.3" class="auto internal xref">8.3</a>. <a href="#name-external-initialization" class="internal xref">External Initialization</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.4"> <p id="section-toc.1-1.8.2.4.1"><a href="#section-8.4" class="auto internal xref">8.4</a>. <a href="#name-pre-shared-keys" class="internal xref">Pre-Shared Keys</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.5"> <p id="section-toc.1-1.8.2.5.1"><a href="#section-8.5" class="auto internal xref">8.5</a>. <a href="#name-exporters" class="internal xref">Exporters</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.6"> <p id="section-toc.1-1.8.2.6.1"><a href="#section-8.6" class="auto internal xref">8.6</a>. <a href="#name-resumption-psk" class="internal xref">Resumption PSK</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.7"> <p id="section-toc.1-1.8.2.7.1"><a href="#section-8.7" class="auto internal xref">8.7</a>. <a href="#name-epoch-authenticators" class="internal xref">Epoch Authenticators</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9"> <p id="section-toc.1-1.9.1"><a href="#section-9" class="auto internal xref">9</a>. <a href="#name-secret-tree" class="internal xref">Secret Tree</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.1"> <p id="section-toc.1-1.9.2.1.1"><a href="#section-9.1" class="auto internal xref">9.1</a>. <a href="#name-encryption-keys" class="internal xref">Encryption Keys</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.2"> <p id="section-toc.1-1.9.2.2.1"><a href="#section-9.2" class="auto internal xref">9.2</a>. <a href="#name-deletion-schedule" class="internal xref">Deletion Schedule</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10"> <p id="section-toc.1-1.10.1"><a href="#section-10" class="auto internal xref">10</a>. <a href="#name-key-packages" class="internal xref">Key Packages</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10.2.1"> <p id="section-toc.1-1.10.2.1.1"><a href="#section-10.1" class="auto internal xref">10.1</a>. <a href="#name-keypackage-validation" class="internal xref">KeyPackage Validation</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11"> <p id="section-toc.1-1.11.1"><a href="#section-11" class="auto internal xref">11</a>. <a href="#name-group-creation" class="internal xref">Group Creation</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.1"> <p id="section-toc.1-1.11.2.1.1"><a href="#section-11.1" class="auto internal xref">11.1</a>. <a href="#name-required-capabilities" class="internal xref">Required Capabilities</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.2"> <p id="section-toc.1-1.11.2.2.1"><a href="#section-11.2" class="auto internal xref">11.2</a>. <a href="#name-reinitialization" class="internal xref">Reinitialization</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.3"> <p id="section-toc.1-1.11.2.3.1"><a href="#section-11.3" class="auto internal xref">11.3</a>. <a href="#name-subgroup-branching" class="internal xref">Subgroup Branching</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12"> <p id="section-toc.1-1.12.1"><a href="#section-12" class="auto internal xref">12</a>. <a href="#name-group-evolution" class="internal xref">Group Evolution</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1"> <p id="section-toc.1-1.12.2.1.1"><a href="#section-12.1" class="auto internal xref">12.1</a>. <a href="#name-proposals" class="internal xref">Proposals</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.1"> <p id="section-toc.1-1.12.2.1.2.1.1"><a href="#section-12.1.1" class="auto internal xref">12.1.1</a>. <a href="#name-add" class="internal xref">Add</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.2"> <p id="section-toc.1-1.12.2.1.2.2.1"><a href="#section-12.1.2" class="auto internal xref">12.1.2</a>. <a href="#name-update" class="internal xref">Update</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.3"> <p id="section-toc.1-1.12.2.1.2.3.1"><a href="#section-12.1.3" class="auto internal xref">12.1.3</a>. <a href="#name-remove" class="internal xref">Remove</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.4"> <p id="section-toc.1-1.12.2.1.2.4.1"><a href="#section-12.1.4" class="auto internal xref">12.1.4</a>. <a href="#name-presharedkey" class="internal xref">PreSharedKey</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.5"> <p id="section-toc.1-1.12.2.1.2.5.1"><a href="#section-12.1.5" class="auto internal xref">12.1.5</a>. <a href="#name-reinit" class="internal xref">ReInit</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.6"> <p id="section-toc.1-1.12.2.1.2.6.1"><a href="#section-12.1.6" class="auto internal xref">12.1.6</a>. <a href="#name-externalinit" class="internal xref">ExternalInit</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.7"> <p id="section-toc.1-1.12.2.1.2.7.1"><a href="#section-12.1.7" class="auto internal xref">12.1.7</a>. <a href="#name-groupcontextextensions" class="internal xref">GroupContextExtensions</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1.2.8"> <p id="section-toc.1-1.12.2.1.2.8.1"><a href="#section-12.1.8" class="auto internal xref">12.1.8</a>. <a href="#name-external-proposals" class="internal xref">External Proposals</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.2"> <p id="section-toc.1-1.12.2.2.1"><a href="#section-12.2" class="auto internal xref">12.2</a>. <a href="#name-proposal-list-validation" class="internal xref">Proposal List Validation</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.3"> <p id="section-toc.1-1.12.2.3.1"><a href="#section-12.3" class="auto internal xref">12.3</a>. <a href="#name-applying-a-proposal-list" class="internal xref">Applying a Proposal List</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.4"> <p id="section-toc.1-1.12.2.4.1"><a href="#section-12.4" class="auto internal xref">12.4</a>. <a href="#name-commit" class="internal xref">Commit</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.4.2.1"> <p id="section-toc.1-1.12.2.4.2.1.1"><a href="#section-12.4.1" class="auto internal xref">12.4.1</a>. <a href="#name-creating-a-commit" class="internal xref">Creating a Commit</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.4.2.2"> <p id="section-toc.1-1.12.2.4.2.2.1"><a href="#section-12.4.2" class="auto internal xref">12.4.2</a>. <a href="#name-processing-a-commit" class="internal xref">Processing a Commit</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.4.2.3"> <p id="section-toc.1-1.12.2.4.2.3.1"><a href="#section-12.4.3" class="auto internal xref">12.4.3</a>. <a href="#name-adding-members-to-the-group" class="internal xref">Adding Members to the Group</a></p> </li> </ul> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13"> <p id="section-toc.1-1.13.1"><a href="#section-13" class="auto internal xref">13</a>. <a href="#name-extensibility" class="internal xref">Extensibility</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13.2.1"> <p id="section-toc.1-1.13.2.1.1"><a href="#section-13.1" class="auto internal xref">13.1</a>. <a href="#name-additional-cipher-suites" class="internal xref">Additional Cipher Suites</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13.2.2"> <p id="section-toc.1-1.13.2.2.1"><a href="#section-13.2" class="auto internal xref">13.2</a>. <a href="#name-proposals-2" class="internal xref">Proposals</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13.2.3"> <p id="section-toc.1-1.13.2.3.1"><a href="#section-13.3" class="auto internal xref">13.3</a>. <a href="#name-credential-extensibility" class="internal xref">Credential Extensibility</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13.2.4"> <p id="section-toc.1-1.13.2.4.1"><a href="#section-13.4" class="auto internal xref">13.4</a>. <a href="#name-extensions" class="internal xref">Extensions</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13.2.5"> <p id="section-toc.1-1.13.2.5.1"><a href="#section-13.5" class="auto internal xref">13.5</a>. <a href="#name-grease" class="internal xref">GREASE</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14"> <p id="section-toc.1-1.14.1"><a href="#section-14" class="auto internal xref">14</a>. <a href="#name-sequencing-of-state-changes" class="internal xref">Sequencing of State Changes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15"> <p id="section-toc.1-1.15.1"><a href="#section-15" class="auto internal xref">15</a>. <a href="#name-application-messages" class="internal xref">Application Messages</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.1"> <p id="section-toc.1-1.15.2.1.1"><a href="#section-15.1" class="auto internal xref">15.1</a>. <a href="#name-padding" class="internal xref">Padding</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.2"> <p id="section-toc.1-1.15.2.2.1"><a href="#section-15.2" class="auto internal xref">15.2</a>. <a href="#name-restrictions" class="internal xref">Restrictions</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.3"> <p id="section-toc.1-1.15.2.3.1"><a href="#section-15.3" class="auto internal xref">15.3</a>. <a href="#name-delayed-and-reordered-appli" class="internal xref">Delayed and Reordered Application Messages</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16"> <p id="section-toc.1-1.16.1"><a href="#section-16" class="auto internal xref">16</a>. <a href="#name-security-considerations" class="internal xref">Security Considerations</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.1"> <p id="section-toc.1-1.16.2.1.1"><a href="#section-16.1" class="auto internal xref">16.1</a>. <a href="#name-transport-security" class="internal xref">Transport Security</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.2"> <p id="section-toc.1-1.16.2.2.1"><a href="#section-16.2" class="auto internal xref">16.2</a>. <a href="#name-confidentiality-of-group-se" class="internal xref">Confidentiality of Group Secrets</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.3"> <p id="section-toc.1-1.16.2.3.1"><a href="#section-16.3" class="auto internal xref">16.3</a>. <a href="#name-confidentiality-of-sender-d" class="internal xref">Confidentiality of Sender Data</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.4"> <p id="section-toc.1-1.16.2.4.1"><a href="#section-16.4" class="auto internal xref">16.4</a>. <a href="#name-confidentiality-of-group-me" class="internal xref">Confidentiality of Group Metadata</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.4.2.1"> <p id="section-toc.1-1.16.2.4.2.1.1"><a href="#section-16.4.1" class="auto internal xref">16.4.1</a>. <a href="#name-groupid-epoch-and-message-f" class="internal xref">GroupID, Epoch, and Message Frequency</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.4.2.2"> <p id="section-toc.1-1.16.2.4.2.2.1"><a href="#section-16.4.2" class="auto internal xref">16.4.2</a>. <a href="#name-group-extensions" class="internal xref">Group Extensions</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.4.2.3"> <p id="section-toc.1-1.16.2.4.2.3.1"><a href="#section-16.4.3" class="auto internal xref">16.4.3</a>. <a href="#name-group-membership" class="internal xref">Group Membership</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.5"> <p id="section-toc.1-1.16.2.5.1"><a href="#section-16.5" class="auto internal xref">16.5</a>. <a href="#name-authentication" class="internal xref">Authentication</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.6"> <p id="section-toc.1-1.16.2.6.1"><a href="#section-16.6" class="auto internal xref">16.6</a>. <a href="#name-forward-secrecy-and-post-co" class="internal xref">Forward Secrecy and Post-Compromise Security</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.7"> <p id="section-toc.1-1.16.2.7.1"><a href="#section-16.7" class="auto internal xref">16.7</a>. <a href="#name-uniqueness-of-ratchet-tree-" class="internal xref">Uniqueness of Ratchet Tree Key Pairs</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.8"> <p id="section-toc.1-1.16.2.8.1"><a href="#section-16.8" class="auto internal xref">16.8</a>. <a href="#name-keypackage-reuse" class="internal xref">KeyPackage Reuse</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.9"> <p id="section-toc.1-1.16.2.9.1"><a href="#section-16.9" class="auto internal xref">16.9</a>. <a href="#name-delivery-service-compromise" class="internal xref">Delivery Service Compromise</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.10"> <p id="section-toc.1-1.16.2.10.1"><a href="#section-16.10" class="auto internal xref">16.10</a>. <a href="#name-authentication-service-comp" class="internal xref">Authentication Service Compromise</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.11"> <p id="section-toc.1-1.16.2.11.1"><a href="#section-16.11" class="auto internal xref">16.11</a>. <a href="#name-additional-policy-enforceme" class="internal xref">Additional Policy Enforcement</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16.2.12"> <p id="section-toc.1-1.16.2.12.1"><a href="#section-16.12" class="auto internal xref">16.12</a>. <a href="#name-group-fragmentation-by-mali" class="internal xref">Group Fragmentation by Malicious Insiders</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17"> <p id="section-toc.1-1.17.1"><a href="#section-17" class="auto internal xref">17</a>. <a href="#name-iana-considerations" class="internal xref">IANA Considerations</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.1"> <p id="section-toc.1-1.17.2.1.1"><a href="#section-17.1" class="auto internal xref">17.1</a>. <a href="#name-mls-cipher-suites" class="internal xref">MLS Cipher Suites</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.2"> <p id="section-toc.1-1.17.2.2.1"><a href="#section-17.2" class="auto internal xref">17.2</a>. <a href="#name-mls-wire-formats" class="internal xref">MLS Wire Formats</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.3"> <p id="section-toc.1-1.17.2.3.1"><a href="#section-17.3" class="auto internal xref">17.3</a>. <a href="#name-mls-extension-types" class="internal xref">MLS Extension Types</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.4"> <p id="section-toc.1-1.17.2.4.1"><a href="#section-17.4" class="auto internal xref">17.4</a>. <a href="#name-mls-proposal-types" class="internal xref">MLS Proposal Types</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.5"> <p id="section-toc.1-1.17.2.5.1"><a href="#section-17.5" class="auto internal xref">17.5</a>. <a href="#name-mls-credential-types" class="internal xref">MLS Credential Types</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.6"> <p id="section-toc.1-1.17.2.6.1"><a href="#section-17.6" class="auto internal xref">17.6</a>. <a href="#name-mls-signature-labels" class="internal xref">MLS Signature Labels</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.7"> <p id="section-toc.1-1.17.2.7.1"><a href="#section-17.7" class="auto internal xref">17.7</a>. <a href="#name-mls-public-key-encryption-l" class="internal xref">MLS Public Key Encryption Labels</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.8"> <p id="section-toc.1-1.17.2.8.1"><a href="#section-17.8" class="auto internal xref">17.8</a>. <a href="#name-mls-exporter-labels" class="internal xref">MLS Exporter Labels</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.9"> <p id="section-toc.1-1.17.2.9.1"><a href="#section-17.9" class="auto internal xref">17.9</a>. <a href="#name-mls-designated-expert-pool" class="internal xref">MLS Designated Expert Pool</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.17.2.10"> <p id="section-toc.1-1.17.2.10.1"><a href="#section-17.10" class="auto internal xref">17.10</a>. <a href="#name-the-message-mls-media-type" class="internal xref">The "message/mls" Media Type</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.18"> <p id="section-toc.1-1.18.1"><a href="#section-18" class="auto internal xref">18</a>. <a href="#name-references" class="internal xref">References</a></p> <ul class="compact toc ulBare ulEmpty"> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.18.2.1"> <p id="section-toc.1-1.18.2.1.1"><a href="#section-18.1" class="auto internal xref">18.1</a>. <a href="#name-normative-references" class="internal xref">Normative References</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.18.2.2"> <p id="section-toc.1-1.18.2.2.1"><a href="#section-18.2" class="auto internal xref">18.2</a>. <a href="#name-informative-references" class="internal xref">Informative References</a></p> </li> </ul> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.19"> <p id="section-toc.1-1.19.1"><a href="#appendix-A" class="auto internal xref">Appendix A</a>. <a href="#name-protocol-origins-of-example" class="internal xref">Protocol Origins of Example Trees</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.20"> <p id="section-toc.1-1.20.1"><a href="#appendix-B" class="auto internal xref">Appendix B</a>. <a href="#name-evolution-of-parent-hashes" class="internal xref">Evolution of Parent Hashes</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.21"> <p id="section-toc.1-1.21.1"><a href="#appendix-C" class="auto internal xref">Appendix C</a>. <a href="#name-array-based-trees" class="internal xref">Array-Based Trees</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.22"> <p id="section-toc.1-1.22.1"><a href="#appendix-D" class="auto internal xref">Appendix D</a>. <a href="#name-link-based-trees" class="internal xref">Link-Based Trees</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.23"> <p id="section-toc.1-1.23.1"><a href="#appendix-E" class="auto internal xref"></a><a href="#name-contributors" class="internal xref">Contributors</a></p> </li> <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.24"> <p id="section-toc.1-1.24.1"><a href="#appendix-F" class="auto internal xref"></a><a href="#name-authors-addresses" class="internal xref">Authors' Addresses</a></p> </li> </ul> </nav> </section> </div> <div id="introduction"> <section id="section-1"> <h2 id="name-introduction"> <a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a> </h2> <p id="section-1-1">A group of users who want to send each other encrypted messages needs a way to derive shared symmetric encryption keys. For two parties, this problem has been studied thoroughly, with the Double Ratchet emerging as a common solution <span>[<a href="#DoubleRatchet" class="cite xref">DoubleRatchet</a>]</span> <span>[<a href="#Signal" class="cite xref">Signal</a>]</span>. Channels implementing the Double Ratchet enjoy fine-grained forward secrecy as well as post-compromise security, but are nonetheless efficient enough for heavy use over low-bandwidth networks.<a href="#section-1-1" class="pilcrow">¶</a></p> <p id="section-1-2">For a group of size greater than two, a common strategy is to distribute symmetric "sender keys" over existing 1:1 secure channels, and then for each member to send messages to the group encrypted with their own sender key. On the one hand, using sender keys improves efficiency relative to pairwise transmission of individual messages, and it provides forward secrecy (with the addition of a hash ratchet). On the other hand, it is difficult to achieve post-compromise security with sender keys, requiring a number of key update messages that scales as the square of the group size. An adversary who learns a sender key can often indefinitely and passively eavesdrop on that member's messages. Generating and distributing a new sender key provides a form of post-compromise security with regard to that sender. However, it requires computation and communications resources that scale linearly with the size of the group.<a href="#section-1-2" class="pilcrow">¶</a></p> <p id="section-1-3">In this document, we describe a protocol based on tree structures that enables asynchronous group keying with forward secrecy and post-compromise security. Based on earlier work on "asynchronous ratcheting trees" <span>[<a href="#ART" class="cite xref">ART</a>]</span>, the protocol presented here uses an asynchronous key-encapsulation mechanism for tree structures. This mechanism allows the members of the group to derive and update shared keys with costs that scale as the log of the group size.<a href="#section-1-3" class="pilcrow">¶</a></p> </section> </div> <div id="terminology"> <section id="section-2"> <h2 id="name-terminology"> <a href="#section-2" class="section-number selfRef">2. </a><a href="#name-terminology" class="section-name selfRef">Terminology</a> </h2> <p id="section-2-1">The key words "<span class="bcp14">MUST</span>", "<span class="bcp14">MUST NOT</span>", "<span class="bcp14">REQUIRED</span>", "<span class="bcp14">SHALL</span>", "<span class="bcp14">SHALL NOT</span>", "<span class="bcp14">SHOULD</span>", "<span class="bcp14">SHOULD NOT</span>", "<span class="bcp14">RECOMMENDED</span>", "<span class="bcp14">NOT RECOMMENDED</span>", "<span class="bcp14">MAY</span>", and "<span class="bcp14">OPTIONAL</span>" in this document are to be interpreted as described in BCP 14 <span>[<a href="#RFC2119" class="cite xref">RFC2119</a>]</span> <span>[<a href="#RFC8174" class="cite xref">RFC8174</a>]</span> when, and only when, they appear in all capitals, as shown here.<a href="#section-2-1" class="pilcrow">¶</a></p> <span class="break"></span><dl class="dlParallel" id="section-2-2"> <dt id="section-2-2.1">Client:</dt> <dd style="margin-left: 1.5em" id="section-2-2.2">An agent that uses this protocol to establish shared cryptographic state with other clients. A client is defined by the cryptographic keys it holds.<a href="#section-2-2.2" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.3">Group:</dt> <dd style="margin-left: 1.5em" id="section-2-2.4">A group represents a logical collection of clients that share a common secret value at any given time. Its state is represented as a linear sequence of epochs in which each epoch depends on its predecessor.<a href="#section-2-2.4" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.5">Epoch:</dt> <dd style="margin-left: 1.5em" id="section-2-2.6">A state of a group in which a specific set of authenticated clients hold shared cryptographic state.<a href="#section-2-2.6" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.7">Member:</dt> <dd style="margin-left: 1.5em" id="section-2-2.8">A client that is included in the shared state of a group and hence has access to the group's secrets.<a href="#section-2-2.8" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.9">Key Package:</dt> <dd style="margin-left: 1.5em" id="section-2-2.10">A signed object describing a client's identity and capabilities, including a hybrid public key encryption (HPKE) <span>[<a href="#RFC9180" class="cite xref">RFC9180</a>]</span> public key that can be used to encrypt to that client. Other clients can use a client's KeyPackage to introduce the client to a new group.<a href="#section-2-2.10" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.11">Group Context:</dt> <dd style="margin-left: 1.5em" id="section-2-2.12">An object that summarizes the shared, public state of the group. The group context is typically distributed in a signed GroupInfo message, which is provided to new members to help them join a group.<a href="#section-2-2.12" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.13">Signature Key:</dt> <dd style="margin-left: 1.5em" id="section-2-2.14">A signing key pair used to authenticate the sender of a message.<a href="#section-2-2.14" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.15">Proposal:</dt> <dd style="margin-left: 1.5em" id="section-2-2.16">A message that proposes a change to the group, e.g., adding or removing a member.<a href="#section-2-2.16" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.17">Commit:</dt> <dd style="margin-left: 1.5em" id="section-2-2.18">A message that implements the changes to the group proposed in a set of Proposals.<a href="#section-2-2.18" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.19">PublicMessage:</dt> <dd style="margin-left: 1.5em" id="section-2-2.20">An MLS protocol message that is signed by its sender and authenticated as coming from a member of the group in a particular epoch, but not encrypted.<a href="#section-2-2.20" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.21">PrivateMessage:</dt> <dd style="margin-left: 1.5em" id="section-2-2.22">An MLS protocol message that is signed by its sender, authenticated as coming from a member of the group in a particular epoch, and encrypted so that it is confidential to the members of the group in that epoch.<a href="#section-2-2.22" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.23">Handshake Message:</dt> <dd style="margin-left: 1.5em" id="section-2-2.24">A PublicMessage or PrivateMessage carrying an MLS Proposal or Commit object, as opposed to application data.<a href="#section-2-2.24" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-2-2.25">Application Message:</dt> <dd style="margin-left: 1.5em" id="section-2-2.26">A PrivateMessage carrying application data.<a href="#section-2-2.26" class="pilcrow">¶</a> </dd> <dd class="break"></dd> </dl> <p id="section-2-3">Terminology specific to tree computations is described in <a href="#ratchet-tree-terminology" class="auto internal xref">Section 4.1</a>.<a href="#section-2-3" class="pilcrow">¶</a></p> <p id="section-2-4">In general, symmetric values are referred to as "keys" or "secrets" interchangeably. Either term denotes a value that <span class="bcp14">MUST</span> be kept confidential to a client. When labeling individual values, we typically use "secret" to refer to a value that is used to derive further secret values and "key" to refer to a value that is used with an algorithm such as Hashed Message Authentication Code (HMAC) or an Authenticated Encryption with Associated Data (AEAD) algorithm.<a href="#section-2-4" class="pilcrow">¶</a></p> <p id="section-2-5">The PublicMessage and PrivateMessage formats are defined in <a href="#message-framing" class="auto internal xref">Section 6</a>. Security notions such as forward secrecy and post-compromise security are defined in <a href="#security-considerations" class="auto internal xref">Section 16</a>.<a href="#section-2-5" class="pilcrow">¶</a></p> <p id="section-2-6">As detailed in <a href="#grease" class="auto internal xref">Section 13.5</a>, MLS uses the "Generate Random Extensions And Sustain Extensibility" (GREASE) approach to maintaining extensibility, where senders insert random values into fields in which receivers are required to ignore unknown values. Specific "GREASE values" for this purpose are registered in the appropriate IANA registries.<a href="#section-2-6" class="pilcrow">¶</a></p> <div id="presentation-language"> <section id="section-2.1"> <h3 id="name-presentation-language"> <a href="#section-2.1" class="section-number selfRef">2.1. </a><a href="#name-presentation-language" class="section-name selfRef">Presentation Language</a> </h3> <p id="section-2.1-1">We use the TLS presentation language <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span> to describe the structure of protocol messages. In addition to the base syntax, we add two additional features: the ability for fields to be optional and the ability for vectors to have variable-size length headers.<a href="#section-2.1-1" class="pilcrow">¶</a></p> <div id="optional-value"> <section id="section-2.1.1"> <h4 id="name-optional-value"> <a href="#section-2.1.1" class="section-number selfRef">2.1.1. </a><a href="#name-optional-value" class="section-name selfRef">Optional Value</a> </h4> <p id="section-2.1.1-1">An optional value is encoded with a presence-signaling octet, followed by the value itself if present. When decoding, a presence octet with a value other than 0 or 1 <span class="bcp14">MUST</span> be rejected as malformed.<a href="#section-2.1.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-2.1.1-2"> <pre> struct { uint8 present; select (present) { case 0: struct{}; case 1: T value; }; } optional<T>; </pre><a href="#section-2.1.1-2" class="pilcrow">¶</a> </div> </section> </div> <div id="variable-size-vector-length-headers"> <section id="section-2.1.2"> <h4 id="name-variable-size-vector-length"> <a href="#section-2.1.2" class="section-number selfRef">2.1.2. </a><a href="#name-variable-size-vector-length" class="section-name selfRef">Variable-Size Vector Length Headers</a> </h4> <p id="section-2.1.2-1">In the TLS presentation language, vectors are encoded as a sequence of encoded elements prefixed with a length. The length field has a fixed size set by specifying the minimum and maximum lengths of the encoded sequence of elements.<a href="#section-2.1.2-1" class="pilcrow">¶</a></p> <p id="section-2.1.2-2">In MLS, there are several vectors whose sizes vary over significant ranges. So instead of using a fixed-size length field, we use a variable-size length using a variable-length integer encoding based on the one described in <span><a href="https://www.rfc-editor.org/rfc/rfc9000#section-16" class="relref">Section 16</a> of [<a href="#RFC9000" class="cite xref">RFC9000</a>]</span>. They differ only in that the one here requires a minimum-size encoding. Instead of presenting min and max values, the vector description simply includes a <code>V</code>. For example:<a href="#section-2.1.2-2" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-2.1.2-3"> <pre> struct { uint32 fixed<0..255>; opaque variable<V>; } StructWithVectors; </pre><a href="#section-2.1.2-3" class="pilcrow">¶</a> </div> <p id="section-2.1.2-4">Such a vector can represent values with length from 0 bytes to 2<sup>30</sup> bytes. The variable-length integer encoding reserves the two most significant bits of the first byte to encode the base 2 logarithm of the integer encoding length in bytes. The integer value is encoded on the remaining bits, so that the overall value is in network byte order. The encoded value <span class="bcp14">MUST</span> use the smallest number of bits required to represent the value. When decoding, values using more bits than necessary <span class="bcp14">MUST</span> be treated as malformed.<a href="#section-2.1.2-4" class="pilcrow">¶</a></p> <p id="section-2.1.2-5">This means that integers are encoded in 1, 2, or 4 bytes and can encode 6-, 14-, or 30-bit values, respectively.<a href="#section-2.1.2-5" class="pilcrow">¶</a></p> <span id="name-summary-of-integer-encoding"></span><div id="integer-summary"> <table class="center" id="table-1"> <caption> <a href="#table-1" class="selfRef">Table 1</a>: <a href="#name-summary-of-integer-encoding" class="selfRef">Summary of Integer Encodings</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Prefix</th> <th class="text-left" rowspan="1" colspan="1">Length</th> <th class="text-left" rowspan="1" colspan="1">Usable Bits</th> <th class="text-left" rowspan="1" colspan="1">Min</th> <th class="text-left" rowspan="1" colspan="1">Max</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">00</td> <td class="text-left" rowspan="1" colspan="1">1</td> <td class="text-left" rowspan="1" colspan="1">6</td> <td class="text-left" rowspan="1" colspan="1">0</td> <td class="text-left" rowspan="1" colspan="1">63</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">01</td> <td class="text-left" rowspan="1" colspan="1">2</td> <td class="text-left" rowspan="1" colspan="1">14</td> <td class="text-left" rowspan="1" colspan="1">64</td> <td class="text-left" rowspan="1" colspan="1">16383</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">10</td> <td class="text-left" rowspan="1" colspan="1">4</td> <td class="text-left" rowspan="1" colspan="1">30</td> <td class="text-left" rowspan="1" colspan="1">16384</td> <td class="text-left" rowspan="1" colspan="1">1073741823</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">11</td> <td class="text-left" rowspan="1" colspan="1">invalid</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> </tr> </tbody> </table> </div> <p id="section-2.1.2-7">Vectors that start with the prefix "11" are invalid and <span class="bcp14">MUST</span> be rejected.<a href="#section-2.1.2-7" class="pilcrow">¶</a></p> <p id="section-2.1.2-8">For example:<a href="#section-2.1.2-8" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-2.1.2-9.1">The four-byte length value 0x9d7f3e7d decodes to 494878333.<a href="#section-2.1.2-9.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-2.1.2-9.2">The two-byte length value 0x7bbd decodes to 15293.<a href="#section-2.1.2-9.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-2.1.2-9.3">The single-byte length value 0x25 decodes to 37.<a href="#section-2.1.2-9.3" class="pilcrow">¶</a> </li> </ul> <p id="section-2.1.2-10">The following figure adapts the pseudocode provided in <span>[<a href="#RFC9000" class="cite xref">RFC9000</a>]</span> to add a check for minimum-length encoding:<a href="#section-2.1.2-10" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-2.1.2-11"> <pre> ReadVarint(data): // The length of variable-length integers is encoded in the // first two bits of the first byte. v = data.next_byte() prefix = v >> 6 if prefix == 3: raise Exception('invalid variable length integer prefix') length = 1 << prefix // Once the length is known, remove these bits and read any // remaining bytes. v = v & 0x3f repeat length-1 times: v = (v << 8) + data.next_byte() // Check if the value would fit in half the provided length. if prefix >= 1 && v < (1 << (8*(length/2) - 2)): raise Exception('minimum encoding was not used') return v </pre><a href="#section-2.1.2-11" class="pilcrow">¶</a> </div> <p id="section-2.1.2-12">The use of variable-size integers for vector lengths allows vectors to grow very large, up to 2<sup>30</sup> bytes. Implementations should take care not to allow vectors to overflow available storage. To facilitate debugging of potential interoperability problems, implementations <span class="bcp14">SHOULD</span> provide a clear error when such an overflow condition occurs.<a href="#section-2.1.2-12" class="pilcrow">¶</a></p> </section> </div> </section> </div> </section> </div> <div id="protocol-overview"> <section id="section-3"> <h2 id="name-protocol-overview"> <a href="#section-3" class="section-number selfRef">3. </a><a href="#name-protocol-overview" class="section-name selfRef">Protocol Overview</a> </h2> <p id="section-3-1">MLS is designed to operate in the context described in <span>[<a href="#I-D.ietf-mls-architecture" class="cite xref">MLS-ARCH</a>]</span>. In particular, we assume that the following services are provided:<a href="#section-3-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-3-2.1">An Authentication Service (AS) that enables group members to authenticate the credentials presented by other group members.<a href="#section-3-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3-2.2">A Delivery Service (DS) that routes MLS messages among the participants in the protocol.<a href="#section-3-2.2" class="pilcrow">¶</a> </li> </ul> <p id="section-3-3">MLS assumes a trusted AS but a largely untrusted DS. <a href="#authentication-service-compromise" class="auto internal xref">Section 16.10</a> describes the impact of compromise or misbehavior of an AS. MLS is designed to protect the confidentiality and integrity of the group data even in the face of a compromised DS; in general, the DS is only expected to reliably deliver messages. <a href="#delivery-service-compromise" class="auto internal xref">Section 16.9</a> describes the impact of compromise or misbehavior of a DS.<a href="#section-3-3" class="pilcrow">¶</a></p> <p id="section-3-4">The core functionality of MLS is continuous group authenticated key exchange (AKE). As with other authenticated key exchange protocols (such as TLS), the participants in the protocol agree on a common secret value, and each participant can verify the identity of the other participants. That secret can then be used to protect messages sent from one participant in the group to the other participants using the MLS framing layer or can be exported for use with other protocols. MLS provides group AKE in the sense that there can be more than two participants in the protocol, and continuous group AKE in the sense that the set of participants in the protocol can change over time.<a href="#section-3-4" class="pilcrow">¶</a></p> <p id="section-3-5">The core organizing principles of MLS are <em>groups</em> and <em>epochs</em>. A group represents a logical collection of clients that share a common secret value at any given time. The history of a group is divided into a linear sequence of epochs. In each epoch, a set of authenticated <em>members</em> agree on an <em>epoch secret</em> that is known only to the members of the group in that epoch. The set of members involved in the group can change from one epoch to the next, and MLS ensures that only the members in the current epoch have access to the epoch secret. From the epoch secret, members derive further shared secrets for message encryption, group membership authentication, and so on.<a href="#section-3-5" class="pilcrow">¶</a></p> <p id="section-3-6">The creator of an MLS group creates the group's first epoch unilaterally, with no protocol interactions. Thereafter, the members of the group advance their shared cryptographic state from one epoch to another by exchanging MLS messages.<a href="#section-3-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-3-7.1">A <em>KeyPackage</em> object describes a client's capabilities and provides keys that can be used to add the client to a group.<a href="#section-3-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3-7.2">A <em>Proposal</em> message proposes a change to be made in the next epoch, such as adding or removing a member.<a href="#section-3-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-3-7.3">A <em>Commit</em> message initiates a new epoch by instructing members of the group to implement a collection of proposals.<a href="#section-3-7.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-3-7.4">A <em>Welcome</em> message provides a new member to the group with the information to initialize their state for the epoch in which they were added or in which they want to add themselves to the group.<a href="#section-3-7.4" class="pilcrow">¶</a> </li> </ul> <p id="section-3-8">KeyPackage and Welcome messages are used to initiate a group or introduce new members, so they are exchanged between group members and clients not yet in the group. A client publishes a KeyPackage via the DS, thus enabling other clients to add it to groups. When a group member wants to add a new member to a group, it uses the new member's KeyPackage to add them and constructs a Welcome message with which the new member can initialize their local state.<a href="#section-3-8" class="pilcrow">¶</a></p> <p id="section-3-9">Proposal and Commit messages are sent from one member of a group to the others. MLS provides a common framing layer for sending messages within a group: A <em>PublicMessage</em> provides sender authentication for unencrypted Proposal and Commit messages. A <em>PrivateMessage</em> provides encryption and authentication for both Proposal/Commit messages as well as any application data.<a href="#section-3-9" class="pilcrow">¶</a></p> <div id="cryptographic-state-and-evolution"> <section id="section-3.1"> <h3 id="name-cryptographic-state-and-evo"> <a href="#section-3.1" class="section-number selfRef">3.1. </a><a href="#name-cryptographic-state-and-evo" class="section-name selfRef">Cryptographic State and Evolution</a> </h3> <p id="section-3.1-1">The cryptographic state at the core of MLS is divided into three areas of responsibility:<a href="#section-3.1-1" class="pilcrow">¶</a></p> <span id="name-overview-of-mls-group-evolu"></span><figure id="figure-1"> <div id="section-3.1-2.1"> <div class="alignLeft art-svg artwork" id="section-3.1-2.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="400" text-anchor="middle" version="1.1" viewBox="0 0 584 400" width="584"> <path d="M 8,128 L 8,288" fill="none" stroke="black"></path> <path d="M 208,48 L 208,200" fill="none" stroke="black"></path> <path d="M 208,216 L 208,368" fill="none" stroke="black"></path> <path d="M 272,64 L 272,96" fill="none" stroke="black"></path> <path d="M 272,120 L 272,192" fill="none" stroke="black"></path> <path d="M 272,216 L 272,288" fill="none" stroke="black"></path> <path d="M 272,312 L 272,352" fill="none" stroke="black"></path> <path d="M 336,48 L 336,200" fill="none" stroke="black"></path> <path d="M 336,216 L 336,368" fill="none" stroke="black"></path> <path d="M 576,128 L 576,288" fill="none" stroke="black"></path> <path d="M 48,208 L 72,208" fill="none" stroke="black"></path> <path d="M 200,208 L 216,208" fill="none" stroke="black"></path> <path d="M 336,208 L 352,208" fill="none" stroke="black"></path> <path d="M 512,208 L 528,208" fill="none" stroke="black"></path> <path d="M 8,128 L 48,208" fill="none" stroke="black"></path> <path d="M 536,208 L 576,288" fill="none" stroke="black"></path> <path d="M 8,288 L 48,208" fill="none" stroke="black"></path> <path d="M 536,208 L 576,128" fill="none" stroke="black"></path> <path d="M 224,32 C 215.16936,32 208,39.16936 208,48" fill="none" stroke="black"></path> <path d="M 320,32 C 328.83064,32 336,39.16936 336,48" fill="none" stroke="black"></path> <path d="M 224,384 C 215.16936,384 208,376.83064 208,368" fill="none" stroke="black"></path> <path d="M 320,384 C 328.83064,384 336,376.83064 336,368" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="536,208 524,202.4 524,213.6" transform="rotate(0,528,208)"></polygon> <polygon class="arrowhead" fill="black" points="360,208 348,202.4 348,213.6" transform="rotate(0,352,208)"></polygon> <polygon class="arrowhead" fill="black" points="280,352 268,346.4 268,357.6" transform="rotate(90,272,352)"></polygon> <polygon class="arrowhead" fill="black" points="280,288 268,282.4 268,293.6" transform="rotate(90,272,288)"></polygon> <polygon class="arrowhead" fill="black" points="280,192 268,186.4 268,197.6" transform="rotate(90,272,192)"></polygon> <polygon class="arrowhead" fill="black" points="280,96 268,90.4 268,101.6" transform="rotate(90,272,96)"></polygon> <polygon class="arrowhead" fill="black" points="224,208 212,202.4 212,213.6" transform="rotate(0,216,208)"></polygon> <polygon class="arrowhead" fill="black" points="80,208 68,202.4 68,213.6" transform="rotate(0,72,208)"></polygon> <g class="text"> <text x="272" y="36">...</text> <text x="360" y="84">Key</text> <text x="412" y="84">Schedule</text> <text x="276" y="116">epoch_secret</text> <text x="56" y="148">Ratchet</text> <text x="532" y="148">Secret</text> <text x="52" y="164">Tree</text> <text x="532" y="164">Tree</text> <text x="136" y="212">commit_secret</text> <text x="276" y="212">epoch_secret</text> <text x="432" y="212">encryption_secret</text> <text x="276" y="308">epoch_secret</text> <text x="272" y="388">...</text> </g> </svg><a href="#section-3.1-2.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-1" class="selfRef">Figure 1</a>: <a href="#name-overview-of-mls-group-evolu" class="selfRef">Overview of MLS Group Evolution</a> </figcaption></figure> <ul class="normal"> <li class="normal" id="section-3.1-3.1">A <em>ratchet tree</em> that represents the membership of the group, providing group members a way to authenticate each other and efficiently encrypt messages to subsets of the group. Each epoch has a distinct ratchet tree. It seeds the <em>key schedule</em>.<a href="#section-3.1-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.1-3.2"> <p id="section-3.1-3.2.1">A <em>key schedule</em> that describes the chain of key derivations used to progress from epoch to epoch (mainly using the <em>init_secret</em> and <em>epoch_secret</em>), as well as the derivation of a variety of other secrets (see <a href="#epoch-derived-secrets" class="auto internal xref">Table 4</a>). For example:<a href="#section-3.1-3.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-3.1-3.2.2.1">An <em>encryption secret</em> that is used to initialize the secret tree for the epoch.<a href="#section-3.1-3.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.1-3.2.2.2">An <em>exporter secret</em> that allows other protocols to leverage MLS as a generic authenticated group key exchange.<a href="#section-3.1-3.2.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.1-3.2.2.3">A <em>resumption secret</em> that members can use to prove their membership in the group, e.g., when creating a subgroup or a successor group.<a href="#section-3.1-3.2.2.3" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-3.1-3.3">A <em>secret tree</em> derived from the key schedule that represents shared secrets used by the members of the group for encrypting and authenticating messages. Each epoch has a distinct secret tree.<a href="#section-3.1-3.3" class="pilcrow">¶</a> </li> </ul> <p id="section-3.1-4">Each member of the group maintains a partial view of these components of the group's state. MLS messages are used to initialize these views and keep them in sync as the group transitions between epochs.<a href="#section-3.1-4" class="pilcrow">¶</a></p> <p id="section-3.1-5">Each new epoch is initiated with a Commit message. The Commit instructs existing members of the group to update their views of the ratchet tree by applying a set of Proposals, and uses the updated ratchet tree to distribute fresh entropy to the group. This fresh entropy is provided only to members in the new epoch and not to members who have been removed. Commits thus maintain the property that the epoch secret is confidential to the members in the current epoch.<a href="#section-3.1-5" class="pilcrow">¶</a></p> <p id="section-3.1-6">For each Commit that adds one or more members to the group, there are one or more corresponding Welcome messages. Each Welcome message provides new members with the information they need to initialize their views of the key schedule and ratchet tree, so that these views align with the views held by other members of the group in this epoch.<a href="#section-3.1-6" class="pilcrow">¶</a></p> </section> </div> <div id="example-protocol-execution"> <section id="section-3.2"> <h3 id="name-example-protocol-execution"> <a href="#section-3.2" class="section-number selfRef">3.2. </a><a href="#name-example-protocol-execution" class="section-name selfRef">Example Protocol Execution</a> </h3> <p id="section-3.2-1">There are three major operations in the life of a group:<a href="#section-3.2-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-3.2-2.1">Adding a member, initiated by a current member;<a href="#section-3.2-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.2-2.2">Updating the keys that represent a member in the tree; and<a href="#section-3.2-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.2-2.3">Removing a member.<a href="#section-3.2-2.3" class="pilcrow">¶</a> </li> </ul> <p id="section-3.2-3">Each of these operations is "proposed" by sending a message of the corresponding type (Add / Update / Remove). The state of the group is not changed, however, until a Commit message is sent to provide the group with fresh entropy. In this section, we show each proposal being committed immediately, but in more advanced deployment cases, an application might gather several proposals before committing them all at once. In the illustrations below, we show the Proposal and Commit messages directly, while in reality they would be sent encapsulated in PublicMessage or PrivateMessage objects.<a href="#section-3.2-3" class="pilcrow">¶</a></p> <p id="section-3.2-4">Before the initialization of a group, clients publish KeyPackages to a directory provided by the DS (see <a href="#prepublish-flow" class="auto internal xref">Figure 2</a>).<a href="#section-3.2-4" class="pilcrow">¶</a></p> <span id="name-clients-a-b-and-c-publish-k"></span><div id="prepublish-flow"> <figure id="figure-2"> <div id="section-3.2-5.1"> <div class="alignLeft art-svg artwork" id="section-3.2-5.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="288" text-anchor="middle" version="1.1" viewBox="0 0 568 288" width="568"> <path d="M 8,128 L 8,272" fill="none" stroke="black"></path> <path d="M 144,128 L 144,152" fill="none" stroke="black"></path> <path d="M 144,168 L 144,272" fill="none" stroke="black"></path> <path d="M 280,128 L 280,152" fill="none" stroke="black"></path> <path d="M 280,168 L 280,200" fill="none" stroke="black"></path> <path d="M 280,216 L 280,272" fill="none" stroke="black"></path> <path d="M 416,128 L 416,272" fill="none" stroke="black"></path> <path d="M 536,128 L 536,272" fill="none" stroke="black"></path> <path d="M 400,64 L 456,64" fill="none" stroke="black"></path> <path d="M 488,64 L 544,64" fill="none" stroke="black"></path> <path d="M 8,160 L 408,160" fill="none" stroke="black"></path> <path d="M 144,208 L 408,208" fill="none" stroke="black"></path> <path d="M 280,256 L 408,256" fill="none" stroke="black"></path> <path d="M 400,64 C 391.16936,64 384,71.16936 384,80" fill="none" stroke="black"></path> <path d="M 456,64 C 464.83064,64 472,56.83064 472,48" fill="none" stroke="black"></path> <path d="M 488,64 C 479.16936,64 472,56.83064 472,48" fill="none" stroke="black"></path> <path d="M 544,64 C 552.83064,64 560,71.16936 560,80" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="416,256 404,250.4 404,261.6" transform="rotate(0,408,256)"></polygon> <polygon class="arrowhead" fill="black" points="416,208 404,202.4 404,213.6" transform="rotate(0,408,208)"></polygon> <polygon class="arrowhead" fill="black" points="416,160 404,154.4 404,165.6" transform="rotate(0,408,160)"></polygon> <g class="text"> <text x="436" y="36">Delivery</text> <text x="504" y="36">Service</text> <text x="528" y="100">Group</text> <text x="8" y="116">A</text> <text x="144" y="116">B</text> <text x="280" y="116">C</text> <text x="416" y="116">Directory</text> <text x="536" y="116">Channel</text> <text x="64" y="148">KeyPackageA</text> <text x="200" y="196">KeyPackageB</text> <text x="336" y="244">KeyPackageC</text> </g> </svg><a href="#section-3.2-5.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-2" class="selfRef">Figure 2</a>: <a href="#name-clients-a-b-and-c-publish-k" class="selfRef">Clients A, B, and C publish KeyPackages to the directory</a> </figcaption></figure> </div> <p id="section-3.2-6"><a href="#create-flow" class="auto internal xref">Figure 3</a> shows how these pre-published KeyPackages are used to create a group. When client A wants to establish a group with clients B and C, it first initializes a group state containing only itself and downloads KeyPackages for B and C. For each member, A generates an Add proposal and a Commit message to add that member and then broadcasts the two messages to the group. Client A also generates a Welcome message and sends it directly to the new member (there's no need to send it to the group). Only after A has received its Commit message back from the Delivery Service does it update its state to reflect the new member's addition.<a href="#section-3.2-6" class="pilcrow">¶</a></p> <p id="section-3.2-7">Once A has updated its state, the new member has processed the Welcome, and any other group members have processed the Commit, they will all have consistent representations of the group state, including a group secret that is known only to the members the group. The new member will be able to read and send new messages to the group, but messages sent before they were added to the group will not be accessible.<a href="#section-3.2-7" class="pilcrow">¶</a></p> <span id="name-client-a-creates-a-group-wi"></span><div id="create-flow"> <figure id="figure-3"> <div id="section-3.2-8.1"> <div class="alignLeft art-svg artwork" id="section-3.2-8.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="512" text-anchor="middle" version="1.1" viewBox="0 0 560 512" width="560"> <path d="M 8,64 L 8,496" fill="none" stroke="black"></path> <path d="M 128,104 L 128,152" fill="none" stroke="black"></path> <path d="M 128,168 L 128,264" fill="none" stroke="black"></path> <path d="M 128,280 L 128,344" fill="none" stroke="black"></path> <path d="M 128,360 L 128,392" fill="none" stroke="black"></path> <path d="M 128,408 L 128,456" fill="none" stroke="black"></path> <path d="M 128,472 L 128,496" fill="none" stroke="black"></path> <path d="M 248,104 L 248,152" fill="none" stroke="black"></path> <path d="M 248,168 L 248,264" fill="none" stroke="black"></path> <path d="M 248,280 L 248,344" fill="none" stroke="black"></path> <path d="M 248,360 L 248,456" fill="none" stroke="black"></path> <path d="M 368,64 L 368,152" fill="none" stroke="black"></path> <path d="M 368,168 L 368,264" fill="none" stroke="black"></path> <path d="M 368,280 L 368,344" fill="none" stroke="black"></path> <path d="M 368,360 L 368,456" fill="none" stroke="black"></path> <path d="M 528,64 L 528,496" fill="none" stroke="black"></path> <path d="M 16,96 L 368,96" fill="none" stroke="black"></path> <path d="M 8,160 L 520,160" fill="none" stroke="black"></path> <path d="M 8,208 L 120,208" fill="none" stroke="black"></path> <path d="M 16,272 L 528,272" fill="none" stroke="black"></path> <path d="M 8,352 L 520,352" fill="none" stroke="black"></path> <path d="M 8,400 L 240,400" fill="none" stroke="black"></path> <path d="M 16,464 L 528,464" fill="none" stroke="black"></path> <path d="M 136,480 L 528,480" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="528,352 516,346.4 516,357.6" transform="rotate(0,520,352)"></polygon> <polygon class="arrowhead" fill="black" points="528,160 516,154.4 516,165.6" transform="rotate(0,520,160)"></polygon> <polygon class="arrowhead" fill="black" points="248,400 236,394.4 236,405.6" transform="rotate(0,240,400)"></polygon> <polygon class="arrowhead" fill="black" points="144,480 132,474.4 132,485.6" transform="rotate(180,136,480)"></polygon> <polygon class="arrowhead" fill="black" points="128,208 116,202.4 116,213.6" transform="rotate(0,120,208)"></polygon> <polygon class="arrowhead" fill="black" points="24,464 12,458.4 12,469.6" transform="rotate(180,16,464)"></polygon> <polygon class="arrowhead" fill="black" points="24,272 12,266.4 12,277.6" transform="rotate(180,16,272)"></polygon> <polygon class="arrowhead" fill="black" points="24,96 12,90.4 12,101.6" transform="rotate(180,16,96)"></polygon> <g class="text"> <text x="528" y="36">Group</text> <text x="8" y="52">A</text> <text x="128" y="52">B</text> <text x="248" y="52">C</text> <text x="368" y="52">Directory</text> <text x="528" y="52">Channel</text> <text x="128" y="68">|</text> <text x="248" y="68">|</text> <text x="132" y="84">KeyPackageB,</text> <text x="232" y="84">KeyPackageC</text> <text x="420" y="132">Add(A->AB)</text> <text x="424" y="148">Commit(Add)</text> <text x="68" y="196">Welcome(B)</text> <text x="420" y="244">Add(A->AB)</text> <text x="424" y="260">Commit(Add)</text> <text x="428" y="324">Add(AB->ABC)</text> <text x="424" y="340">Commit(Add)</text> <text x="188" y="388">Welcome(C)</text> <text x="428" y="436">Add(AB->ABC)</text> <text x="424" y="452">Commit(Add)</text> <text x="248" y="500">|</text> <text x="368" y="500">|</text> </g> </svg><a href="#section-3.2-8.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-3" class="selfRef">Figure 3</a>: <a href="#name-client-a-creates-a-group-wi" class="selfRef">Client A creates a group with clients B and C</a> </figcaption></figure> </div> <p id="section-3.2-9">Subsequent additions of group members proceed in the same way. Any member of the group can download a KeyPackage for a new client, broadcast Add and Commit messages that the current group will use to update their state, and send a Welcome message that the new client can use to initialize its state and join the group.<a href="#section-3.2-9" class="pilcrow">¶</a></p> <p id="section-3.2-10">To enforce the forward secrecy and post-compromise security of messages, each member periodically updates the keys that represent them to the group. A member does this by sending a Commit (possibly with no proposals) or by sending an Update message that is committed by another member (see <a href="#update-flow" class="auto internal xref">Figure 4</a>). Once the other members of the group have processed these messages, the group's secrets will be unknown to an attacker that had compromised the secrets corresponding to the sender's leaf in the tree. At the end of the scenario shown in <a href="#update-flow" class="auto internal xref">Figure 4</a>, the group has post-compromise security with respect to both A and B.<a href="#section-3.2-10" class="pilcrow">¶</a></p> <p id="section-3.2-11">Update messages <span class="bcp14">SHOULD</span> be sent at regular intervals of time as long as the group is active, and members that don't update <span class="bcp14">SHOULD</span> eventually be removed from the group. It's left to the application to determine an appropriate amount of time between Updates. Since the purpose of sending an Update is to proactively constrain a compromise window, the right frequency is usually on the order of hours or days, not milliseconds. For example, an application might send an Update each time a member sends an application message after receiving any message from another member, or daily if no application messages are sent.<a href="#section-3.2-11" class="pilcrow">¶</a></p> <p id="section-3.2-12">The MLS architecture recommends that MLS be operated over a secure transport (see <span><a href="https://datatracker.ietf.org/doc/html/draft-ietf-mls-architecture-10#section-7.1" class="relref">Section 7.1</a> of [<a href="#I-D.ietf-mls-architecture" class="cite xref">MLS-ARCH</a>]</span>). Such transport protocols will typically provide functions such as congestion control that manage the impact of an MLS-using application on other applications sharing the same network. Applications should take care that they do not send MLS messages at a rate that will cause problems such as network congestion, especially if they are not following the above recommendation (e.g., sending MLS directly over UDP instead).<a href="#section-3.2-12" class="pilcrow">¶</a></p> <span id="name-client-b-proposes-to-update"></span><div id="update-flow"> <figure id="figure-4"> <div id="section-3.2-13.1"> <div class="alignLeft art-svg artwork" id="section-3.2-13.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="304" text-anchor="middle" version="1.1" viewBox="0 0 528 304" width="528"> <path d="M 8,64 L 8,288" fill="none" stroke="black"></path> <path d="M 128,64 L 128,120" fill="none" stroke="black"></path> <path d="M 128,136 L 128,200" fill="none" stroke="black"></path> <path d="M 128,248 L 128,288" fill="none" stroke="black"></path> <path d="M 248,64 L 248,88" fill="none" stroke="black"></path> <path d="M 248,152 L 248,200" fill="none" stroke="black"></path> <path d="M 248,264 L 248,288" fill="none" stroke="black"></path> <path d="M 368,64 L 368,88" fill="none" stroke="black"></path> <path d="M 368,168 L 368,200" fill="none" stroke="black"></path> <path d="M 488,64 L 488,288" fill="none" stroke="black"></path> <path d="M 128,96 L 480,96" fill="none" stroke="black"></path> <path d="M 16,128 L 488,128" fill="none" stroke="black"></path> <path d="M 136,144 L 488,144" fill="none" stroke="black"></path> <path d="M 256,160 L 488,160" fill="none" stroke="black"></path> <path d="M 8,208 L 480,208" fill="none" stroke="black"></path> <path d="M 16,240 L 488,240" fill="none" stroke="black"></path> <path d="M 136,256 L 488,256" fill="none" stroke="black"></path> <path d="M 256,272 L 488,272" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="488,208 476,202.4 476,213.6" transform="rotate(0,480,208)"></polygon> <polygon class="arrowhead" fill="black" points="488,96 476,90.4 476,101.6" transform="rotate(0,480,96)"></polygon> <polygon class="arrowhead" fill="black" points="264,272 252,266.4 252,277.6" transform="rotate(180,256,272)"></polygon> <polygon class="arrowhead" fill="black" points="264,160 252,154.4 252,165.6" transform="rotate(180,256,160)"></polygon> <polygon class="arrowhead" fill="black" points="144,256 132,250.4 132,261.6" transform="rotate(180,136,256)"></polygon> <polygon class="arrowhead" fill="black" points="144,144 132,138.4 132,149.6" transform="rotate(180,136,144)"></polygon> <polygon class="arrowhead" fill="black" points="24,240 12,234.4 12,245.6" transform="rotate(180,16,240)"></polygon> <polygon class="arrowhead" fill="black" points="24,128 12,122.4 12,133.6" transform="rotate(180,16,128)"></polygon> <g class="text"> <text x="488" y="36">Group</text> <text x="8" y="52">A</text> <text x="128" y="52">B</text> <text x="184" y="52">...</text> <text x="248" y="52">Z</text> <text x="368" y="52">Directory</text> <text x="496" y="52">Channel</text> <text x="176" y="84">Update(B)</text> <text x="248" y="116">|</text> <text x="368" y="116">|</text> <text x="416" y="116">Update(B)</text> <text x="64" y="196">Commit(Upd)</text> <text x="128" y="228">|</text> <text x="248" y="228">|</text> <text x="368" y="228">|</text> <text x="424" y="228">Commit(Upd)</text> <text x="368" y="292">|</text> </g> </svg><a href="#section-3.2-13.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-4" class="selfRef">Figure 4</a>: <a href="#name-client-b-proposes-to-update" class="selfRef">Client B proposes to update its key, and client A commits the proposal</a> </figcaption></figure> </div> <p id="section-3.2-14">Members are removed from the group in a similar way, as shown in <a href="#remove-flow" class="auto internal xref">Figure 5</a>. Any member of the group can send a Remove proposal followed by a Commit message. The Commit message provides new entropy to all members of the group except the removed member. This new entropy is added to the epoch secret for the new epoch so that it is not known to the removed member. Note that this does not necessarily imply that any member is actually allowed to evict other members; groups can enforce access control policies on top of these basic mechanisms.<a href="#section-3.2-14" class="pilcrow">¶</a></p> <span id="name-client-z-removes-client-b-f"></span><div id="remove-flow"> <figure id="figure-5"> <div id="section-3.2-15.1"> <div class="alignLeft art-svg artwork" id="section-3.2-15.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="240" text-anchor="middle" version="1.1" viewBox="0 0 520 240" width="520"> <path d="M 8,64 L 8,224" fill="none" stroke="black"></path> <path d="M 128,64 L 128,168" fill="none" stroke="black"></path> <path d="M 128,184 L 128,224" fill="none" stroke="black"></path> <path d="M 248,64 L 248,168" fill="none" stroke="black"></path> <path d="M 248,200 L 248,224" fill="none" stroke="black"></path> <path d="M 368,64 L 368,104" fill="none" stroke="black"></path> <path d="M 368,120 L 368,168" fill="none" stroke="black"></path> <path d="M 488,64 L 488,224" fill="none" stroke="black"></path> <path d="M 248,112 L 480,112" fill="none" stroke="black"></path> <path d="M 16,176 L 488,176" fill="none" stroke="black"></path> <path d="M 136,192 L 488,192" fill="none" stroke="black"></path> <path d="M 256,208 L 488,208" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="488,112 476,106.4 476,117.6" transform="rotate(0,480,112)"></polygon> <polygon class="arrowhead" fill="black" points="264,208 252,202.4 252,213.6" transform="rotate(180,256,208)"></polygon> <polygon class="arrowhead" fill="black" points="144,192 132,186.4 132,197.6" transform="rotate(180,136,192)"></polygon> <polygon class="arrowhead" fill="black" points="24,176 12,170.4 12,181.6" transform="rotate(180,16,176)"></polygon> <g class="text"> <text x="488" y="36">Group</text> <text x="8" y="52">A</text> <text x="128" y="52">B</text> <text x="184" y="52">...</text> <text x="248" y="52">Z</text> <text x="368" y="52">Directory</text> <text x="488" y="52">Channel</text> <text x="296" y="84">Remove(B)</text> <text x="304" y="100">Commit(Rem)</text> <text x="416" y="148">Remove(B)</text> <text x="424" y="164">Commit(Rem)</text> <text x="368" y="228">|</text> </g> </svg><a href="#section-3.2-15.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-5" class="selfRef">Figure 5</a>: <a href="#name-client-z-removes-client-b-f" class="selfRef">Client Z removes client B from the group</a> </figcaption></figure> </div> <p id="section-3.2-16">Note that the flows in this section are examples; applications can arrange message flows in other ways. For example:<a href="#section-3.2-16" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-3.2-17.1">Welcome messages don't necessarily need to be sent directly to new joiners. Since they are encrypted to new joiners, they could be distributed more broadly, say if the application only had access to a broadcast channel for the group.<a href="#section-3.2-17.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.2-17.2">Proposal messages don't need to be immediately sent to all group members. They need to be available to the committer before generating a Commit, and to other members before processing the Commit.<a href="#section-3.2-17.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-3.2-17.3">The sender of a Commit doesn't necessarily have to wait to receive its own Commit back before advancing its state. It only needs to know that its Commit will be the next one applied by the group, say based on a promise from an orchestration server.<a href="#section-3.2-17.3" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="external-joins"> <section id="section-3.3"> <h3 id="name-external-joins"> <a href="#section-3.3" class="section-number selfRef">3.3. </a><a href="#name-external-joins" class="section-name selfRef">External Joins</a> </h3> <p id="section-3.3-1">In addition to the Welcome-based flow for adding a new member to the group, it is also possible for a new member to join by means of an "external Commit". This mechanism can be used when the existing members don't have a KeyPackage for the new member, for example, in the case of an "open" group that can be joined by new members without asking permission from existing members.<a href="#section-3.3-1" class="pilcrow">¶</a></p> <p id="section-3.3-2"><a href="#groupinfo-flow" class="auto internal xref">Figure 6</a> shows a typical message flow for an external join. To enable a new member to join the group in this way, a member of the group (A, B) publishes a GroupInfo object that includes the GroupContext for the group as well as a public key that can be used to encrypt a secret to the existing members of the group. When the new member Z wishes to join, they download the GroupInfo object and use it to form a Commit of a special form that adds Z to the group (as detailed in <a href="#joining-via-external-commits" class="auto internal xref">Section 12.4.3.2</a>). The existing members of the group process this external Commit in a similar way to a normal Commit, advancing to a new epoch in which Z is now a member of the group.<a href="#section-3.3-2" class="pilcrow">¶</a></p> <span id="name-client-a-publishes-a-groupi"></span><div id="groupinfo-flow"> <figure id="figure-6"> <div class="alignLeft art-text artwork" id="section-3.3-3.1"> <pre> Group A B Z Directory Channel | | | | | | GroupInfo | | | | +------------------------------------------->| | | | | GroupInfo | | | | |<-------------+ | | | | | | | | | Commit(ExtZ) | | | | +---------------------------->| | | | | Commit(ExtZ) | |<----------------------------------------------------------+ | |<-------------------------------------------+ | | |<----------------------------+ | | | | | </pre> </div> <figcaption><a href="#figure-6" class="selfRef">Figure 6</a>: <a href="#name-client-a-publishes-a-groupi" class="selfRef">Client A publishes a GroupInfo object, and Client Z uses it to join the group</a> </figcaption></figure> </div> </section> </div> <div id="relationships-between-epochs"> <section id="section-3.4"> <h3 id="name-relationships-between-epoch"> <a href="#section-3.4" class="section-number selfRef">3.4. </a><a href="#name-relationships-between-epoch" class="section-name selfRef">Relationships between Epochs</a> </h3> <p id="section-3.4-1">A group has a single linear sequence of epochs. Groups and epochs are generally independent of one another. However, it can sometimes be useful to link epochs cryptographically, either within a group or across groups. MLS derives a resumption pre-shared key (PSK) from each epoch to allow entropy extracted from one epoch to be injected into a future epoch. A group member that wishes to inject a PSK issues a PreSharedKey proposal (<a href="#presharedkey" class="auto internal xref">Section 12.1.4</a>) describing the PSK to be injected. When this proposal is committed, the corresponding PSK will be incorporated into the key schedule as described in <a href="#pre-shared-keys" class="auto internal xref">Section 8.4</a>.<a href="#section-3.4-1" class="pilcrow">¶</a></p> <p id="section-3.4-2">Linking epochs in this way guarantees that members entering the new epoch agree on a key if and only if they were members of the group during the epoch from which the resumption key was extracted.<a href="#section-3.4-2" class="pilcrow">¶</a></p> <p id="section-3.4-3">MLS supports two ways to tie a new group to an existing group, which are illustrated in Figures <a href="#psk-reinit" class="auto internal xref">7</a> and <a href="#psk-branch" class="auto internal xref">8</a>. Reinitialization closes one group and creates a new group comprising the same members with different parameters. Branching starts a new group with a subset of the original group's participants (with no effect on the original group). In both cases, the new group is linked to the old group via a resumption PSK.<a href="#section-3.4-3" class="pilcrow">¶</a></p> <span id="name-reinitializing-a-group"></span><div id="psk-reinit"> <figure id="figure-7"> <div id="section-3.4-4.1"> <div class="alignLeft art-svg artwork" id="section-3.4-4.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="240" text-anchor="middle" version="1.1" viewBox="0 0 272 240" width="272"> <path d="M 48,40 L 48,112" fill="none" stroke="black"></path> <path d="M 224,136 L 224,208" fill="none" stroke="black"></path> <path d="M 56,80 L 72,80" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="232,208 220,202.4 220,213.6" transform="rotate(90,224,208)"></polygon> <polygon class="arrowhead" fill="black" points="64,80 52,74.4 52,85.6" transform="rotate(180,56,80)"></polygon> <polygon class="arrowhead" fill="black" points="56,112 44,106.4 44,117.6" transform="rotate(90,48,112)"></polygon> <g class="text"> <text x="56" y="36">epoch_A_[n-1]</text> <text x="108" y="84">ReInit</text> <text x="48" y="132">epoch_A_[n]</text> <text x="224" y="132">epoch_B_[0]</text> <text x="48" y="148">.</text> <text x="48" y="164">.</text> <text x="136" y="164">PSK(usage=reinit)</text> <text x="132" y="180">.....................></text> <text x="224" y="228">epoch_B_[1]</text> </g> </svg><a href="#section-3.4-4.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-7" class="selfRef">Figure 7</a>: <a href="#name-reinitializing-a-group" class="selfRef">Reinitializing a Group</a> </figcaption></figure> </div> <span id="name-branching-a-group"></span><div id="psk-branch"> <figure id="figure-8"> <div id="section-3.4-5.1"> <div class="alignLeft art-svg artwork" id="section-3.4-5.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="144" text-anchor="middle" version="1.1" viewBox="0 0 272 144" width="272"> <path d="M 48,40 L 48,112" fill="none" stroke="black"></path> <path d="M 224,40 L 224,112" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="232,112 220,106.4 220,117.6" transform="rotate(90,224,112)"></polygon> <polygon class="arrowhead" fill="black" points="56,112 44,106.4 44,117.6" transform="rotate(90,48,112)"></polygon> <g class="text"> <text x="48" y="36">epoch_A_[n]</text> <text x="224" y="36">epoch_B_[0]</text> <text x="136" y="68">PSK(usage=branch)</text> <text x="136" y="84">....................></text> <text x="56" y="132">epoch_A_[n+1]</text> <text x="224" y="132">epoch_B_[1]</text> </g> </svg><a href="#section-3.4-5.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-8" class="selfRef">Figure 8</a>: <a href="#name-branching-a-group" class="selfRef">Branching a Group</a> </figcaption></figure> </div> <p id="section-3.4-6">Applications may also choose to use resumption PSKs to link epochs in other ways. For example, <a href="#psk-reinject" class="auto internal xref">Figure 9</a> shows a case where a resumption PSK from epoch <code>n</code> is injected into epoch <code>n+k</code>. This demonstrates that the members of the group at epoch <code>n+k</code> were also members at epoch <code>n</code>, irrespective of any changes to these members' keys due to Updates or Commits.<a href="#section-3.4-6" class="pilcrow">¶</a></p> <span id="name-reinjecting-entropy-from-an"></span><div id="psk-reinject"> <figure id="figure-9"> <div id="section-3.4-7.1"> <div class="alignLeft art-svg artwork" id="section-3.4-7.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="304" text-anchor="middle" version="1.1" viewBox="0 0 248 304" width="248"> <path d="M 48,40 L 48,176" fill="none" stroke="black"></path> <path d="M 48,200 L 48,272" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="56,272 44,266.4 44,277.6" transform="rotate(90,48,272)"></polygon> <polygon class="arrowhead" fill="black" points="56,176 44,170.4 44,181.6" transform="rotate(90,48,176)"></polygon> <g class="text"> <text x="48" y="36">epoch_A_[n]</text> <text x="156" y="68">PSK(usage=application)</text> <text x="136" y="84">.....................</text> <text x="216" y="100">.</text> <text x="216" y="116">.</text> <text x="40" y="132">.</text> <text x="56" y="132">.</text> <text x="216" y="132">...</text> <text x="216" y="148">.</text> <text x="216" y="164">.</text> <text x="216" y="180">.</text> <text x="64" y="196">epoch_A_[n+k-1]</text> <text x="216" y="196">.</text> <text x="216" y="212">.</text> <text x="216" y="228">.</text> <text x="136" y="244"><....................</text> <text x="56" y="292">epoch_A_[n+k]</text> </g> </svg><a href="#section-3.4-7.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-9" class="selfRef">Figure 9</a>: <a href="#name-reinjecting-entropy-from-an" class="selfRef">Reinjecting Entropy from an Earlier Epoch</a> </figcaption></figure> </div> </section> </div> </section> </div> <div id="ratchet-tree-concepts"> <section id="section-4"> <h2 id="name-ratchet-tree-concepts"> <a href="#section-4" class="section-number selfRef">4. </a><a href="#name-ratchet-tree-concepts" class="section-name selfRef">Ratchet Tree Concepts</a> </h2> <p id="section-4-1">The protocol uses "ratchet trees" for deriving shared secrets among a group of clients. A ratchet tree is an arrangement of secrets and key pairs among the members of a group in a way that allows for secrets to be efficiently updated to reflect changes in the group.<a href="#section-4-1" class="pilcrow">¶</a></p> <p id="section-4-2">Ratchet trees allow a group to efficiently remove any member by encrypting new entropy to a subset of the group. A ratchet tree assigns shared keys to subgroups of the overall group, so that, for example, encrypting to all but one member of the group requires only <code>log(N)</code> encryptions to subtrees, instead of the <code>N-1</code> encryptions that would be needed to encrypt to each participant individually (where N is the number of members in the group).<a href="#section-4-2" class="pilcrow">¶</a></p> <p id="section-4-3">This remove operation allows MLS to efficiently achieve post-compromise security. In an Update proposal or a full Commit message, an old (possibly compromised) representation of a member is efficiently removed from the group and replaced with a freshly generated instance.<a href="#section-4-3" class="pilcrow">¶</a></p> <div id="ratchet-tree-terminology"> <section id="section-4.1"> <h3 id="name-ratchet-tree-terminology"> <a href="#section-4.1" class="section-number selfRef">4.1. </a><a href="#name-ratchet-tree-terminology" class="section-name selfRef">Ratchet Tree Terminology</a> </h3> <p id="section-4.1-1">Trees consist of <em>nodes</em>. A node is a <em>leaf</em> if it has no children; otherwise, it is a <em>parent</em>. All parents in our trees have precisely two children, a <em>left</em> child and a <em>right</em> child. A node is the <em>root</em> of a tree if it has no parent, and <em>intermediate</em> if it has both children and a parent. The <em>descendants</em> of a node are that node's children, and the descendants of its children. We say a tree <em>contains</em> a node if that node is a descendant of the root of the tree, or if the node itself is the root of the tree. Nodes are <em>siblings</em> if they share the same parent.<a href="#section-4.1-1" class="pilcrow">¶</a></p> <p id="section-4.1-2">A <em>subtree</em> of a tree is the tree given by any node (the <em>head</em> of the subtree) and its descendants. The <em>size</em> of a tree or subtree is the number of leaf nodes it contains. For a given parent node, its <em>left subtree</em> is the subtree with its left child as head and its <em>right subtree</em> is the subtree with its right child as head.<a href="#section-4.1-2" class="pilcrow">¶</a></p> <p id="section-4.1-3">Every tree used in this protocol is a perfect binary tree, that is, a complete balanced binary tree with 2<sup>d</sup> leaves all at the same depth <code>d</code>. This structure is unique for a given depth <code>d</code>.<a href="#section-4.1-3" class="pilcrow">¶</a></p> <p id="section-4.1-4">There are multiple ways that an implementation might represent a ratchet tree in memory. A convenient property of left-balanced binary trees (including the complete trees used here) is that they can be represented as an array of nodes, with node relationships computed based on the nodes' indices in the array. A more traditional representation based on linked node objects may also be used. Appendices <a href="#array-based-trees" class="auto internal xref">C</a> and <a href="#link-based-trees" class="auto internal xref">D</a> provide some details on how to implement the tree operations required for MLS in these representations. MLS places no requirements on implementations' internal representations of ratchet trees. An implementation may use any tree representation and associated algorithms, as long as they produce correct protocol messages.<a href="#section-4.1-4" class="pilcrow">¶</a></p> <div id="ratchet-tree-nodes"> <section id="section-4.1.1"> <h4 id="name-ratchet-tree-nodes"> <a href="#section-4.1.1" class="section-number selfRef">4.1.1. </a><a href="#name-ratchet-tree-nodes" class="section-name selfRef">Ratchet Tree Nodes</a> </h4> <p id="section-4.1.1-1">Each leaf node in a ratchet tree is given an <em>index</em> (or <em>leaf index</em>), starting at 0 from the left to 2<sup>d</sup> - 1 at the right (for a tree with 2<sup>d</sup> leaves). A tree with 2<sup>d</sup> leaves has 2<sup>d+1</sup> - 1 nodes, including parent nodes.<a href="#section-4.1.1-1" class="pilcrow">¶</a></p> <p id="section-4.1.1-2">Each node in a ratchet tree is either <em>blank</em> (containing no value) or it holds an HPKE public key with some associated data:<a href="#section-4.1.1-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-4.1.1-3.1">A public key (for the HPKE scheme in use; see <a href="#cipher-suites" class="auto internal xref">Section 5.1</a>)<a href="#section-4.1.1-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-3.2">A credential (only for leaf nodes; see <a href="#credentials" class="auto internal xref">Section 5.3</a>)<a href="#section-4.1.1-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-3.3">An ordered list of "unmerged" leaves (see <a href="#views" class="auto internal xref">Section 4.2</a>)<a href="#section-4.1.1-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-3.4">A hash of certain information about the node's parent, as of the last time the node was changed (see <a href="#parent-hashes" class="auto internal xref">Section 7.9</a>).<a href="#section-4.1.1-3.4" class="pilcrow">¶</a> </li> </ul> <p id="section-4.1.1-4">As described in <a href="#views" class="auto internal xref">Section 4.2</a>, different members know different subsets of the set of private keys corresponding to the public keys in nodes in the tree. The private key corresponding to a parent node is known only to members at leaf nodes that are descendants of that node. The private key corresponding to a leaf node is known only to the member at that leaf node. A leaf node is <em>unmerged</em> relative to one of its ancestor nodes if the member at the leaf node does not know the private key corresponding to the ancestor node.<a href="#section-4.1.1-4" class="pilcrow">¶</a></p> <p id="section-4.1.1-5">Every node, regardless of whether the node is blank or populated, has a corresponding <em>hash</em> that summarizes the contents of the subtree below that node. The rules for computing these hashes are described in <a href="#tree-hashes" class="auto internal xref">Section 7.8</a>.<a href="#section-4.1.1-5" class="pilcrow">¶</a></p> <p id="section-4.1.1-6">The <em>resolution</em> of a node is an ordered list of non-blank nodes that collectively cover all non-blank descendants of the node. The resolution of the root contains the set of keys that are collectively necessary to encrypt to every node in the group. The resolution of a node is effectively a depth-first, left-first enumeration of the nearest non-blank nodes below the node:<a href="#section-4.1.1-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-4.1.1-7.1">The resolution of a non-blank node comprises the node itself, followed by its list of unmerged leaves, if any.<a href="#section-4.1.1-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-7.2">The resolution of a blank leaf node is the empty list.<a href="#section-4.1.1-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-7.3">The resolution of a blank intermediate node is the result of concatenating the resolution of its left child with the resolution of its right child, in that order.<a href="#section-4.1.1-7.3" class="pilcrow">¶</a> </li> </ul> <p id="section-4.1.1-8">For example, consider the following subtree, where the <code>_</code> character represents a blank node and unmerged leaves are indicated in square brackets:<a href="#section-4.1.1-8" class="pilcrow">¶</a></p> <span id="name-a-tree-with-blanks-and-unme"></span><div id="resolution-tree"> <figure id="figure-10"> <div class="alignLeft art-ascii-art art-text artwork" id="section-4.1.1-9.1"> <pre> ... / _ ______|______ / \ X[B] _ __|__ __|__ / \ / \ _ _ Y _ / \ / \ / \ / \ A B _ D E F _ H 0 1 2 3 4 5 6 7 </pre> </div> <figcaption><a href="#figure-10" class="selfRef">Figure 10</a>: <a href="#name-a-tree-with-blanks-and-unme" class="selfRef">A Tree with Blanks and Unmerged Leaves</a> </figcaption></figure> </div> <p id="section-4.1.1-10">In this tree, we can see all of the above rules in play:<a href="#section-4.1.1-10" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-4.1.1-11.1">The resolution of node X is the list [X, B].<a href="#section-4.1.1-11.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-11.2">The resolution of leaf 2 or leaf 6 is the empty list [].<a href="#section-4.1.1-11.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-4.1.1-11.3">The resolution of top node is the list [X, B, Y, H].<a href="#section-4.1.1-11.3" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="paths-through-a-ratchet-tree"> <section id="section-4.1.2"> <h4 id="name-paths-through-a-ratchet-tre"> <a href="#section-4.1.2" class="section-number selfRef">4.1.2. </a><a href="#name-paths-through-a-ratchet-tre" class="section-name selfRef">Paths through a Ratchet Tree</a> </h4> <p id="section-4.1.2-1">The <em>direct path</em> of a root is the empty list. The direct path of any other node is the concatenation of that node's parent along with the parent's direct path.<a href="#section-4.1.2-1" class="pilcrow">¶</a></p> <p id="section-4.1.2-2">The <em>copath</em> of a node is the node's sibling concatenated with the list of siblings of all the nodes in its direct path, excluding the root.<a href="#section-4.1.2-2" class="pilcrow">¶</a></p> <p id="section-4.1.2-3">The <em>filtered direct path</em> of a leaf node L is the node's direct path, with any node removed whose child on the copath of L has an empty resolution (keeping in mind that any unmerged leaves of the copath child count toward its resolution). The removed nodes do not need their own key pairs because encrypting to the node's key pair would be equivalent to encrypting to its non-copath child.<a href="#section-4.1.2-3" class="pilcrow">¶</a></p> <p id="section-4.1.2-4">For example, consider the following tree (where blank nodes are indicated with <code>_</code>, but also assigned a label for reference):<a href="#section-4.1.2-4" class="pilcrow">¶</a></p> <span id="name-a-complete-tree-with-five-m"></span><div id="full-tree"> <figure id="figure-11"> <div id="section-4.1.2-5.1"> <div class="alignLeft art-svg artwork" id="section-4.1.2-5.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="240" text-anchor="middle" version="1.1" viewBox="0 0 256 240" width="256"> <path d="M 56,104 L 56,128" fill="none" stroke="black"></path> <path d="M 120,48 L 120,64" fill="none" stroke="black"></path> <path d="M 184,112 L 184,128" fill="none" stroke="black"></path> <path d="M 72,64 L 168,64" fill="none" stroke="black"></path> <path d="M 40,128 L 72,128" fill="none" stroke="black"></path> <path d="M 168,128 L 200,128" fill="none" stroke="black"></path> <path d="M 72,128 L 80,144" fill="none" stroke="black"></path> <path d="M 92,168 L 96,176" fill="none" stroke="black"></path> <path d="M 168,64 L 176,80" fill="none" stroke="black"></path> <path d="M 200,128 L 208,144" fill="none" stroke="black"></path> <path d="M 220,168 L 224,176" fill="none" stroke="black"></path> <path d="M 32,144 L 40,128" fill="none" stroke="black"></path> <path d="M 64,80 L 72,64" fill="none" stroke="black"></path> <path d="M 80,176 L 84,168" fill="none" stroke="black"></path> <path d="M 160,144 L 168,128" fill="none" stroke="black"></path> <path d="M 208,176 L 212,168" fill="none" stroke="black"></path> <g class="text"> <text x="120" y="36">W</text> <text x="136" y="36">=</text> <text x="164" y="36">root</text> <text x="64" y="100">_=U</text> <text x="184" y="100">Y</text> <text x="24" y="164">T</text> <text x="96" y="164">_=V</text> <text x="152" y="164">X</text> <text x="224" y="164">_=Z</text> <text x="16" y="180">/</text> <text x="32" y="180">\</text> <text x="144" y="180">/</text> <text x="160" y="180">\</text> <text x="8" y="196">A</text> <text x="40" y="196">B</text> <text x="72" y="196">_</text> <text x="104" y="196">_</text> <text x="136" y="196">E</text> <text x="168" y="196">F</text> <text x="200" y="196">G</text> <text x="240" y="196">_=H</text> <text x="8" y="228">0</text> <text x="40" y="228">1</text> <text x="72" y="228">2</text> <text x="104" y="228">3</text> <text x="136" y="228">4</text> <text x="168" y="228">5</text> <text x="200" y="228">6</text> <text x="232" y="228">7</text> </g> </svg><a href="#section-4.1.2-5.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-11" class="selfRef">Figure 11</a>: <a href="#name-a-complete-tree-with-five-m" class="selfRef">A Complete Tree with Five Members, with Labels for Blank Parent Nodes</a> </figcaption></figure> </div> <p id="section-4.1.2-6">In this tree, the direct paths, copaths, and filtered direct paths for the leaf nodes are as follows:<a href="#section-4.1.2-6" class="pilcrow">¶</a></p> <table class="center" id="table-2"> <caption><a href="#table-2" class="selfRef">Table 2</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Node</th> <th class="text-left" rowspan="1" colspan="1">Direct path</th> <th class="text-left" rowspan="1" colspan="1">Copath</th> <th class="text-left" rowspan="1" colspan="1">Filtered Direct Path</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">A</td> <td class="text-left" rowspan="1" colspan="1">T, U, W</td> <td class="text-left" rowspan="1" colspan="1">B, V, Y</td> <td class="text-left" rowspan="1" colspan="1">T, W</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">B</td> <td class="text-left" rowspan="1" colspan="1">T, U, W</td> <td class="text-left" rowspan="1" colspan="1">A, V, Y</td> <td class="text-left" rowspan="1" colspan="1">T, W</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">E</td> <td class="text-left" rowspan="1" colspan="1">X, Y, W</td> <td class="text-left" rowspan="1" colspan="1">F, Z, U</td> <td class="text-left" rowspan="1" colspan="1">X, Y, W</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">F</td> <td class="text-left" rowspan="1" colspan="1">X, Y, W</td> <td class="text-left" rowspan="1" colspan="1">E, Z, U</td> <td class="text-left" rowspan="1" colspan="1">X, Y, W</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">G</td> <td class="text-left" rowspan="1" colspan="1">Z, Y, W</td> <td class="text-left" rowspan="1" colspan="1">H, X, U</td> <td class="text-left" rowspan="1" colspan="1">Y, W</td> </tr> </tbody> </table> </section> </div> </section> </div> <div id="views"> <section id="section-4.2"> <h3 id="name-views-of-a-ratchet-tree"> <a href="#section-4.2" class="section-number selfRef">4.2. </a><a href="#name-views-of-a-ratchet-tree" class="section-name selfRef">Views of a Ratchet Tree</a> </h3> <p id="section-4.2-1">We generally assume that each participant maintains a complete and up-to-date view of the public state of the group's ratchet tree, including the public keys for all nodes and the credentials associated with the leaf nodes.<a href="#section-4.2-1" class="pilcrow">¶</a></p> <p id="section-4.2-2">No participant in an MLS group knows the private key associated with every node in the tree. Instead, each member is assigned to a leaf of the tree, which determines the subset of private keys it knows. The credential stored at that leaf is one provided by the member.<a href="#section-4.2-2" class="pilcrow">¶</a></p> <p id="section-4.2-3">In particular, MLS maintains the members' views of the tree in such a way as to maintain the <em>tree invariant</em>:<a href="#section-4.2-3" class="pilcrow">¶</a></p> <blockquote id="section-4.2-4"> The private key for a node in the tree is known to a member of the group only if the node's subtree contains that member's leaf.<a href="#section-4.2-4" class="pilcrow">¶</a> </blockquote> <p id="section-4.2-5">In other words, if a node is not blank, then it holds a public key. The corresponding private key is known only to members occupying leaves below that node.<a href="#section-4.2-5" class="pilcrow">¶</a></p> <p id="section-4.2-6">The reverse implication is not true: A member may not know the private key of an intermediate node above them. Such a member has an <em>unmerged</em> leaf at the intermediate node. Encrypting to an intermediate node requires encrypting to the node's public key, as well as the public keys of all the unmerged leaves below it. A leaf is unmerged with regard to all of its ancestors when it is first added, because the process of adding the leaf does not give it access to the private keys for all of the nodes above it in the tree. Leaves are "merged" as they receive the private keys for nodes, as described in <a href="#ratchet-tree-evolution" class="auto internal xref">Section 7.4</a>.<a href="#section-4.2-6" class="pilcrow">¶</a></p> <p id="section-4.2-7">For example, consider a four-member group (A, B, C, D) where the node above the right two members is blank. (This is what it would look like if A created a group with B, C, and D.) Then the public state of the tree and the views of the private keys of the tree held by each participant would be as follows, where <code>_</code> represents a blank node, <code>?</code> represents an unknown private key, and <code>pk(X)</code> represents the public key corresponding to the private key <code>X</code>:<a href="#section-4.2-7" class="pilcrow">¶</a></p> <div class="alignLeft art-ascii-art art-text artwork" id="section-4.2-8"> <pre> Public Tree ============================ pk(ABCD) / \ pk(AB) _ / \ / \ pk(A) pk(B) pk(C) pk(D) Private @ A Private @ B Private @ C Private @ D ============= ============= ============= ============= ABCD ABCD ABCD ABCD / \ / \ / \ / \ AB _ AB _ ? _ ? _ / \ / \ / \ / \ / \ / \ / \ / \ A ? ? ? ? B ? ? ? ? C ? ? ? ? D </pre><a href="#section-4.2-8" class="pilcrow">¶</a> </div> <p id="section-4.2-9">Note how the tree invariant applies: Each member knows only their own leaf, the private key AB is known only to A and B, and the private key ABCD is known to all four members. This also illustrates another important point: it is possible for there to be "holes" on the path from a member's leaf to the root in which the member knows the key both above and below a given node, but not for that node, as in the case with D.<a href="#section-4.2-9" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="cryptographic-objects"> <section id="section-5"> <h2 id="name-cryptographic-objects"> <a href="#section-5" class="section-number selfRef">5. </a><a href="#name-cryptographic-objects" class="section-name selfRef">Cryptographic Objects</a> </h2> <div id="cipher-suites"> <section id="section-5.1"> <h3 id="name-cipher-suites"> <a href="#section-5.1" class="section-number selfRef">5.1. </a><a href="#name-cipher-suites" class="section-name selfRef">Cipher Suites</a> </h3> <p id="section-5.1-1">Each MLS session uses a single cipher suite that specifies the following primitives to be used in group key computations:<a href="#section-5.1-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-5.1-2.1"> <p id="section-5.1-2.1.1">HPKE parameters:<a href="#section-5.1-2.1.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-5.1-2.1.2.1">A Key Encapsulation Mechanism (KEM)<a href="#section-5.1-2.1.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.1-2.1.2.2">A Key Derivation Function (KDF)<a href="#section-5.1-2.1.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.1-2.1.2.3">An Authenticated Encryption with Associated Data (AEAD) encryption algorithm<a href="#section-5.1-2.1.2.3" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-5.1-2.2">A hash algorithm<a href="#section-5.1-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.1-2.3">A Message Authentication Code (MAC) algorithm<a href="#section-5.1-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.1-2.4">A signature algorithm<a href="#section-5.1-2.4" class="pilcrow">¶</a> </li> </ul> <p id="section-5.1-3">MLS uses HPKE for public key encryption <span>[<a href="#RFC9180" class="cite xref">RFC9180</a>]</span>. The <code>DeriveKeyPair</code> function associated to the KEM for the cipher suite maps octet strings to HPKE key pairs. As in HPKE, MLS assumes that an AEAD algorithm produces a single ciphertext output from AEAD encryption (aligning with <span>[<a href="#RFC5116" class="cite xref">RFC5116</a>]</span>), as opposed to a separate ciphertext and tag.<a href="#section-5.1-3" class="pilcrow">¶</a></p> <p id="section-5.1-4">Cipher suites are represented with the CipherSuite type. The cipher suites are defined in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a>.<a href="#section-5.1-4" class="pilcrow">¶</a></p> <div id="public-keys"> <section id="section-5.1.1"> <h4 id="name-public-keys"> <a href="#section-5.1.1" class="section-number selfRef">5.1.1. </a><a href="#name-public-keys" class="section-name selfRef">Public Keys</a> </h4> <p id="section-5.1.1-1">HPKE public keys are opaque values in a format defined by the underlying protocol (see <span><a href="https://www.rfc-editor.org/rfc/rfc9180#section-4" class="relref">Section 4</a> of [<a href="#RFC9180" class="cite xref">RFC9180</a>]</span> for more information).<a href="#section-5.1.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.1.1-2"> <pre> opaque HPKEPublicKey<V>; </pre><a href="#section-5.1.1-2" class="pilcrow">¶</a> </div> <p id="section-5.1.1-3">Signature public keys are likewise represented as opaque values in a format defined by the cipher suite's signature scheme.<a href="#section-5.1.1-3" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.1.1-4"> <pre> opaque SignaturePublicKey<V>; </pre><a href="#section-5.1.1-4" class="pilcrow">¶</a> </div> <p id="section-5.1.1-5">For cipher suites using the Edwards-curve Digital Signature Algorithm (EdDSA) signature schemes (Ed25519 or Ed448), the public key is in the format specified in <span>[<a href="#RFC8032" class="cite xref">RFC8032</a>]</span>.<a href="#section-5.1.1-5" class="pilcrow">¶</a></p> <p id="section-5.1.1-6">For cipher suites using the Elliptic Curve Digital Signature Algorithm (ECDSA) with the NIST curves (P-256, P-384, or P-521), the public key is represented as an encoded UncompressedPointRepresentation struct, as defined in <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span>.<a href="#section-5.1.1-6" class="pilcrow">¶</a></p> </section> </div> <div id="signing"> <section id="section-5.1.2"> <h4 id="name-signing"> <a href="#section-5.1.2" class="section-number selfRef">5.1.2. </a><a href="#name-signing" class="section-name selfRef">Signing</a> </h4> <p id="section-5.1.2-1">The signature algorithm specified in a group's cipher suite is the mandatory algorithm to be used for signing messages within the group. It <span class="bcp14">MUST</span> be the same as the signature algorithm specified in the credentials in the leaves of the tree (including the leaf node information in KeyPackages used to add new members).<a href="#section-5.1.2-1" class="pilcrow">¶</a></p> <p id="section-5.1.2-2">The signatures used in this document are encoded as specified in <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span>. In particular, ECDSA signatures are DER encoded, and EdDSA signatures are defined as the concatenation of <code>R</code> and <code>S</code>, as specified in <span>[<a href="#RFC8032" class="cite xref">RFC8032</a>]</span>.<a href="#section-5.1.2-2" class="pilcrow">¶</a></p> <p id="section-5.1.2-3">To disambiguate different signatures used in MLS, each signed value is prefixed by a label as shown below:<a href="#section-5.1.2-3" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-5.1.2-4"> <pre> SignWithLabel(SignatureKey, Label, Content) = Signature.Sign(SignatureKey, SignContent) VerifyWithLabel(VerificationKey, Label, Content, SignatureValue) = Signature.Verify(VerificationKey, SignContent, SignatureValue) </pre><a href="#section-5.1.2-4" class="pilcrow">¶</a> </div> <p id="section-5.1.2-5">Where SignContent is specified as:<a href="#section-5.1.2-5" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.1.2-6"> <pre> struct { opaque label<V>; opaque content<V>; } SignContent; </pre><a href="#section-5.1.2-6" class="pilcrow">¶</a> </div> <p id="section-5.1.2-7">And its fields are set to:<a href="#section-5.1.2-7" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-5.1.2-8"> <pre> label = "MLS 1.0 " + Label; content = Content; </pre><a href="#section-5.1.2-8" class="pilcrow">¶</a> </div> <p id="section-5.1.2-9">The functions <code>Signature.Sign</code> and <code>Signature.Verify</code> are defined by the signature algorithm. If MLS extensions require signatures by group members, they should reuse the SignWithLabel construction, using a distinct label. To avoid collisions in these labels, an IANA registry is defined in <a href="#mls-signature-labels" class="auto internal xref">Section 17.6</a>.<a href="#section-5.1.2-9" class="pilcrow">¶</a></p> </section> </div> <div id="public-key-encryption"> <section id="section-5.1.3"> <h4 id="name-public-key-encryption"> <a href="#section-5.1.3" class="section-number selfRef">5.1.3. </a><a href="#name-public-key-encryption" class="section-name selfRef">Public Key Encryption</a> </h4> <p id="section-5.1.3-1">As with signing, MLS includes a label and context in encryption operations to avoid confusion between ciphertexts produced for different purposes. Encryption and decryption including this label and context are done as follows:<a href="#section-5.1.3-1" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-5.1.3-2"> <pre> EncryptWithLabel(PublicKey, Label, Context, Plaintext) = SealBase(PublicKey, EncryptContext, "", Plaintext) DecryptWithLabel(PrivateKey, Label, Context, KEMOutput, Ciphertext) = OpenBase(KEMOutput, PrivateKey, EncryptContext, "", Ciphertext) </pre><a href="#section-5.1.3-2" class="pilcrow">¶</a> </div> <p id="section-5.1.3-3">Where EncryptContext is specified as:<a href="#section-5.1.3-3" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.1.3-4"> <pre> struct { opaque label<V>; opaque context<V>; } EncryptContext; </pre><a href="#section-5.1.3-4" class="pilcrow">¶</a> </div> <p id="section-5.1.3-5">And its fields are set to:<a href="#section-5.1.3-5" class="pilcrow">¶</a></p> <div class="alignLeft art-text artwork" id="section-5.1.3-6"> <pre> label = "MLS 1.0 " + Label; context = Context; </pre><a href="#section-5.1.3-6" class="pilcrow">¶</a> </div> <p id="section-5.1.3-7">The functions <code>SealBase</code> and <code>OpenBase</code> are defined in <span><a href="https://www.rfc-editor.org/rfc/rfc9180#section-6.1" class="relref">Section 6.1</a> of [<a href="#RFC9180" class="cite xref">RFC9180</a>]</span> (with "Base" as the MODE), using the HPKE algorithms specified by the group's cipher suite. If MLS extensions require HPKE encryption operations, they should reuse the EncryptWithLabel construction, using a distinct label. To avoid collisions in these labels, an IANA registry is defined in <a href="#mls-public-key-encryption-labels" class="auto internal xref">Section 17.7</a>.<a href="#section-5.1.3-7" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="hash-based-identifiers"> <section id="section-5.2"> <h3 id="name-hash-based-identifiers"> <a href="#section-5.2" class="section-number selfRef">5.2. </a><a href="#name-hash-based-identifiers" class="section-name selfRef">Hash-Based Identifiers</a> </h3> <p id="section-5.2-1">Some MLS messages refer to other MLS objects by hash. For example, Welcome messages refer to KeyPackages for the members being welcomed, and Commits refer to Proposals they cover. These identifiers are computed as follows:<a href="#section-5.2-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.2-2"> <pre> opaque HashReference<V>; HashReference KeyPackageRef; HashReference ProposalRef; </pre><a href="#section-5.2-2" class="pilcrow">¶</a> </div> <div class="lang-pseudocode sourcecode" id="section-5.2-3"> <pre> MakeKeyPackageRef(value) = RefHash("MLS 1.0 KeyPackage Reference", value) MakeProposalRef(value) = RefHash("MLS 1.0 Proposal Reference", value) RefHash(label, value) = Hash(RefHashInput) </pre><a href="#section-5.2-3" class="pilcrow">¶</a> </div> <p id="section-5.2-4">Where RefHashInput is defined as:<a href="#section-5.2-4" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.2-5"> <pre> struct { opaque label<V>; opaque value<V>; } RefHashInput; </pre><a href="#section-5.2-5" class="pilcrow">¶</a> </div> <p id="section-5.2-6">And its fields are set to:<a href="#section-5.2-6" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-5.2-7"> <pre> label = label; value = value; </pre><a href="#section-5.2-7" class="pilcrow">¶</a> </div> <p id="section-5.2-8">For a KeyPackageRef, the <code>value</code> input is the encoded KeyPackage, and the cipher suite specified in the KeyPackage determines the KDF used. For a ProposalRef, the <code>value</code> input is the AuthenticatedContent carrying the Proposal. In the latter two cases, the KDF is determined by the group's cipher suite.<a href="#section-5.2-8" class="pilcrow">¶</a></p> </section> </div> <div id="credentials"> <section id="section-5.3"> <h3 id="name-credentials"> <a href="#section-5.3" class="section-number selfRef">5.3. </a><a href="#name-credentials" class="section-name selfRef">Credentials</a> </h3> <p id="section-5.3-1">Each member of a group presents a credential that provides one or more identities for the member and associates them with the member's signing key. The identities and signing key are verified by the Authentication Service in use for a group.<a href="#section-5.3-1" class="pilcrow">¶</a></p> <p id="section-5.3-2">It is up to the application to decide which identifiers to use at the application level. For example, a certificate in an X509Credential may attest to several domain names or email addresses in its subjectAltName extension. An application may decide to present all of these to a user, or if it knows a "desired" domain name or email address, it can check that the desired identifier is among those attested. Using the terminology from <span>[<a href="#RFC6125" class="cite xref">RFC6125</a>]</span>, a credential provides "presented identifiers", and it is up to the application to supply a "reference identifier" for the authenticated client, if any.<a href="#section-5.3-2" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.3-3"> <pre> // See the "MLS Credential Types" IANA registry for values uint16 CredentialType; struct { opaque cert_data<V>; } Certificate; struct { CredentialType credential_type; select (Credential.credential_type) { case basic: opaque identity<V>; case x509: Certificate certificates<V>; }; } Credential; </pre><a href="#section-5.3-3" class="pilcrow">¶</a> </div> <p id="section-5.3-4">A "basic" credential is a bare assertion of an identity, without any additional information. The format of the encoded identity is defined by the application.<a href="#section-5.3-4" class="pilcrow">¶</a></p> <p id="section-5.3-5">For an X.509 credential, each entry in the <code>certificates</code> field represents a single DER-encoded X.509 certificate. The chain is ordered such that the first entry (certificates[0]) is the end-entity certificate. The public key encoded in the <code>subjectPublicKeyInfo</code> of the end-entity certificate <span class="bcp14">MUST</span> be identical to the <code>signature_key</code> in the LeafNode containing this credential. A chain <span class="bcp14">MAY</span> omit any non-leaf certificates that supported peers are known to already possess.<a href="#section-5.3-5" class="pilcrow">¶</a></p> <div id="credential-validation"> <section id="section-5.3.1"> <h4 id="name-credential-validation"> <a href="#section-5.3.1" class="section-number selfRef">5.3.1. </a><a href="#name-credential-validation" class="section-name selfRef">Credential Validation</a> </h4> <p id="section-5.3.1-1">The application using MLS is responsible for specifying which identifiers it finds acceptable for each member in a group. In other words, following the model that <span>[<a href="#RFC6125" class="cite xref">RFC6125</a>]</span> describes for TLS, the application maintains a list of "reference identifiers" for the members of a group, and the credentials provide "presented identifiers". A member of a group is authenticated by first validating that the member's credential legitimately represents some presented identifiers, and then ensuring that the reference identifiers for the member are authenticated by those presented identifiers.<a href="#section-5.3.1-1" class="pilcrow">¶</a></p> <p id="section-5.3.1-2">The parts of the system that perform these functions are collectively referred to as the Authentication Service (AS) <span>[<a href="#I-D.ietf-mls-architecture" class="cite xref">MLS-ARCH</a>]</span>. A member's credential is said to be <em>validated with the AS</em> when the AS verifies that the credential's presented identifiers are correctly associated with the <code>signature_key</code> field in the member's LeafNode, and that those identifiers match the reference identifiers for the member.<a href="#section-5.3.1-2" class="pilcrow">¶</a></p> <p id="section-5.3.1-3">Whenever a new credential is introduced in the group, it <span class="bcp14">MUST</span> be validated with the AS. In particular, at the following events in the protocol:<a href="#section-5.3.1-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-5.3.1-4.1">When a member receives a KeyPackage that it will use in an Add proposal to add a new member to the group<a href="#section-5.3.1-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.2">When a member receives a GroupInfo object that it will use to join a group, either via a Welcome or via an external Commit<a href="#section-5.3.1-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.3">When a member receives an Add proposal adding a member to the group<a href="#section-5.3.1-4.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.4">When a member receives an Update proposal whose LeafNode has a new credential for the member<a href="#section-5.3.1-4.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.5">When a member receives a Commit with an UpdatePath whose LeafNode has a new credential for the committer<a href="#section-5.3.1-4.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.6">When an <code>external_senders</code> extension is added to the group<a href="#section-5.3.1-4.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-5.3.1-4.7">When an existing <code>external_senders</code> extension is updated<a href="#section-5.3.1-4.7" class="pilcrow">¶</a> </li> </ul> <p id="section-5.3.1-5">In cases where a member's credential is being replaced, such as the Update and Commit cases above, the AS <span class="bcp14">MUST</span> also verify that the set of presented identifiers in the new credential is valid as a successor to the set of presented identifiers in the old credential, according to the application's policy.<a href="#section-5.3.1-5" class="pilcrow">¶</a></p> </section> </div> <div id="credential-expiry-and-revocation"> <section id="section-5.3.2"> <h4 id="name-credential-expiry-and-revoc"> <a href="#section-5.3.2" class="section-number selfRef">5.3.2. </a><a href="#name-credential-expiry-and-revoc" class="section-name selfRef">Credential Expiry and Revocation</a> </h4> <p id="section-5.3.2-1">In some credential schemes, a valid credential can "expire" or become invalid after a certain point in time. For example, each X.509 certificate has a <code>notAfter</code> field, expressing a time after which the certificate is not valid.<a href="#section-5.3.2-1" class="pilcrow">¶</a></p> <p id="section-5.3.2-2">Expired credentials can cause operational problems in light of the validation requirements of <a href="#credential-validation" class="auto internal xref">Section 5.3.1</a>. Applications can apply some operational practices and adaptations to Authentication Service policies to moderate these impacts.<a href="#section-5.3.2-2" class="pilcrow">¶</a></p> <p id="section-5.3.2-3">In general, to avoid operational problems such as new joiners rejecting expired credentials in a group, applications that use such credentials should ensure to the extent practical that all of the credentials in use in a group are valid at all times.<a href="#section-5.3.2-3" class="pilcrow">¶</a></p> <p id="section-5.3.2-4">If a member finds that its credential has expired (or will soon), it should issue an Update or Commit that replaces it with a valid credential. For this reason, members <span class="bcp14">SHOULD</span> accept Update proposals and Commits issued by members with expired credentials, if the credential in the Update or Commit is valid.<a href="#section-5.3.2-4" class="pilcrow">¶</a></p> <p id="section-5.3.2-5">Similarly, when a client is processing messages sent some time in the past (e.g., syncing up with a group after being offline), the client <span class="bcp14">SHOULD</span> accept signatures from members with expired credentials, since the credential may have been valid at the time the message was sent.<a href="#section-5.3.2-5" class="pilcrow">¶</a></p> <p id="section-5.3.2-6">If a member finds that another member's credential has expired, they may issue a Remove that removes that member. For example, an application could require a member preparing to issue a Commit to check the tree for expired credentials and include Remove proposals for those members in its Commit. In situations where the group tree is known to the DS, the DS could also monitor the tree for expired credentials and issue external Remove proposals.<a href="#section-5.3.2-6" class="pilcrow">¶</a></p> <p id="section-5.3.2-7">Some credential schemes also allow credentials to be revoked. Revocation is similar to expiry in that a previously valid credential becomes invalid. As such, most of the considerations above also apply to revoked credentials. However, applications may want to treat revoked credentials differently, e.g., by removing members with revoked credentials while allowing members with expired credentials time to update.<a href="#section-5.3.2-7" class="pilcrow">¶</a></p> </section> </div> <div id="uniquely-identifying-clients"> <section id="section-5.3.3"> <h4 id="name-uniquely-identifying-client"> <a href="#section-5.3.3" class="section-number selfRef">5.3.3. </a><a href="#name-uniquely-identifying-client" class="section-name selfRef">Uniquely Identifying Clients</a> </h4> <p id="section-5.3.3-1">MLS implementations will presumably provide applications with a way to request protocol operations with regard to other clients (e.g., removing clients). Such functions will need to refer to the other clients using some identifier. MLS clients have a few types of identifiers, with different operational properties.<a href="#section-5.3.3-1" class="pilcrow">¶</a></p> <p id="section-5.3.3-2">Internally to the protocol, group members are uniquely identified by their leaf index. However, a leaf index is only valid for referring to members in a given epoch. The same leaf index may represent a different member, or no member at all, in a subsequent epoch.<a href="#section-5.3.3-2" class="pilcrow">¶</a></p> <p id="section-5.3.3-3">The Credentials presented by the clients in a group authenticate application-level identifiers for the clients. However, these identifiers may not uniquely identify clients. For example, if a user has multiple devices that are all present in an MLS group, then those devices' clients could all present the user's application-layer identifiers.<a href="#section-5.3.3-3" class="pilcrow">¶</a></p> <p id="section-5.3.3-4">If needed, applications may add application-specific identifiers to the <code>extensions</code> field of a LeafNode object with the <code>application_id</code> extension.<a href="#section-5.3.3-4" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-5.3.3-5"> <pre> opaque application_id<V>; </pre><a href="#section-5.3.3-5" class="pilcrow">¶</a> </div> <p id="section-5.3.3-6">However, applications <span class="bcp14">MUST NOT</span> rely on the data in an <code>application_id</code> extension as if it were authenticated by the Authentication Service, and <span class="bcp14">SHOULD</span> gracefully handle cases where the identifier presented is not unique.<a href="#section-5.3.3-6" class="pilcrow">¶</a></p> </section> </div> </section> </div> </section> </div> <div id="message-framing"> <section id="section-6"> <h2 id="name-message-framing"> <a href="#section-6" class="section-number selfRef">6. </a><a href="#name-message-framing" class="section-name selfRef">Message Framing</a> </h2> <p id="section-6-1">Handshake and application messages use a common framing structure. This framing provides encryption to ensure confidentiality within the group, as well as signing to authenticate the sender.<a href="#section-6-1" class="pilcrow">¶</a></p> <p id="section-6-2">In most of the protocol, messages are handled in the form of AuthenticatedContent objects. These structures contain the content of the message itself as well as information to authenticate the sender (see <a href="#content-authentication" class="auto internal xref">Section 6.1</a>). The additional protections required to transmit these messages over an untrusted channel (group membership authentication or AEAD encryption) are added by encoding the AuthenticatedContent as a PublicMessage or PrivateMessage message, which can then be sent as an MLSMessage. Likewise, these protections are enforced (via membership verification or AEAD decryption) when decoding a PublicMessage or PrivateMessage into an AuthenticatedContent object.<a href="#section-6-2" class="pilcrow">¶</a></p> <p id="section-6-3">PrivateMessage represents a signed and encrypted message, with protections for both the content of the message and related metadata. PublicMessage represents a message that is only signed, and not encrypted. Applications <span class="bcp14">MUST</span> use PrivateMessage to encrypt application messages and <span class="bcp14">SHOULD</span> use PrivateMessage to encode handshake messages, but they <span class="bcp14">MAY</span> transmit handshake messages encoded as PublicMessage objects in cases where it is necessary for the Delivery Service to examine such messages.<a href="#section-6-3" class="pilcrow">¶</a></p> <div class="breakable lang-tls-presentation sourcecode" id="section-6-4"> <pre> enum { reserved(0), mls10(1), (65535) } ProtocolVersion; enum { reserved(0), application(1), proposal(2), commit(3), (255) } ContentType; enum { reserved(0), member(1), external(2), new_member_proposal(3), new_member_commit(4), (255) } SenderType; struct { SenderType sender_type; select (Sender.sender_type) { case member: uint32 leaf_index; case external: uint32 sender_index; case new_member_commit: case new_member_proposal: struct{}; }; } Sender; // See the "MLS Wire Formats" IANA registry for values uint16 WireFormat; struct { opaque group_id<V>; uint64 epoch; Sender sender; opaque authenticated_data<V>; ContentType content_type; select (FramedContent.content_type) { case application: opaque application_data<V>; case proposal: Proposal proposal; case commit: Commit commit; }; } FramedContent; struct { ProtocolVersion version = mls10; WireFormat wire_format; select (MLSMessage.wire_format) { case mls_public_message: PublicMessage public_message; case mls_private_message: PrivateMessage private_message; case mls_welcome: Welcome welcome; case mls_group_info: GroupInfo group_info; case mls_key_package: KeyPackage key_package; }; } MLSMessage; </pre><a href="#section-6-4" class="pilcrow">¶</a> </div> <p id="section-6-5">Messages from senders that aren't in the group are sent as PublicMessage. See Sections <a href="#external-proposals" class="auto internal xref">12.1.8</a> and <a href="#joining-via-external-commits" class="auto internal xref">12.4.3.2</a> for more details.<a href="#section-6-5" class="pilcrow">¶</a></p> <p id="section-6-6">The following structure is used to fully describe the data transmitted in plaintexts or ciphertexts.<a href="#section-6-6" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6-7"> <pre> struct { WireFormat wire_format; FramedContent content; FramedContentAuthData auth; } AuthenticatedContent; </pre><a href="#section-6-7" class="pilcrow">¶</a> </div> <p id="section-6-8">The following figure illustrates how the various structures described in this section relate to each other, and the high-level operations used to produce and consume them:<a href="#section-6-8" class="pilcrow">¶</a></p> <span id="name-relationships-among-mls-obj"></span><figure id="figure-12"> <div id="section-6-9.1"> <div class="alignLeft art-svg artwork" id="section-6-9.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="480" text-anchor="middle" version="1.1" viewBox="0 0 520 480" width="520"> <path d="M 64,48 L 64,64" fill="none" stroke="black"></path> <path d="M 88,144 L 88,176" fill="none" stroke="black"></path> <path d="M 88,208 L 88,224" fill="none" stroke="black"></path> <path d="M 112,304 L 112,336" fill="none" stroke="black"></path> <path d="M 112,368 L 112,416" fill="none" stroke="black"></path> <path d="M 160,128 L 160,144" fill="none" stroke="black"></path> <path d="M 160,224 L 160,256" fill="none" stroke="black"></path> <path d="M 184,48 L 184,96" fill="none" stroke="black"></path> <path d="M 184,128 L 184,256" fill="none" stroke="black"></path> <path d="M 184,288 L 184,304" fill="none" stroke="black"></path> <path d="M 256,304 L 256,336" fill="none" stroke="black"></path> <path d="M 256,368 L 256,448" fill="none" stroke="black"></path> <path d="M 304,48 L 304,64" fill="none" stroke="black"></path> <path d="M 304,400 L 304,416" fill="none" stroke="black"></path> <path d="M 336,144 L 336,240" fill="none" stroke="black"></path> <path d="M 336,304 L 336,336" fill="none" stroke="black"></path> <path d="M 392,400 L 392,416" fill="none" stroke="black"></path> <path d="M 480,400 L 480,416" fill="none" stroke="black"></path> <path d="M 64,64 L 304,64" fill="none" stroke="black"></path> <path d="M 88,144 L 160,144" fill="none" stroke="black"></path> <path d="M 336,176 L 352,176" fill="none" stroke="black"></path> <path d="M 88,224 L 160,224" fill="none" stroke="black"></path> <path d="M 112,304 L 256,304" fill="none" stroke="black"></path> <path d="M 336,320 L 352,320" fill="none" stroke="black"></path> <path d="M 112,416 L 480,416" fill="none" stroke="black"></path> <path d="M 320,128 C 328.83064,128 336,135.16936 336,144" fill="none" stroke="black"></path> <path d="M 320,256 C 328.83064,256 336,248.83064 336,240" fill="none" stroke="black"></path> <path d="M 320,288 C 328.83064,288 336,295.16936 336,304" fill="none" stroke="black"></path> <path d="M 320,352 C 328.83064,352 336,344.83064 336,336" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="264,448 252,442.4 252,453.6" transform="rotate(90,256,448)"></polygon> <polygon class="arrowhead" fill="black" points="264,336 252,330.4 252,341.6" transform="rotate(90,256,336)"></polygon> <polygon class="arrowhead" fill="black" points="192,256 180,250.4 180,261.6" transform="rotate(90,184,256)"></polygon> <polygon class="arrowhead" fill="black" points="192,96 180,90.4 180,101.6" transform="rotate(90,184,96)"></polygon> <polygon class="arrowhead" fill="black" points="168,256 156,250.4 156,261.6" transform="rotate(90,160,256)"></polygon> <polygon class="arrowhead" fill="black" points="120,336 108,330.4 108,341.6" transform="rotate(90,112,336)"></polygon> <polygon class="arrowhead" fill="black" points="96,176 84,170.4 84,181.6" transform="rotate(90,88,176)"></polygon> <g class="text"> <text x="68" y="36">Proposal</text> <text x="188" y="36">Commit</text> <text x="296" y="36">Application</text> <text x="364" y="36">Data</text> <text x="176" y="116">FramedContent</text> <text x="404" y="180">Asymmetric</text> <text x="88" y="196">FramedContentAuthData</text> <text x="380" y="196">Sign</text> <text x="408" y="196">/</text> <text x="444" y="196">Verify</text> <text x="188" y="276">AuthenticatedContent</text> <text x="400" y="324">Symmetric</text> <text x="392" y="340">Protect</text> <text x="432" y="340">/</text> <text x="480" y="340">Unprotect</text> <text x="112" y="356">PublicMessage</text> <text x="252" y="356">PrivateMessage</text> <text x="304" y="388">Welcome</text> <text x="388" y="388">KeyPackage</text> <text x="480" y="388">GroupInfo</text> <text x="260" y="468">MLSMessage</text> </g> </svg><a href="#section-6-9.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-12" class="selfRef">Figure 12</a>: <a href="#name-relationships-among-mls-obj" class="selfRef">Relationships among MLS Objects</a> </figcaption></figure> <div id="content-authentication"> <section id="section-6.1"> <h3 id="name-content-authentication"> <a href="#section-6.1" class="section-number selfRef">6.1. </a><a href="#name-content-authentication" class="section-name selfRef">Content Authentication</a> </h3> <p id="section-6.1-1">FramedContent is authenticated using the FramedContentAuthData structure.<a href="#section-6.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.1-2"> <pre> struct { ProtocolVersion version = mls10; WireFormat wire_format; FramedContent content; select (FramedContentTBS.content.sender.sender_type) { case member: case new_member_commit: GroupContext context; case external: case new_member_proposal: struct{}; }; } FramedContentTBS; opaque MAC<V>; struct { /* SignWithLabel(., "FramedContentTBS", FramedContentTBS) */ opaque signature<V>; select (FramedContent.content_type) { case commit: /* MAC(confirmation_key, GroupContext.confirmed_transcript_hash) */ MAC confirmation_tag; case application: case proposal: struct{}; }; } FramedContentAuthData; </pre><a href="#section-6.1-2" class="pilcrow">¶</a> </div> <p id="section-6.1-3">The signature is computed using <code>SignWithLabel</code> with label <code>"FramedContentTBS"</code> and with a content that covers the message content and the wire format that will be used for this message. If the sender's <code>sender_type</code> is <code>member</code>, the content also covers the GroupContext for the current epoch so that signatures are specific to a given group and epoch.<a href="#section-6.1-3" class="pilcrow">¶</a></p> <p id="section-6.1-4">The sender <span class="bcp14">MUST</span> use the private key corresponding to the following signature key depending on the sender's <code>sender_type</code>:<a href="#section-6.1-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-6.1-5.1"> <code>member</code>: The signature key contained in the LeafNode at the index indicated by <code>leaf_index</code> in the ratchet tree.<a href="#section-6.1-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-6.1-5.2"> <code>external</code>: The signature key at the index indicated by <code>sender_index</code> in the <code>external_senders</code> group context extension (see <a href="#external-senders-extension" class="auto internal xref">Section 12.1.8.1</a>). The <code>content_type</code> of the message <span class="bcp14">MUST</span> be <code>proposal</code> and the <code>proposal_type</code> <span class="bcp14">MUST</span> be a value that is allowed for external senders.<a href="#section-6.1-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-6.1-5.3"> <code>new_member_commit</code>: The signature key in the LeafNode in the Commit's path (see <a href="#joining-via-external-commits" class="auto internal xref">Section 12.4.3.2</a>). The <code>content_type</code> of the message <span class="bcp14">MUST</span> be <code>commit</code>.<a href="#section-6.1-5.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-6.1-5.4"> <code>new_member_proposal</code>: The signature key in the LeafNode in the KeyPackage embedded in an external Add proposal. The <code>content_type</code> of the message <span class="bcp14">MUST</span> be <code>proposal</code> and the <code>proposal_type</code> of the Proposal <span class="bcp14">MUST</span> be <code>add</code>.<a href="#section-6.1-5.4" class="pilcrow">¶</a> </li> </ul> <p id="section-6.1-6">Recipients of an MLSMessage <span class="bcp14">MUST</span> verify the signature with the key depending on the <code>sender_type</code> of the sender as described above.<a href="#section-6.1-6" class="pilcrow">¶</a></p> <p id="section-6.1-7">The confirmation tag value confirms that the members of the group have arrived at the same state of the group. A FramedContentAuthData is said to be valid when both the <code>signature</code> and <code>confirmation_tag</code> fields are valid.<a href="#section-6.1-7" class="pilcrow">¶</a></p> </section> </div> <div id="encoding-and-decoding-a-public-message"> <section id="section-6.2"> <h3 id="name-encoding-and-decoding-a-pub"> <a href="#section-6.2" class="section-number selfRef">6.2. </a><a href="#name-encoding-and-decoding-a-pub" class="section-name selfRef">Encoding and Decoding a Public Message</a> </h3> <p id="section-6.2-1">Messages that are authenticated but not encrypted are encoded using the PublicMessage structure.<a href="#section-6.2-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.2-2"> <pre> struct { FramedContent content; FramedContentAuthData auth; select (PublicMessage.content.sender.sender_type) { case member: MAC membership_tag; case external: case new_member_commit: case new_member_proposal: struct{}; }; } PublicMessage; </pre><a href="#section-6.2-2" class="pilcrow">¶</a> </div> <p id="section-6.2-3">The <code>membership_tag</code> field in the PublicMessage object authenticates the sender's membership in the group. For messages sent by members, it <span class="bcp14">MUST</span> be set to the following value:<a href="#section-6.2-3" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.2-4"> <pre> struct { FramedContentTBS content_tbs; FramedContentAuthData auth; } AuthenticatedContentTBM; </pre><a href="#section-6.2-4" class="pilcrow">¶</a> </div> <div class="lang-pseudocode sourcecode" id="section-6.2-5"> <pre> membership_tag = MAC(membership_key, AuthenticatedContentTBM) </pre><a href="#section-6.2-5" class="pilcrow">¶</a> </div> <p id="section-6.2-6">When decoding a PublicMessage into an AuthenticatedContent, the application <span class="bcp14">MUST</span> check <code>membership_tag</code> and <span class="bcp14">MUST</span> check that the FramedContentAuthData is valid.<a href="#section-6.2-6" class="pilcrow">¶</a></p> </section> </div> <div id="encoding-and-decoding-a-private-message"> <section id="section-6.3"> <h3 id="name-encoding-and-decoding-a-pri"> <a href="#section-6.3" class="section-number selfRef">6.3. </a><a href="#name-encoding-and-decoding-a-pri" class="section-name selfRef">Encoding and Decoding a Private Message</a> </h3> <p id="section-6.3-1">Authenticated and encrypted messages are encoded using the PrivateMessage structure.<a href="#section-6.3-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.3-2"> <pre> struct { opaque group_id<V>; uint64 epoch; ContentType content_type; opaque authenticated_data<V>; opaque encrypted_sender_data<V>; opaque ciphertext<V>; } PrivateMessage; </pre><a href="#section-6.3-2" class="pilcrow">¶</a> </div> <p id="section-6.3-3"><code>encrypted_sender_data</code> and <code>ciphertext</code> are encrypted using the AEAD function specified by the cipher suite in use, using the SenderData and PrivateMessageContent structures as input.<a href="#section-6.3-3" class="pilcrow">¶</a></p> <div id="content-encryption"> <section id="section-6.3.1"> <h4 id="name-content-encryption"> <a href="#section-6.3.1" class="section-number selfRef">6.3.1. </a><a href="#name-content-encryption" class="section-name selfRef">Content Encryption</a> </h4> <p id="section-6.3.1-1">Content to be encrypted is encoded in a PrivateMessageContent structure.<a href="#section-6.3.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.3.1-2"> <pre> struct { select (PrivateMessage.content_type) { case application: opaque application_data<V>; case proposal: Proposal proposal; case commit: Commit commit; }; FramedContentAuthData auth; opaque padding[length_of_padding]; } PrivateMessageContent; </pre><a href="#section-6.3.1-2" class="pilcrow">¶</a> </div> <p id="section-6.3.1-3">The <code>padding</code> field is set by the sender, by first encoding the content (via the <code>select</code>) and the <code>auth</code> field, and then appending the chosen number of zero bytes. A receiver identifies the padding field in a plaintext decoded from <code>PrivateMessage.ciphertext</code> by first decoding the content and the <code>auth</code> field; then the <code>padding</code> field comprises any remaining octets of plaintext. The <code>padding</code> field <span class="bcp14">MUST</span> be filled with all zero bytes. A receiver <span class="bcp14">MUST</span> verify that there are no non-zero bytes in the <code>padding</code> field, and if this check fails, the enclosing PrivateMessage <span class="bcp14">MUST</span> be rejected as malformed. This check ensures that the padding process is deterministic, so that, for example, padding cannot be used as a covert channel.<a href="#section-6.3.1-3" class="pilcrow">¶</a></p> <p id="section-6.3.1-4">In the MLS key schedule, the sender creates two distinct key ratchets for handshake and application messages for each member of the group. When encrypting a message, the sender looks at the ratchets it derived for its own member and chooses an unused generation from either the handshake ratchet or the application ratchet, depending on the content type of the message. This generation of the ratchet is used to derive a provisional nonce and key.<a href="#section-6.3.1-4" class="pilcrow">¶</a></p> <p id="section-6.3.1-5">Before use in the encryption operation, the nonce is XORed with a fresh random value to guard against reuse. Because the key schedule generates nonces deterministically, a client <span class="bcp14">MUST</span> keep persistent state as to where in the key schedule it is; if this persistent state is lost or corrupted, a client might reuse a generation that has already been used, causing reuse of a key/nonce pair.<a href="#section-6.3.1-5" class="pilcrow">¶</a></p> <p id="section-6.3.1-6">To avoid this situation, the sender of a message <span class="bcp14">MUST</span> generate a fresh random four-byte "reuse guard" value and XOR it with the first four bytes of the nonce from the key schedule before using the nonce for encryption. The sender <span class="bcp14">MUST</span> include the reuse guard in the <code>reuse_guard</code> field of the sender data object, so that the recipient of the message can use it to compute the nonce to be used for decryption.<a href="#section-6.3.1-6" class="pilcrow">¶</a></p> <div class="alignLeft art-ascii-art art-text artwork" id="section-6.3.1-7"> <pre> +-+-+-+-+---------...---+ | Key Schedule Nonce | +-+-+-+-+---------...---+ XOR +-+-+-+-+---------...---+ | Guard | 0 | +-+-+-+-+---------...---+ === +-+-+-+-+---------...---+ | Encrypt/Decrypt Nonce | +-+-+-+-+---------...---+ </pre><a href="#section-6.3.1-7" class="pilcrow">¶</a> </div> <p id="section-6.3.1-8">The Additional Authenticated Data (AAD) input to the encryption contains an object of the following form, with the values used to identify the key and nonce:<a href="#section-6.3.1-8" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.3.1-9"> <pre> struct { opaque group_id<V>; uint64 epoch; ContentType content_type; opaque authenticated_data<V>; } PrivateContentAAD; </pre><a href="#section-6.3.1-9" class="pilcrow">¶</a> </div> <p id="section-6.3.1-10">When decoding a PrivateMessageContent, the application <span class="bcp14">MUST</span> check that the FramedContentAuthData is valid.<a href="#section-6.3.1-10" class="pilcrow">¶</a></p> <p id="section-6.3.1-11">It is up to the application to decide what <code>authenticated_data</code> to provide and how much padding to add to a given message (if any). The overall size of the AAD and ciphertext <span class="bcp14">MUST</span> fit within the limits established for the group's AEAD algorithm in <span>[<a href="#I-D.irtf-cfrg-aead-limits" class="cite xref">CFRG-AEAD-LIMITS</a>]</span>.<a href="#section-6.3.1-11" class="pilcrow">¶</a></p> </section> </div> <div id="sender-data-encryption"> <section id="section-6.3.2"> <h4 id="name-sender-data-encryption"> <a href="#section-6.3.2" class="section-number selfRef">6.3.2. </a><a href="#name-sender-data-encryption" class="section-name selfRef">Sender Data Encryption</a> </h4> <p id="section-6.3.2-1">The "sender data" used to look up the key for content encryption is encrypted with the cipher suite's AEAD with a key and nonce derived from both the <code>sender_data_secret</code> and a sample of the encrypted content. Before being encrypted, the sender data is encoded as an object of the following form:<a href="#section-6.3.2-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.3.2-2"> <pre> struct { uint32 leaf_index; uint32 generation; opaque reuse_guard[4]; } SenderData; </pre><a href="#section-6.3.2-2" class="pilcrow">¶</a> </div> <p id="section-6.3.2-3">When constructing a SenderData object from a Sender object, the sender <span class="bcp14">MUST</span> verify Sender.sender_type is <code>member</code> and use Sender.leaf_index for SenderData.leaf_index.<a href="#section-6.3.2-3" class="pilcrow">¶</a></p> <p id="section-6.3.2-4">The <code>reuse_guard</code> field contains a fresh random value used to avoid nonce reuse in the case of state loss or corruption, as described in <a href="#content-encryption" class="auto internal xref">Section 6.3.1</a>.<a href="#section-6.3.2-4" class="pilcrow">¶</a></p> <p id="section-6.3.2-5">The key and nonce provided to the AEAD are computed as the KDF of the first <code>KDF.Nh</code> bytes of the ciphertext generated in the previous section. If the length of the ciphertext is less than <code>KDF.Nh</code>, the whole ciphertext is used. In pseudocode, the key and nonce are derived as:<a href="#section-6.3.2-5" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-6.3.2-6"> <pre> ciphertext_sample = ciphertext[0..KDF.Nh-1] sender_data_key = ExpandWithLabel(sender_data_secret, "key", ciphertext_sample, AEAD.Nk) sender_data_nonce = ExpandWithLabel(sender_data_secret, "nonce", ciphertext_sample, AEAD.Nn) </pre><a href="#section-6.3.2-6" class="pilcrow">¶</a> </div> <p id="section-6.3.2-7">The AAD for the SenderData ciphertext is the first three fields of PrivateMessage:<a href="#section-6.3.2-7" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-6.3.2-8"> <pre> struct { opaque group_id<V>; uint64 epoch; ContentType content_type; } SenderDataAAD; </pre><a href="#section-6.3.2-8" class="pilcrow">¶</a> </div> <p id="section-6.3.2-9">When parsing a SenderData struct as part of message decryption, the recipient <span class="bcp14">MUST</span> verify that the leaf index indicated in the <code>leaf_index</code> field identifies a non-blank node.<a href="#section-6.3.2-9" class="pilcrow">¶</a></p> </section> </div> </section> </div> </section> </div> <div id="ratchet-tree-operations"> <section id="section-7"> <h2 id="name-ratchet-tree-operations"> <a href="#section-7" class="section-number selfRef">7. </a><a href="#name-ratchet-tree-operations" class="section-name selfRef">Ratchet Tree Operations</a> </h2> <p id="section-7-1">The ratchet tree for an epoch describes the membership of a group in that epoch, providing public key encryption (HPKE) keys that can be used to encrypt to subsets of the group as well as information to authenticate the members. In order to reflect changes to the membership of the group from one epoch to the next, corresponding changes are made to the ratchet tree. In this section, we describe the content of the tree and the required operations.<a href="#section-7-1" class="pilcrow">¶</a></p> <div id="parent-node-contents"> <section id="section-7.1"> <h3 id="name-parent-node-contents"> <a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-parent-node-contents" class="section-name selfRef">Parent Node Contents</a> </h3> <p id="section-7.1-1">As discussed in <a href="#ratchet-tree-nodes" class="auto internal xref">Section 4.1.1</a>, the nodes of a ratchet tree contain several types of data describing individual members (for leaf nodes) or subgroups of the group (for parent nodes). Parent nodes are simpler:<a href="#section-7.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-7.1-2"> <pre> struct { HPKEPublicKey encryption_key; opaque parent_hash<V>; uint32 unmerged_leaves<V>; } ParentNode; </pre><a href="#section-7.1-2" class="pilcrow">¶</a> </div> <p id="section-7.1-3">The <code>encryption_key</code> field contains an HPKE public key whose private key is held only by the members at the leaves among its descendants. The <code>parent_hash</code> field contains a hash of this node's parent node, as described in <a href="#parent-hashes" class="auto internal xref">Section 7.9</a>. The <code>unmerged_leaves</code> field lists the leaves under this parent node that are unmerged, according to their indices among all the leaves in the tree. The entries in the <code>unmerged_leaves</code> vector <span class="bcp14">MUST</span> be sorted in increasing order.<a href="#section-7.1-3" class="pilcrow">¶</a></p> </section> </div> <div id="leaf-node-contents"> <section id="section-7.2"> <h3 id="name-leaf-node-contents"> <a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-leaf-node-contents" class="section-name selfRef">Leaf Node Contents</a> </h3> <p id="section-7.2-1">A leaf node in the tree describes all the details of an individual client's appearance in the group, signed by that client. It is also used in client KeyPackage objects to store the information that will be needed to add a client to a group.<a href="#section-7.2-1" class="pilcrow">¶</a></p> <div class="breakable lang-tls-presentation sourcecode" id="section-7.2-2"> <pre> enum { reserved(0), key_package(1), update(2), commit(3), (255) } LeafNodeSource; struct { ProtocolVersion versions<V>; CipherSuite cipher_suites<V>; ExtensionType extensions<V>; ProposalType proposals<V>; CredentialType credentials<V>; } Capabilities; struct { uint64 not_before; uint64 not_after; } Lifetime; // See the "MLS Extension Types" IANA registry for values uint16 ExtensionType; struct { ExtensionType extension_type; opaque extension_data<V>; } Extension; struct { HPKEPublicKey encryption_key; SignaturePublicKey signature_key; Credential credential; Capabilities capabilities; LeafNodeSource leaf_node_source; select (LeafNode.leaf_node_source) { case key_package: Lifetime lifetime; case update: struct{}; case commit: opaque parent_hash<V>; }; Extension extensions<V>; /* SignWithLabel(., "LeafNodeTBS", LeafNodeTBS) */ opaque signature<V>; } LeafNode; struct { HPKEPublicKey encryption_key; SignaturePublicKey signature_key; Credential credential; Capabilities capabilities; LeafNodeSource leaf_node_source; select (LeafNodeTBS.leaf_node_source) { case key_package: Lifetime lifetime; case update: struct{}; case commit: opaque parent_hash<V>; }; Extension extensions<V>; select (LeafNodeTBS.leaf_node_source) { case key_package: struct{}; case update: opaque group_id<V>; uint32 leaf_index; case commit: opaque group_id<V>; uint32 leaf_index; }; } LeafNodeTBS; </pre><a href="#section-7.2-2" class="pilcrow">¶</a> </div> <p id="section-7.2-3">The <code>encryption_key</code> field contains an HPKE public key whose private key is held only by the member occupying this leaf (or in the case of a LeafNode in a KeyPackage object, the issuer of the KeyPackage). The <code>signature_key</code> field contains the member's public signing key. The <code>credential</code> field contains information authenticating both the member's identity and the provided signing key, as described in <a href="#credentials" class="auto internal xref">Section 5.3</a>.<a href="#section-7.2-3" class="pilcrow">¶</a></p> <p id="section-7.2-4">The <code>capabilities</code> field indicates the protocol features that the client supports, including protocol versions, cipher suites, credential types, non-default proposal types, and non-default extension types. The following proposal and extension types are considered "default" and <span class="bcp14">MUST NOT</span> be listed:<a href="#section-7.2-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.2-5.1"> <p id="section-7.2-5.1.1">Proposal types:<a href="#section-7.2-5.1.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.2-5.1.2.1">0x0001 - <code>add</code><a href="#section-7.2-5.1.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.2">0x0002 - <code>update</code><a href="#section-7.2-5.1.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.3">0x0003 - <code>remove</code><a href="#section-7.2-5.1.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.4">0x0004 - <code>psk</code><a href="#section-7.2-5.1.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.5">0x0005 - <code>reinit</code><a href="#section-7.2-5.1.2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.6">0x0006 - <code>external_init</code><a href="#section-7.2-5.1.2.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.1.2.7">0x0007 - <code>group_context_extensions</code><a href="#section-7.2-5.1.2.7" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-7.2-5.2"> <p id="section-7.2-5.2.1">Extension types:<a href="#section-7.2-5.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.2-5.2.2.1">0x0001 - <code>application_id</code><a href="#section-7.2-5.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.2.2.2">0x0002 - <code>ratchet_tree</code><a href="#section-7.2-5.2.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.2.2.3">0x0003 - <code>required_capabilities</code><a href="#section-7.2-5.2.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.2.2.4">0x0004 - <code>external_pub</code><a href="#section-7.2-5.2.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.2-5.2.2.5">0x0005 - <code>external_senders</code><a href="#section-7.2-5.2.2.5" class="pilcrow">¶</a> </li> </ul> </li> </ul> <p id="section-7.2-6">There are no default values for the other fields of a capabilities object. The client <span class="bcp14">MUST</span> list all values for the respective parameters that it supports.<a href="#section-7.2-6" class="pilcrow">¶</a></p> <p id="section-7.2-7">The types of any non-default extensions that appear in the <code>extensions</code> field of a LeafNode <span class="bcp14">MUST</span> be included in the <code>extensions</code> field of the <code>capabilities</code> field, and the credential type used in the LeafNode <span class="bcp14">MUST</span> be included in the <code>credentials</code> field of the <code>capabilities</code> field.<a href="#section-7.2-7" class="pilcrow">¶</a></p> <p id="section-7.2-8">As discussed in <a href="#extensibility" class="auto internal xref">Section 13</a>, unknown values in <code>capabilities</code> <span class="bcp14">MUST</span> be ignored, and the creator of a <code>capabilities</code> field <span class="bcp14">SHOULD</span> include some random GREASE values to help ensure that other clients correctly ignore unknown values.<a href="#section-7.2-8" class="pilcrow">¶</a></p> <p id="section-7.2-9">The <code>leaf_node_source</code> field indicates how this LeafNode came to be added to the tree. This signal tells other members of the group whether the leaf node is required to have a <code>lifetime</code> or <code>parent_hash</code>, and whether the <code>group_id</code> is added as context to the signature. These fields are included selectively because the client creating a LeafNode is not always able to compute all of them. For example, a KeyPackage is created before the client knows which group it will be used with, so its signature can't bind to a <code>group_id</code>.<a href="#section-7.2-9" class="pilcrow">¶</a></p> <p id="section-7.2-10">In the case where the leaf was added to the tree based on a pre-published KeyPackage, the <code>lifetime</code> field represents the times between which clients will consider a LeafNode valid. These times are represented as absolute times, measured in seconds since the Unix epoch (1970-01-01T00:00:00Z). Applications <span class="bcp14">MUST</span> define a maximum total lifetime that is acceptable for a LeafNode, and reject any LeafNode where the total lifetime is longer than this duration. In order to avoid disagreements about whether a LeafNode has a valid lifetime, the clients in a group <span class="bcp14">SHOULD</span> maintain time synchronization (e.g., using the Network Time Protocol <span>[<a href="#RFC5905" class="cite xref">RFC5905</a>]</span>).<a href="#section-7.2-10" class="pilcrow">¶</a></p> <p id="section-7.2-11">In the case where the leaf node was inserted into the tree via a Commit message, the <code>parent_hash</code> field contains the parent hash for this leaf node (see <a href="#parent-hashes" class="auto internal xref">Section 7.9</a>).<a href="#section-7.2-11" class="pilcrow">¶</a></p> <p id="section-7.2-12">The LeafNodeTBS structure covers the fields above the signature in the LeafNode. In addition, when the leaf node was created in the context of a group (the <code>update</code> and <code>commit</code> cases), the group ID of the group is added as context to the signature.<a href="#section-7.2-12" class="pilcrow">¶</a></p> <p id="section-7.2-13">LeafNode objects stored in the group's ratchet tree are updated according to the evolution of the tree. Each modification of LeafNode content <span class="bcp14">MUST</span> be reflected by a change in its signature. This allows other members to verify the validity of the LeafNode at any time, particularly in the case of a newcomer joining the group.<a href="#section-7.2-13" class="pilcrow">¶</a></p> </section> </div> <div id="leaf-node-validation"> <section id="section-7.3"> <h3 id="name-leaf-node-validation"> <a href="#section-7.3" class="section-number selfRef">7.3. </a><a href="#name-leaf-node-validation" class="section-name selfRef">Leaf Node Validation</a> </h3> <p id="section-7.3-1">The validity of a LeafNode needs to be verified at the following stages:<a href="#section-7.3-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.3-2.1">When a LeafNode is downloaded in a KeyPackage, before it is used to add the client to the group<a href="#section-7.3-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-2.2">When a LeafNode is received by a group member in an Add, Update, or Commit message<a href="#section-7.3-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-2.3">When a client validates a ratchet tree, e.g., when joining a group or after processing a Commit<a href="#section-7.3-2.3" class="pilcrow">¶</a> </li> </ul> <p id="section-7.3-3">The client verifies the validity of a LeafNode using the following steps:<a href="#section-7.3-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.3-4.1">Verify that the credential in the LeafNode is valid, as described in <a href="#credential-validation" class="auto internal xref">Section 5.3.1</a>.<a href="#section-7.3-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.2">Verify that the signature on the LeafNode is valid using <code>signature_key</code>.<a href="#section-7.3-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.3">Verify that the LeafNode is compatible with the group's parameters. If the GroupContext has a <code>required_capabilities</code> extension, then the required extensions, proposals, and credential types <span class="bcp14">MUST</span> be listed in the LeafNode's <code>capabilities</code> field.<a href="#section-7.3-4.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.4">Verify that the credential type is supported by all members of the group, as specified by the <code>capabilities</code> field of each member's LeafNode, and that the <code>capabilities</code> field of this LeafNode indicates support for all the credential types currently in use by other members.<a href="#section-7.3-4.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.5"> <p id="section-7.3-4.5.1">Verify the <code>lifetime</code> field:<a href="#section-7.3-4.5.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.3-4.5.2.1">If the LeafNode appears in a message being sent by the client, e.g., a Proposal or a Commit, then the client <span class="bcp14">MUST</span> verify that the current time is within the range of the <code>lifetime</code> field.<a href="#section-7.3-4.5.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.5.2.2">If instead the LeafNode appears in a message being received by the client, e.g., a Proposal, a Commit, or a ratchet tree of the group the client is joining, it is <span class="bcp14">RECOMMENDED</span> that the client verifies that the current time is within the range of the <code>lifetime</code> field. (This check is not mandatory because the LeafNode might have expired in the time between when the message was sent and when it was received.)<a href="#section-7.3-4.5.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-7.3-4.6">Verify that the extensions in the LeafNode are supported by checking that the ID for each extension in the <code>extensions</code> field is listed in the <code>capabilities.extensions</code> field of the LeafNode.<a href="#section-7.3-4.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.7"> <p id="section-7.3-4.7.1">Verify the <code>leaf_node_source</code> field:<a href="#section-7.3-4.7.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.3-4.7.2.1">If the LeafNode appears in a KeyPackage, verify that <code>leaf_node_source</code> is set to <code>key_package</code>.<a href="#section-7.3-4.7.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.7.2.2">If the LeafNode appears in an Update proposal, verify that <code>leaf_node_source</code> is set to <code>update</code> and that <code>encryption_key</code> represents a different public key than the <code>encryption_key</code> in the leaf node being replaced by the Update proposal.<a href="#section-7.3-4.7.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.7.2.3">If the LeafNode appears in the <code>leaf_node</code> value of the UpdatePath in a Commit, verify that <code>leaf_node_source</code> is set to <code>commit</code>.<a href="#section-7.3-4.7.2.3" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-7.3-4.8"> <p id="section-7.3-4.8.1">Verify that the following fields are unique among the members of the group:<a href="#section-7.3-4.8.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.3-4.8.2.1"> <code>signature_key</code><a href="#section-7.3-4.8.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.3-4.8.2.2"> <code>encryption_key</code><a href="#section-7.3-4.8.2.2" class="pilcrow">¶</a> </li> </ul> </li> </ul> </section> </div> <div id="ratchet-tree-evolution"> <section id="section-7.4"> <h3 id="name-ratchet-tree-evolution"> <a href="#section-7.4" class="section-number selfRef">7.4. </a><a href="#name-ratchet-tree-evolution" class="section-name selfRef">Ratchet Tree Evolution</a> </h3> <p id="section-7.4-1">Whenever a member initiates an epoch change (i.e., commits; see <a href="#commit" class="auto internal xref">Section 12.4</a>), they may need to refresh the key pairs of their leaf and of the nodes on their leaf's direct path in order to maintain forward secrecy and post-compromise security.<a href="#section-7.4-1" class="pilcrow">¶</a></p> <p id="section-7.4-2">The member initiating the epoch change generates the fresh key pairs using the following procedure. The procedure is designed in a way that allows group members to efficiently communicate the fresh secret keys to other group members, as described in <a href="#update-paths" class="auto internal xref">Section 7.6</a>.<a href="#section-7.4-2" class="pilcrow">¶</a></p> <p id="section-7.4-3">A member updates the nodes along its direct path as follows:<a href="#section-7.4-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.4-4.1">Blank all the nodes on the direct path from the leaf to the root.<a href="#section-7.4-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.4-4.2">Generate a fresh HPKE key pair for the leaf.<a href="#section-7.4-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.4-4.3">Generate a sequence of path secrets, one for each node on the leaf's filtered direct path, as follows. In this setting, <code>path_secret[0]</code> refers to the first parent node in the filtered direct path, <code>path_secret[1]</code> to the second parent node, and so on.<a href="#section-7.4-4.3" class="pilcrow">¶</a> </li> </ul> <div class="lang-pseudocode sourcecode" id="section-7.4-5"> <pre> path_secret[0] is sampled at random path_secret[n] = DeriveSecret(path_secret[n-1], "path") </pre><a href="#section-7.4-5" class="pilcrow">¶</a> </div> <ul class="normal"> <li class="normal" id="section-7.4-6.1">Compute the sequence of HPKE key pairs <code>(node_priv,node_pub)</code>, one for each node on the leaf's direct path, as follows.<a href="#section-7.4-6.1" class="pilcrow">¶</a> </li> </ul> <div class="lang-pseudocode sourcecode" id="section-7.4-7"> <pre> node_secret[n] = DeriveSecret(path_secret[n], "node") node_priv[n], node_pub[n] = KEM.DeriveKeyPair(node_secret[n]) </pre><a href="#section-7.4-7" class="pilcrow">¶</a> </div> <p id="section-7.4-8">The node secret is derived as a temporary intermediate secret so that each secret is only used with one algorithm: The path secret is used as an input to DeriveSecret, and the node secret is used as an input to DeriveKeyPair.<a href="#section-7.4-8" class="pilcrow">¶</a></p> <p id="section-7.4-9">For example, suppose there is a group with four members, with C an unmerged leaf at Z:<a href="#section-7.4-9" class="pilcrow">¶</a></p> <span id="name-a-full-tree-with-one-unmerg"></span><div id="evolution-tree"> <figure id="figure-13"> <div id="section-7.4-10.1"> <div class="alignLeft art-svg artwork" id="section-7.4-10.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="176" text-anchor="middle" version="1.1" viewBox="0 0 120 176" width="120"> <path d="M 56,48 L 56,64" fill="none" stroke="black"></path> <path d="M 40,64 L 72,64" fill="none" stroke="black"></path> <path d="M 72,64 L 80,80" fill="none" stroke="black"></path> <path d="M 32,80 L 40,64" fill="none" stroke="black"></path> <g class="text"> <text x="56" y="36">Y</text> <text x="24" y="100">X</text> <text x="100" y="100">Z[C]</text> <text x="16" y="116">/</text> <text x="32" y="116">\</text> <text x="80" y="116">/</text> <text x="96" y="116">\</text> <text x="8" y="132">A</text> <text x="40" y="132">B</text> <text x="72" y="132">C</text> <text x="104" y="132">D</text> <text x="8" y="164">0</text> <text x="40" y="164">1</text> <text x="72" y="164">2</text> <text x="104" y="164">3</text> </g> </svg><a href="#section-7.4-10.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-13" class="selfRef">Figure 13</a>: <a href="#name-a-full-tree-with-one-unmerg" class="selfRef">A Full Tree with One Unmerged Leaf</a> </figcaption></figure> </div> <p id="section-7.4-11">If member B subsequently generates an UpdatePath based on a secret "leaf_secret", then it would generate the following sequence of path secrets:<a href="#section-7.4-11" class="pilcrow">¶</a></p> <span id="name-derivation-of-ratchet-tree-"></span><figure id="figure-14"> <div id="section-7.4-12.1"> <div class="alignLeft art-svg artwork" id="section-7.4-12.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="272" text-anchor="middle" version="1.1" viewBox="0 0 560 272" width="560"> <path d="M 48,64 L 48,96" fill="none" stroke="black"></path> <path d="M 48,144 L 48,176" fill="none" stroke="black"></path> <path d="M 128,32 L 152,32" fill="none" stroke="black"></path> <path d="M 288,32 L 344,32" fill="none" stroke="black"></path> <path d="M 128,112 L 152,112" fill="none" stroke="black"></path> <path d="M 288,112 L 344,112" fill="none" stroke="black"></path> <path d="M 104,192 L 152,192" fill="none" stroke="black"></path> <path d="M 304,192 L 344,192" fill="none" stroke="black"></path> <path d="M 368,224 L 416,224" fill="none" stroke="black"></path> <path d="M 448,224 L 496,224" fill="none" stroke="black"></path> <path d="M 368,224 C 359.16936,224 352,216.83064 352,208" fill="none" stroke="black"></path> <path d="M 416,224 C 424.83064,224 432,231.16936 432,240" fill="none" stroke="black"></path> <path d="M 448,224 C 439.16936,224 432,231.16936 432,240" fill="none" stroke="black"></path> <path d="M 496,224 C 504.83064,224 512,216.83064 512,208" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="352,192 340,186.4 340,197.6" transform="rotate(0,344,192)"></polygon> <polygon class="arrowhead" fill="black" points="352,112 340,106.4 340,117.6" transform="rotate(0,344,112)"></polygon> <polygon class="arrowhead" fill="black" points="352,32 340,26.4 340,37.6" transform="rotate(0,344,32)"></polygon> <polygon class="arrowhead" fill="black" points="160,192 148,186.4 148,197.6" transform="rotate(0,152,192)"></polygon> <polygon class="arrowhead" fill="black" points="160,112 148,106.4 148,117.6" transform="rotate(0,152,112)"></polygon> <polygon class="arrowhead" fill="black" points="160,32 148,26.4 148,37.6" transform="rotate(0,152,32)"></polygon> <polygon class="arrowhead" fill="black" points="56,144 44,138.4 44,149.6" transform="rotate(270,48,144)"></polygon> <polygon class="arrowhead" fill="black" points="56,64 44,58.4 44,69.6" transform="rotate(270,48,64)"></polygon> <g class="text"> <text x="60" y="36">path_secret[1]</text> <text x="220" y="36">node_secret[1]</text> <text x="408" y="36">node_priv[1],</text> <text x="512" y="36">node_pub[1]</text> <text x="60" y="116">path_secret[0]</text> <text x="220" y="116">node_secret[0]</text> <text x="408" y="116">node_priv[0],</text> <text x="512" y="116">node_pub[0]</text> <text x="48" y="196">leaf_secret</text> <text x="228" y="196">leaf_node_secret</text> <text x="396" y="196">leaf_priv,</text> <text x="476" y="196">leaf_pub</text> <text x="432" y="260">leaf_node</text> </g> </svg><a href="#section-7.4-12.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-14" class="selfRef">Figure 14</a>: <a href="#name-derivation-of-ratchet-tree-" class="selfRef">Derivation of Ratchet Tree Keys along a Direct Path</a> </figcaption></figure> <p id="section-7.4-13">After applying the UpdatePath, the tree will have the following structure:<a href="#section-7.4-13" class="pilcrow">¶</a></p> <span id="name-placement-of-keys-in-a-ratc"></span><figure id="figure-15"> <div id="section-7.4-14.1"> <div class="alignLeft art-svg artwork" id="section-7.4-14.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="192" text-anchor="middle" version="1.1" viewBox="0 0 256 192" width="256"> <path d="M 176,144 L 176,160" fill="none" stroke="black"></path> <path d="M 192,48 L 192,64" fill="none" stroke="black"></path> <path d="M 112,32 L 176,32" fill="none" stroke="black"></path> <path d="M 176,64 L 208,64" fill="none" stroke="black"></path> <path d="M 112,96 L 144,96" fill="none" stroke="black"></path> <path d="M 88,160 L 176,160" fill="none" stroke="black"></path> <path d="M 208,64 L 216,80" fill="none" stroke="black"></path> <path d="M 168,80 L 176,64" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="184,144 172,138.4 172,149.6" transform="rotate(270,176,144)"></polygon> <polygon class="arrowhead" fill="black" points="184,32 172,26.4 172,37.6" transform="rotate(0,176,32)"></polygon> <polygon class="arrowhead" fill="black" points="152,96 140,90.4 140,101.6" transform="rotate(0,144,96)"></polygon> <g class="text"> <text x="52" y="36">node_priv[1]</text> <text x="196" y="36">Y'</text> <text x="52" y="100">node_priv[0]</text> <text x="164" y="100">X'</text> <text x="236" y="100">Z[C]</text> <text x="152" y="116">/</text> <text x="168" y="116">\</text> <text x="216" y="116">/</text> <text x="232" y="116">\</text> <text x="144" y="132">A</text> <text x="176" y="132">B</text> <text x="208" y="132">C</text> <text x="240" y="132">D</text> <text x="40" y="164">leaf_priv</text> <text x="144" y="180">0</text> <text x="176" y="180">1</text> <text x="208" y="180">2</text> <text x="240" y="180">3</text> </g> </svg><a href="#section-7.4-14.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-15" class="selfRef">Figure 15</a>: <a href="#name-placement-of-keys-in-a-ratc" class="selfRef">Placement of Keys in a Ratchet Tree</a> </figcaption></figure> </section> </div> <div id="synchronizing-views-of-the-tree"> <section id="section-7.5"> <h3 id="name-synchronizing-views-of-the-"> <a href="#section-7.5" class="section-number selfRef">7.5. </a><a href="#name-synchronizing-views-of-the-" class="section-name selfRef">Synchronizing Views of the Tree</a> </h3> <p id="section-7.5-1">After generating fresh key material and applying it to update their local tree state as described in <a href="#ratchet-tree-evolution" class="auto internal xref">Section 7.4</a>, the generator broadcasts this update to other members of the group in a Commit message, who apply it to keep their local views of the tree in sync with the sender's. More specifically, when a member commits a change to the tree (e.g., to add or remove a member), it transmits an UpdatePath containing a set of public keys and encrypted path secrets for intermediate nodes in the filtered direct path of its leaf. The other members of the group use these values to update their view of the tree, aligning their copy of the tree to the sender's.<a href="#section-7.5-1" class="pilcrow">¶</a></p> <p id="section-7.5-2">An UpdatePath contains the following information for each node in the filtered direct path of the sender's leaf, including the root:<a href="#section-7.5-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-3.1">The public key for the node<a href="#section-7.5-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-3.2">One or more encrypted copies of the path secret corresponding to the node<a href="#section-7.5-3.2" class="pilcrow">¶</a> </li> </ul> <p id="section-7.5-4">The path secret value for a given node is encrypted to the subtree rooted at the parent's non-updated child, i.e., the child on the copath of the sender's leaf node. There is one encryption of the path secret to each public key in the resolution of the non-updated child.<a href="#section-7.5-4" class="pilcrow">¶</a></p> <p id="section-7.5-5">A member of the group <em>updates their direct path</em> by computing new values for their leaf node and the nodes along their filtered direct path as follows:<a href="#section-7.5-5" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-7.5-6"> <li id="section-7.5-6.1">Blank all nodes along the direct path of the sender's leaf.<a href="#section-7.5-6.1" class="pilcrow">¶</a> </li> <li id="section-7.5-6.2"> <p id="section-7.5-6.2.1">Compute updated path secrets and public keys for the nodes on the sender's filtered direct path.<a href="#section-7.5-6.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-6.2.2.1">Generate a sequence of path secrets of the same length as the filtered direct path, as defined in <a href="#ratchet-tree-evolution" class="auto internal xref">Section 7.4</a>.<a href="#section-7.5-6.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-6.2.2.2">For each node in the filtered direct path, replace the node's public key with the <code>node_pub[n]</code> value derived from the corresponding path secret <code>path_secret[n]</code>.<a href="#section-7.5-6.2.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li id="section-7.5-6.3">Compute the new parent hashes for the nodes along the filtered direct path and the sender's leaf node.<a href="#section-7.5-6.3" class="pilcrow">¶</a> </li> <li id="section-7.5-6.4"> <p id="section-7.5-6.4.1">Update the leaf node for the sender.<a href="#section-7.5-6.4.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-6.4.2.1">Set the <code>leaf_node_source</code> to <code>commit</code>.<a href="#section-7.5-6.4.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-6.4.2.2">Set the <code>encryption_key</code> to the public key of a freshly sampled key pair.<a href="#section-7.5-6.4.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-6.4.2.3">Set the parent hash to the parent hash for the leaf.<a href="#section-7.5-6.4.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-6.4.2.4">Re-sign the leaf node with its new contents.<a href="#section-7.5-6.4.2.4" class="pilcrow">¶</a> </li> </ul> </li> </ol> <p id="section-7.5-7">Since the new leaf node effectively updates an existing leaf node in the group, it <span class="bcp14">MUST</span> adhere to the same restrictions as LeafNodes used in Update proposals (aside from <code>leaf_node_source</code>). The application <span class="bcp14">MAY</span> specify other changes to the leaf node, e.g., providing a new signature key, updated capabilities, or different extensions.<a href="#section-7.5-7" class="pilcrow">¶</a></p> <p id="section-7.5-8">The member then <em>encrypts path secrets to the group</em>. For each node in the member's filtered direct path, the member takes the following steps:<a href="#section-7.5-8" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-7.5-9"> <li id="section-7.5-9.1">Compute the resolution of the node's child that is on the copath of the sender (the child that is not in the direct path of the sender). Any new member (from an Add proposal) added in the same Commit <span class="bcp14">MUST</span> be excluded from this resolution.<a href="#section-7.5-9.1" class="pilcrow">¶</a> </li> <li id="section-7.5-9.2">For each node in the resolution, encrypt the path secret for the direct path node using the public key of the resolution node, as defined in <a href="#update-paths" class="auto internal xref">Section 7.6</a>.<a href="#section-7.5-9.2" class="pilcrow">¶</a> </li> </ol> <p id="section-7.5-10">The recipient of an UpdatePath performs the corresponding steps. First, the recipient <em>merges UpdatePath into the tree</em>:<a href="#section-7.5-10" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-7.5-11"> <li id="section-7.5-11.1">Blank all nodes on the direct path of the sender's leaf.<a href="#section-7.5-11.1" class="pilcrow">¶</a> </li> <li id="section-7.5-11.2"> <p id="section-7.5-11.2.1">For all nodes on the filtered direct path of the sender's leaf,<a href="#section-7.5-11.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-11.2.2.1">Set the public key to the public key in the UpdatePath.<a href="#section-7.5-11.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-11.2.2.2">Set the list of unmerged leaves to the empty list.<a href="#section-7.5-11.2.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li id="section-7.5-11.3"> <p id="section-7.5-11.3.1">Compute parent hashes for the nodes in the sender's filtered direct path, and verify that the <code>parent_hash</code> field of the leaf node matches the parent hash for the first node in its filtered direct path.<a href="#section-7.5-11.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-11.3.2.1">Note that these hashes are computed from root to leaf, so that each hash incorporates all the non-blank nodes above it. The root node always has a zero-length hash for its parent hash.<a href="#section-7.5-11.3.2.1" class="pilcrow">¶</a> </li> </ul> </li> </ol> <p id="section-7.5-12">Second, the recipient <em>decrypts the path secrets</em>:<a href="#section-7.5-12" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-7.5-13"> <li id="section-7.5-13.1">Identify a node in the filtered direct path for which the recipient is in the subtree of the non-updated child.<a href="#section-7.5-13.1" class="pilcrow">¶</a> </li> <li id="section-7.5-13.2">Identify a node in the resolution of the copath node for which the recipient has a private key.<a href="#section-7.5-13.2" class="pilcrow">¶</a> </li> <li id="section-7.5-13.3">Decrypt the path secret for the parent of the copath node using the private key from the resolution node.<a href="#section-7.5-13.3" class="pilcrow">¶</a> </li> <li id="section-7.5-13.4">Derive path secrets for ancestors of that node in the sender's filtered direct path using the algorithm described above.<a href="#section-7.5-13.4" class="pilcrow">¶</a> </li> <li id="section-7.5-13.5">Derive the node secrets and node key pairs from the path secrets.<a href="#section-7.5-13.5" class="pilcrow">¶</a> </li> <li id="section-7.5-13.6">Verify that the derived public keys are the same as the corresponding public keys sent in the UpdatePath.<a href="#section-7.5-13.6" class="pilcrow">¶</a> </li> <li id="section-7.5-13.7">Store the derived private keys in the corresponding ratchet tree nodes.<a href="#section-7.5-13.7" class="pilcrow">¶</a> </li> </ol> <p id="section-7.5-14">For example, in order to communicate the example update described in <a href="#ratchet-tree-evolution" class="auto internal xref">Section 7.4</a>, the member at node B would transmit the following values:<a href="#section-7.5-14" class="pilcrow">¶</a></p> <table class="center" id="table-3"> <caption><a href="#table-3" class="selfRef">Table 3</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Public Key</th> <th class="text-left" rowspan="1" colspan="1">Ciphertext(s)</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1"> <code>node_pub[1]</code> </td> <td class="text-left" rowspan="1" colspan="1"> <code>E(pk(Z), path_secret[1])</code>, <code>E(pk(C), path_secret[1]</code>)</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1"> <code>node_pub[0]</code> </td> <td class="text-left" rowspan="1" colspan="1"> <code>E(pk(A), path_secret[0])</code> </td> </tr> </tbody> </table> <p id="section-7.5-16">In this table, the value node_pub[i] represents the public key derived from node_secret[i], pk(X) represents the current public key of node X, and E(K, S) represents the public key encryption of the path secret S to the public key K (using HPKE).<a href="#section-7.5-16" class="pilcrow">¶</a></p> <p id="section-7.5-17">A recipient at node A would decrypt <code>E(pk(A), path_secret\[0\])</code> to obtain <code>path_secret\[0\]</code>, then use it to derive <code>path_secret[1]</code> and the resulting node secrets and key pairs. Thus, A would have the private keys to nodes X' and Y', in accordance with the tree invariant.<a href="#section-7.5-17" class="pilcrow">¶</a></p> <p id="section-7.5-18">Similarly, a recipient at node D would decrypt <code>E(pk(Z), path_secret[1])</code> to obtain <code>path_secret[1]</code>, then use it to derive the node secret and key pair for the node Y'. As required to maintain the tree invariant, node D does not receive the private key for the node X', since X' is not an ancestor of D.<a href="#section-7.5-18" class="pilcrow">¶</a></p> <p id="section-7.5-19">After processing the update, each recipient <span class="bcp14">MUST</span> delete outdated key material, specifically:<a href="#section-7.5-19" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.5-20.1">The path secrets and node secrets used to derive each updated node key pair.<a href="#section-7.5-20.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.5-20.2">Each outdated node key pair that was replaced by the update.<a href="#section-7.5-20.2" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="update-paths"> <section id="section-7.6"> <h3 id="name-update-paths"> <a href="#section-7.6" class="section-number selfRef">7.6. </a><a href="#name-update-paths" class="section-name selfRef">Update Paths</a> </h3> <p id="section-7.6-1">As described in <a href="#commit" class="auto internal xref">Section 12.4</a>, each Commit message may optionally contain an UpdatePath, with a new LeafNode and set of parent nodes for the sender's filtered direct path. For each parent node, the UpdatePath contains a new public key and encrypted path secret. The parent nodes are kept in the same order as the filtered direct path.<a href="#section-7.6-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-7.6-2"> <pre> struct { opaque kem_output<V>; opaque ciphertext<V>; } HPKECiphertext; struct { HPKEPublicKey encryption_key; HPKECiphertext encrypted_path_secret<V>; } UpdatePathNode; struct { LeafNode leaf_node; UpdatePathNode nodes<V>; } UpdatePath; </pre><a href="#section-7.6-2" class="pilcrow">¶</a> </div> <p id="section-7.6-3">For each UpdatePathNode, the resolution of the corresponding copath node <span class="bcp14">MUST</span> exclude all new leaf nodes added as part of the current Commit. The length of the <code>encrypted_path_secret</code> vector <span class="bcp14">MUST</span> be equal to the length of the resolution of the copath node (excluding new leaf nodes), with each ciphertext being the encryption to the respective resolution node.<a href="#section-7.6-3" class="pilcrow">¶</a></p> <p id="section-7.6-4" class="keepWithNext">The HPKECiphertext values are encrypted and decrypted as follows:<a href="#section-7.6-4" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-7.6-5"> <pre> (kem_output, ciphertext) = EncryptWithLabel(node_public_key, "UpdatePathNode", group_context, path_secret) path_secret = DecryptWithLabel(node_private_key, "UpdatePathNode", group_context, kem_output, ciphertext) </pre><a href="#section-7.6-5" class="pilcrow">¶</a> </div> <p id="section-7.6-6">Here <code>node_public_key</code> is the public key of the node for which the path secret is encrypted, <code>group_context</code> is the provisional GroupContext object for the group, and the <code>EncryptWithLabel</code> function is as defined in <a href="#public-key-encryption" class="auto internal xref">Section 5.1.3</a>.<a href="#section-7.6-6" class="pilcrow">¶</a></p> </section> </div> <div id="adding-and-removing-leaves"> <section id="section-7.7"> <h3 id="name-adding-and-removing-leaves"> <a href="#section-7.7" class="section-number selfRef">7.7. </a><a href="#name-adding-and-removing-leaves" class="section-name selfRef">Adding and Removing Leaves</a> </h3> <p id="section-7.7-1">In addition to the path-based updates to the tree described above, it is also necessary to add and remove leaves of the tree in order to reflect changes to the membership of the group (see Sections <a href="#add" class="auto internal xref">12.1.1</a> and <a href="#remove" class="auto internal xref">12.1.3</a>). Since the tree is always full, adding or removing leaves corresponds to increasing or decreasing the depth of the tree, resulting in the number of leaves being doubled or halved. These operations are also known as <em>extending</em> and <em>truncating</em> the tree.<a href="#section-7.7-1" class="pilcrow">¶</a></p> <p id="section-7.7-2">Leaves are always added and removed at the right edge of the tree. When the size of the tree needs to be increased, a new blank root node is added, whose left subtree is the existing tree and right subtree is a new all-blank subtree. This operation is typically done when adding a member to the group.<a href="#section-7.7-2" class="pilcrow">¶</a></p> <span id="name-extending-the-tree-to-make-"></span><figure id="figure-16"> <div class="alignLeft art-ascii-art art-text artwork" id="section-7.7-3.1"> <pre> _ <-- new blank root _ __|__ __|__ / \ / \ X ===> X _ <-- new blank subtree ===> X _ / \ / \ / \ / \ / \ A B A B _ _ A B C _ ^ | new member --+ </pre> </div> <figcaption><a href="#figure-16" class="selfRef">Figure 16</a>: <a href="#name-extending-the-tree-to-make-" class="selfRef">Extending the Tree to Make Room for a Third Member</a> </figcaption></figure> <p id="section-7.7-4">When the right subtree of the tree no longer has any non-blank nodes, it can be safely removed. The root of the tree and the right subtree are discarded (whether or not the root node is blank). The left child of the root becomes the new root node, and the left subtree becomes the new tree. This operation is typically done after removing a member from the group.<a href="#section-7.7-4" class="pilcrow">¶</a></p> <span id="name-cleaning-up-after-removing-"></span><figure id="figure-17"> <div class="alignLeft art-ascii-art art-text artwork" id="section-7.7-5.1"> <pre> Y Y __|__ __|__ / \ / \ X _ ===> X _ ==> X <-- new root / \ / \ / \ / \ / \ A B C _ A B _ _ A B ^ | removed member --+ </pre> </div> <figcaption><a href="#figure-17" class="selfRef">Figure 17</a>: <a href="#name-cleaning-up-after-removing-" class="selfRef">Cleaning Up after Removing Member C</a> </figcaption></figure> <p id="section-7.7-6">Concrete algorithms for these operations on array-based and link-based trees are provided in Appendices <a href="#array-based-trees" class="auto internal xref">C</a> and <a href="#link-based-trees" class="auto internal xref">D</a>. The concrete algorithms are non-normative. An implementation may use any algorithm that produces the correct tree in its internal representation.<a href="#section-7.7-6" class="pilcrow">¶</a></p> </section> </div> <div id="tree-hashes"> <section id="section-7.8"> <h3 id="name-tree-hashes"> <a href="#section-7.8" class="section-number selfRef">7.8. </a><a href="#name-tree-hashes" class="section-name selfRef">Tree Hashes</a> </h3> <p id="section-7.8-1">MLS hashes the contents of the tree in two ways to authenticate different properties of the tree. <em>Tree hashes</em> are defined in this section, and <em>parent hashes</em> are defined in <a href="#parent-hashes" class="auto internal xref">Section 7.9</a>.<a href="#section-7.8-1" class="pilcrow">¶</a></p> <p id="section-7.8-2">Each node in a ratchet tree has a tree hash that summarizes the subtree below that node. The tree hash of the root is used in the GroupContext to confirm that the group agrees on the whole tree. Tree hashes are computed recursively from the leaves up to the root.<a href="#section-7.8-2" class="pilcrow">¶</a></p> <span id="name-composition-of-the-tree-has"></span><figure id="figure-18"> <div id="section-7.8-3.1"> <div class="alignLeft art-svg artwork" id="section-7.8-3.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="112" text-anchor="middle" version="1.1" viewBox="0 0 128 112" width="128"> <path d="M 24,32 L 40,32" fill="none" stroke="black"></path> <path d="M 72,48 L 88,80" fill="none" stroke="black"></path> <path d="M 40,80 L 56,48" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="80,48 68,42.4 68,53.6" transform="rotate(243.43494882292202,72,48)"></polygon> <polygon class="arrowhead" fill="black" points="64,48 52,42.4 52,53.6" transform="rotate(296.565051177078,56,48)"></polygon> <polygon class="arrowhead" fill="black" points="48,32 36,26.4 36,37.6" transform="rotate(0,40,32)"></polygon> <g class="text"> <text x="8" y="36">P</text> <text x="72" y="36">th(P)</text> <text x="24" y="100">th(L)</text> <text x="104" y="100">th(R)</text> </g> </svg><a href="#section-7.8-3.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-18" class="selfRef">Figure 18</a>: <a href="#name-composition-of-the-tree-has" class="selfRef">Composition of the Tree Hash</a> </figcaption></figure> <p id="section-7.8-4">The tree hash of an individual node is the hash of the node's TreeHashInput object, which may contain either a LeafNodeHashInput or a ParentNodeHashInput depending on the type of node. LeafNodeHashInput objects contain the <code>leaf_index</code> and the LeafNode (if any). ParentNodeHashInput objects contain the ParentNode (if any) and the tree hash of the node's left and right children. For both parent and leaf nodes, the optional node value <span class="bcp14">MUST</span> be absent if the node is blank and present if the node contains a value.<a href="#section-7.8-4" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-7.8-5"> <pre> enum { reserved(0), leaf(1), parent(2), (255) } NodeType; struct { NodeType node_type; select (TreeHashInput.node_type) { case leaf: LeafNodeHashInput leaf_node; case parent: ParentNodeHashInput parent_node; }; } TreeHashInput; struct { uint32 leaf_index; optional<LeafNode> leaf_node; } LeafNodeHashInput; struct { optional<ParentNode> parent_node; opaque left_hash<V>; opaque right_hash<V>; } ParentNodeHashInput; </pre><a href="#section-7.8-5" class="pilcrow">¶</a> </div> <p id="section-7.8-6">The tree hash of an entire tree corresponds to the tree hash of the root node, which is computed recursively by starting at the leaf nodes and building up.<a href="#section-7.8-6" class="pilcrow">¶</a></p> </section> </div> <div id="parent-hashes"> <section id="section-7.9"> <h3 id="name-parent-hashes"> <a href="#section-7.9" class="section-number selfRef">7.9. </a><a href="#name-parent-hashes" class="section-name selfRef">Parent Hashes</a> </h3> <p id="section-7.9-1">While tree hashes summarize the state of a tree at point in time, parent hashes capture information about how keys in the tree were populated.<a href="#section-7.9-1" class="pilcrow">¶</a></p> <p id="section-7.9-2">When a client sends a Commit to change a group, it can include an UpdatePath to assign new keys to the nodes along its filtered direct path. When a client computes an UpdatePath (as defined in <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>), it computes and signs a parent hash that summarizes the state of the tree after the UpdatePath has been applied. These summaries are constructed in a chain from the root to the member's leaf so that the part of the chain closer to the root can be overwritten as nodes set in one UpdatePath are reset by a later UpdatePath.<a href="#section-7.9-2" class="pilcrow">¶</a></p> <span id="name-inputs-to-a-parent-hash"></span><figure id="figure-19"> <div id="section-7.9-3.1"> <div class="alignLeft art-svg artwork" id="section-7.9-3.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="176" text-anchor="middle" version="1.1" viewBox="0 0 216 176" width="216"> <path d="M 112,96 L 128,96" fill="none" stroke="black"></path> <path d="M 160,112 L 176,144" fill="none" stroke="black"></path> <path d="M 128,144 L 144,112" fill="none" stroke="black"></path> <path d="M 160,80 L 176,48" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="168,112 156,106.4 156,117.6" transform="rotate(243.43494882292202,160,112)"></polygon> <polygon class="arrowhead" fill="black" points="168,80 156,74.4 156,85.6" transform="rotate(116.56505117707799,160,80)"></polygon> <polygon class="arrowhead" fill="black" points="136,144 124,138.4 124,149.6" transform="rotate(116.56505117707799,128,144)"></polygon> <polygon class="arrowhead" fill="black" points="136,96 124,90.4 124,101.6" transform="rotate(0,128,96)"></polygon> <g class="text"> <text x="192" y="36">ph(Q)</text> <text x="52" y="100">P.public_key</text> <text x="160" y="100">ph(P)</text> <text x="80" y="164">N.parent_hash</text> <text x="192" y="164">th(S)</text> </g> </svg><a href="#section-7.9-3.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-19" class="selfRef">Figure 19</a>: <a href="#name-inputs-to-a-parent-hash" class="selfRef">Inputs to a Parent Hash</a> </figcaption></figure> <p id="section-7.9-4">As a result, the signature over the parent hash in each member's leaf effectively signs the subtree of the tree that hasn't been changed since that leaf was last changed in an UpdatePath. A new member joining the group uses these parent hashes to verify that the parent nodes in the tree were set by members of the group, not chosen by an external attacker. For an example of how this works, see <a href="#ph-evolution" class="auto internal xref">Appendix B</a>.<a href="#section-7.9-4" class="pilcrow">¶</a></p> <p id="section-7.9-5">Consider a ratchet tree with a non-blank parent node P and children D and S (for "parent", "direct path", and "sibling"), with D and P in the direct path of a leaf node L (for "leaf"):<a href="#section-7.9-5" class="pilcrow">¶</a></p> <span id="name-nodes-involved-in-a-parent-"></span><div id="parent-hash-nodes"> <figure id="figure-20"> <div class="alignLeft art-ascii-art art-text artwork" id="section-7.9-6.1"> <pre> ... / P __|__ / \ D S / \ / \ ... ... ... ... / L </pre> </div> <figcaption><a href="#figure-20" class="selfRef">Figure 20</a>: <a href="#name-nodes-involved-in-a-parent-" class="selfRef">Nodes Involved in a Parent Hash Computation</a> </figcaption></figure> </div> <p id="section-7.9-7">The parent hash of P changes whenever an UpdatePath object is applied to the ratchet tree along a path from a leaf L traversing node D (and hence also P). The new "Parent hash of P (with copath child S)" is obtained by hashing P's ParentHashInput struct.<a href="#section-7.9-7" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-7.9-8"> <pre> struct { HPKEPublicKey encryption_key; opaque parent_hash<V>; opaque original_sibling_tree_hash<V>; } ParentHashInput; </pre><a href="#section-7.9-8" class="pilcrow">¶</a> </div> <p id="section-7.9-9">The field <code>encryption_key</code> contains the HPKE public key of P. If P is the root, then the <code>parent_hash</code> field is set to a zero-length octet string. Otherwise, <code>parent_hash</code> is the parent hash of the next node after P on the filtered direct path of the leaf L. This way, P's parent hash fixes the new HPKE public key of each non-blank node on the path from P to the root. Note that the path from P to the root may contain some blank nodes that are not fixed by P's parent hash. However, for each node that has an HPKE key, this key is fixed by P's parent hash.<a href="#section-7.9-9" class="pilcrow">¶</a></p> <p id="section-7.9-10">Finally, <code>original_sibling_tree_hash</code> is the tree hash of S in the ratchet tree modified as follows: For each leaf L in <code>P.unmerged_leaves</code>, blank L and remove it from the <code>unmerged_leaves</code> sets of all parent nodes.<a href="#section-7.9-10" class="pilcrow">¶</a></p> <p id="section-7.9-11">Observe that <code>original_sibling_tree_hash</code> does not change between updates of P. This property is crucial for the correctness of the protocol.<a href="#section-7.9-11" class="pilcrow">¶</a></p> <p id="section-7.9-12">Note that <code>original_sibling_tree_hash</code> is the tree hash of S, not the parent hash. The <code>parent_hash</code> field in ParentHashInput captures information about the nodes above P. the <code>original_sibling_tree_hash</code> captures information about the subtree under S that is not being updated (and thus the subtree to which a path secret for P would be encrypted according to <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>).<a href="#section-7.9-12" class="pilcrow">¶</a></p> <p id="section-7.9-13">For example, in the following tree:<a href="#section-7.9-13" class="pilcrow">¶</a></p> <span id="name-a-tree-illustrating-parent-"></span><div id="parent-hash-tree"> <figure id="figure-21"> <div class="alignLeft art-ascii-art art-text artwork" id="section-7.9-14.1"> <pre> W [F] ______|_____ / \ U Y [F] __|__ __|__ / \ / \ T _ _ _ / \ / \ / \ / \ A B C D E F G _ </pre> </div> <figcaption><a href="#figure-21" class="selfRef">Figure 21</a>: <a href="#name-a-tree-illustrating-parent-" class="selfRef">A Tree Illustrating Parent Hash Computations</a> </figcaption></figure> </div> <p id="section-7.9-15">With P = W and S = Y, <code>original_sibling_tree_hash</code> is the tree hash of the following tree:<a href="#section-7.9-15" class="pilcrow">¶</a></p> <div class="alignLeft art-ascii-art art-text artwork" id="section-7.9-16"> <pre> Y __|__ / \ _ _ / \ / \ E _ G _ </pre><a href="#section-7.9-16" class="pilcrow">¶</a> </div> <p id="section-7.9-17">Because <code>W.unmerged_leaves</code> includes F, F is blanked and removed from <code>Y.unmerged_leaves</code>.<a href="#section-7.9-17" class="pilcrow">¶</a></p> <p id="section-7.9-18">Note that no recomputation is needed if the tree hash of S is unchanged since the last time P was updated. This is the case for computing or processing a Commit whose UpdatePath traverses P, since the Commit itself resets P. (In other words, it is only necessary to recompute the original sibling tree hash when validating a group's tree on joining.) More generally, if none of the entries in <code>P.unmerged_leaves</code> are in the subtree under S (and thus no leaves were blanked), then the original tree hash at S is the tree hash of S in the current tree.<a href="#section-7.9-18" class="pilcrow">¶</a></p> <p id="section-7.9-19">If it is necessary to recompute the original tree hash of a node, the efficiency of recomputation can be improved by caching intermediate tree hashes, to avoid recomputing over the subtree when the subtree is included in multiple parent hashes. A subtree hash can be reused as long as the intersection of the parent's unmerged leaves with the subtree is the same as in the earlier computation.<a href="#section-7.9-19" class="pilcrow">¶</a></p> <div id="using-parent-hashes"> <section id="section-7.9.1"> <h4 id="name-using-parent-hashes"> <a href="#section-7.9.1" class="section-number selfRef">7.9.1. </a><a href="#name-using-parent-hashes" class="section-name selfRef">Using Parent Hashes</a> </h4> <p id="section-7.9.1-1">In ParentNode objects and LeafNode objects with <code>leaf_node_source</code> set to <code>commit</code>, the value of the <code>parent_hash</code> field is the parent hash of the next non-blank parent node above the node in question (the next node in the filtered direct path). Using the node labels in <a href="#parent-hash-nodes" class="auto internal xref">Figure 20</a>, the <code>parent_hash</code> field of D is equal to the parent hash of P with copath child S. This is the case even when the node D is a leaf node.<a href="#section-7.9.1-1" class="pilcrow">¶</a></p> <p id="section-7.9.1-2">The <code>parent_hash</code> field of a LeafNode is signed by the member. The signature of such a LeafNode thus attests to which keys the group member introduced into the ratchet tree and to whom the corresponding secret keys were sent, in addition to the other contents of the LeafNode. This prevents malicious insiders from constructing artificial ratchet trees with a node D whose HPKE secret key is known to the insider, yet where the insider isn't assigned a leaf in the subtree rooted at D. Indeed, such a ratchet tree would violate the tree invariant.<a href="#section-7.9.1-2" class="pilcrow">¶</a></p> </section> </div> <div id="verifying-parent-hashes"> <section id="section-7.9.2"> <h4 id="name-verifying-parent-hashes"> <a href="#section-7.9.2" class="section-number selfRef">7.9.2. </a><a href="#name-verifying-parent-hashes" class="section-name selfRef">Verifying Parent Hashes</a> </h4> <p id="section-7.9.2-1">Parent hashes are verified at two points in the protocol: When joining a group and when processing a Commit.<a href="#section-7.9.2-1" class="pilcrow">¶</a></p> <p id="section-7.9.2-2">The parent hash in a node D is valid with respect to a parent node P if the following criteria hold. Here C and S are the children of P (for "child" and "sibling"), with C being the child that is on the direct path of D (possibly D itself) and S being the other child:<a href="#section-7.9.2-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-7.9.2-3.1">D is a descendant of P in the tree.<a href="#section-7.9.2-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.9.2-3.2">The <code>parent_hash</code> field of D is equal to the parent hash of P with copath child S.<a href="#section-7.9.2-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-7.9.2-3.3">D is in the resolution of C, and the intersection of P's <code>unmerged_leaves</code> with the subtree under C is equal to the resolution of C with D removed.<a href="#section-7.9.2-3.3" class="pilcrow">¶</a> </li> </ul> <p id="section-7.9.2-4">These checks verify that D and P were updated at the same time (in the same UpdatePath), and that they were neighbors in the UpdatePath because the nodes in between them would have omitted from the filtered direct path.<a href="#section-7.9.2-4" class="pilcrow">¶</a></p> <p id="section-7.9.2-5">A parent node P is "parent-hash valid" if it can be chained back to a leaf node in this way. That is, if there is leaf node L and a sequence of parent nodes P_1, ..., P_N such that P_N = P and each step in the chain is authenticated by a parent hash, then L's parent hash is valid with respect to P_1, P_1's parent hash is valid with respect to P_2, and so on.<a href="#section-7.9.2-5" class="pilcrow">¶</a></p> <p id="section-7.9.2-6">When joining a group, the new member <span class="bcp14">MUST</span> authenticate that each non-blank parent node P is parent-hash valid. This can be done "bottom up" by building chains up from leaves and verifying that all non-blank parent nodes are covered by exactly one such chain, or "top down" by verifying that there is exactly one descendant of each non-blank parent node for which the parent node is parent-hash valid.<a href="#section-7.9.2-6" class="pilcrow">¶</a></p> <p id="section-7.9.2-7">When processing a Commit message that includes an UpdatePath, clients <span class="bcp14">MUST</span> recompute the expected value of <code>parent_hash</code> for the committer's new leaf and verify that it matches the <code>parent_hash</code> value in the supplied <code>leaf_node</code>. After being merged into the tree, the nodes in the UpdatePath form a parent-hash chain from the committer's leaf to the root.<a href="#section-7.9.2-7" class="pilcrow">¶</a></p> </section> </div> </section> </div> </section> </div> <div id="key-schedule"> <section id="section-8"> <h2 id="name-key-schedule"> <a href="#section-8" class="section-number selfRef">8. </a><a href="#name-key-schedule" class="section-name selfRef">Key Schedule</a> </h2> <p id="section-8-1">Group keys are derived using the <code>Extract</code> and <code>Expand</code> functions from the KDF for the group's cipher suite, as well as the functions defined below:<a href="#section-8-1" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8-2"> <pre> ExpandWithLabel(Secret, Label, Context, Length) = KDF.Expand(Secret, KDFLabel, Length) DeriveSecret(Secret, Label) = ExpandWithLabel(Secret, Label, "", KDF.Nh) </pre><a href="#section-8-2" class="pilcrow">¶</a> </div> <p id="section-8-3">Where KDFLabel is specified as:<a href="#section-8-3" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-8-4"> <pre> struct { uint16 length; opaque label<V>; opaque context<V>; } KDFLabel; </pre><a href="#section-8-4" class="pilcrow">¶</a> </div> <p id="section-8-5">And its fields are set to:<a href="#section-8-5" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8-6"> <pre> length = Length; label = "MLS 1.0 " + Label; context = Context; </pre><a href="#section-8-6" class="pilcrow">¶</a> </div> <p id="section-8-7">The value <code>KDF.Nh</code> is the size of an output from <code>KDF.Extract</code>, in bytes. In the below diagram:<a href="#section-8-7" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-8-8.1">KDF.Extract takes its salt argument from the top and its Input Keying Material (IKM) argument from the left.<a href="#section-8-8.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-8-8.2">DeriveSecret takes its Secret argument from the incoming arrow.<a href="#section-8-8.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-8-8.3"> <code>0</code> represents an all-zero byte string of length <code>KDF.Nh</code>.<a href="#section-8-8.3" class="pilcrow">¶</a> </li> </ul> <p id="section-8-9">When processing a handshake message, a client combines the following information to derive new epoch secrets:<a href="#section-8-9" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-8-10.1">The init secret from the previous epoch<a href="#section-8-10.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-8-10.2">The commit secret for the current epoch<a href="#section-8-10.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-8-10.3">The GroupContext object for current epoch<a href="#section-8-10.3" class="pilcrow">¶</a> </li> </ul> <p id="section-8-11">Given these inputs, the derivation of secrets for an epoch proceeds as shown in the following diagram:<a href="#section-8-11" class="pilcrow">¶</a></p> <span id="name-the-mls-key-schedule"></span><figure id="figure-22"> <div id="section-8-12.1"> <div class="alignLeft art-svg artwork" id="section-8-12.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="656" text-anchor="middle" version="1.1" viewBox="0 0 584 656" width="584"> <path d="M 216,48 L 216,80" fill="none" stroke="black"></path> <path d="M 216,112 L 216,144" fill="none" stroke="black"></path> <path d="M 216,176 L 216,208" fill="none" stroke="black"></path> <path d="M 216,232 L 216,272" fill="none" stroke="black"></path> <path d="M 216,304 L 216,384" fill="none" stroke="black"></path> <path d="M 216,416 L 216,448" fill="none" stroke="black"></path> <path d="M 216,472 L 216,560" fill="none" stroke="black"></path> <path d="M 216,592 L 216,624" fill="none" stroke="black"></path> <path d="M 152,96 L 168,96" fill="none" stroke="black"></path> <path d="M 152,288 L 168,288" fill="none" stroke="black"></path> <path d="M 216,336 L 240,336" fill="none" stroke="black"></path> <path d="M 216,512 L 240,512" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="248,512 236,506.4 236,517.6" transform="rotate(0,240,512)"></polygon> <polygon class="arrowhead" fill="black" points="248,336 236,330.4 236,341.6" transform="rotate(0,240,336)"></polygon> <polygon class="arrowhead" fill="black" points="224,624 212,618.4 212,629.6" transform="rotate(90,216,624)"></polygon> <polygon class="arrowhead" fill="black" points="224,560 212,554.4 212,565.6" transform="rotate(90,216,560)"></polygon> <polygon class="arrowhead" fill="black" points="224,448 212,442.4 212,453.6" transform="rotate(90,216,448)"></polygon> <polygon class="arrowhead" fill="black" points="224,384 212,378.4 212,389.6" transform="rotate(90,216,384)"></polygon> <polygon class="arrowhead" fill="black" points="224,272 212,266.4 212,277.6" transform="rotate(90,216,272)"></polygon> <polygon class="arrowhead" fill="black" points="224,208 212,202.4 212,213.6" transform="rotate(90,216,208)"></polygon> <polygon class="arrowhead" fill="black" points="224,144 212,138.4 212,149.6" transform="rotate(90,216,144)"></polygon> <polygon class="arrowhead" fill="black" points="224,80 212,74.4 212,85.6" transform="rotate(90,216,80)"></polygon> <polygon class="arrowhead" fill="black" points="176,288 164,282.4 164,293.6" transform="rotate(0,168,288)"></polygon> <polygon class="arrowhead" fill="black" points="176,96 164,90.4 164,101.6" transform="rotate(0,168,96)"></polygon> <g class="text"> <text x="232" y="36">init_secret_[n-1]</text> <text x="88" y="100">commit_secret</text> <text x="224" y="100">KDF.Extract</text> <text x="220" y="164">ExpandWithLabel(.,</text> <text x="336" y="164">"joiner",</text> <text x="448" y="164">GroupContext_[n],</text> <text x="552" y="164">KDF.Nh)</text> <text x="224" y="228">joiner_secret</text> <text x="44" y="292">psk_secret</text> <text x="104" y="292">(or</text> <text x="132" y="292">0)</text> <text x="224" y="292">KDF.Extract</text> <text x="312" y="340">DeriveSecret(.,</text> <text x="420" y="340">"welcome")</text> <text x="256" y="356">=</text> <text x="324" y="356">welcome_secret</text> <text x="220" y="404">ExpandWithLabel(.,</text> <text x="332" y="404">"epoch",</text> <text x="440" y="404">GroupContext_[n],</text> <text x="544" y="404">KDF.Nh)</text> <text x="220" y="468">epoch_secret</text> <text x="312" y="516">DeriveSecret(.,</text> <text x="412" y="516"><label>)</text> <text x="256" y="532">=</text> <text x="300" y="532"><secret></text> <text x="224" y="580">DeriveSecret(.,</text> <text x="320" y="580">"init")</text> <text x="224" y="644">init_secret_[n]</text> </g> </svg><a href="#section-8-12.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-22" class="selfRef">Figure 22</a>: <a href="#name-the-mls-key-schedule" class="selfRef">The MLS Key Schedule</a> </figcaption></figure> <p id="section-8-13">A number of values are derived from the epoch secret for different purposes:<a href="#section-8-13" class="pilcrow">¶</a></p> <span id="name-epoch-derived-secrets"></span><div id="epoch-derived-secrets"> <table class="center" id="table-4"> <caption> <a href="#table-4" class="selfRef">Table 4</a>: <a href="#name-epoch-derived-secrets" class="selfRef">Epoch-Derived Secrets</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Label</th> <th class="text-left" rowspan="1" colspan="1">Secret</th> <th class="text-left" rowspan="1" colspan="1">Purpose</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">"sender data"</td> <td class="text-left" rowspan="1" colspan="1"> <code>sender_data_secret</code> </td> <td class="text-left" rowspan="1" colspan="1">Deriving keys to encrypt sender data</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"encryption"</td> <td class="text-left" rowspan="1" colspan="1"> <code>encryption_secret</code> </td> <td class="text-left" rowspan="1" colspan="1">Deriving message encryption keys (via the secret tree)</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"exporter"</td> <td class="text-left" rowspan="1" colspan="1"> <code>exporter_secret</code> </td> <td class="text-left" rowspan="1" colspan="1">Deriving exported secrets</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"external"</td> <td class="text-left" rowspan="1" colspan="1"> <code>external_secret</code> </td> <td class="text-left" rowspan="1" colspan="1">Deriving the external init key</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"confirm"</td> <td class="text-left" rowspan="1" colspan="1"> <code>confirmation_key</code> </td> <td class="text-left" rowspan="1" colspan="1">Computing the confirmation MAC for an epoch</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"membership"</td> <td class="text-left" rowspan="1" colspan="1"> <code>membership_key</code> </td> <td class="text-left" rowspan="1" colspan="1">Computing the membership MAC for a PublicMessage</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"resumption"</td> <td class="text-left" rowspan="1" colspan="1"> <code>resumption_psk</code> </td> <td class="text-left" rowspan="1" colspan="1">Proving membership in this epoch (via a PSK injected later)</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"authentication"</td> <td class="text-left" rowspan="1" colspan="1"> <code>epoch_authenticator</code> </td> <td class="text-left" rowspan="1" colspan="1">Confirming that two clients have the same view of the group</td> </tr> </tbody> </table> </div> <p id="section-8-15">The <code>external_secret</code> is used to derive an HPKE key pair whose private key is held by the entire group:<a href="#section-8-15" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8-16"> <pre> external_priv, external_pub = KEM.DeriveKeyPair(external_secret) </pre><a href="#section-8-16" class="pilcrow">¶</a> </div> <p id="section-8-17">The public key <code>external_pub</code> can be published as part of the GroupInfo struct in order to allow non-members to join the group using an external Commit.<a href="#section-8-17" class="pilcrow">¶</a></p> <div id="group-context"> <section id="section-8.1"> <h3 id="name-group-context"> <a href="#section-8.1" class="section-number selfRef">8.1. </a><a href="#name-group-context" class="section-name selfRef">Group Context</a> </h3> <p id="section-8.1-1">Each member of the group maintains a GroupContext object that summarizes the state of the group:<a href="#section-8.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-8.1-2"> <pre> struct { ProtocolVersion version = mls10; CipherSuite cipher_suite; opaque group_id<V>; uint64 epoch; opaque tree_hash<V>; opaque confirmed_transcript_hash<V>; Extension extensions<V>; } GroupContext; </pre><a href="#section-8.1-2" class="pilcrow">¶</a> </div> <p id="section-8.1-3">The fields in this state have the following semantics:<a href="#section-8.1-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-8.1-4.1">The <code>cipher_suite</code> is the cipher suite used by the group.<a href="#section-8.1-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-4.2">The <code>group_id</code> field is an application-defined identifier for the group.<a href="#section-8.1-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-4.3">The <code>epoch</code> field represents the current version of the group.<a href="#section-8.1-4.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-4.4">The <code>tree_hash</code> field contains a commitment to the contents of the group's ratchet tree and the credentials for the members of the group, as described in <a href="#tree-hashes" class="auto internal xref">Section 7.8</a>.<a href="#section-8.1-4.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-4.5">The <code>confirmed_transcript_hash</code> field contains a running hash over the messages that led to this state.<a href="#section-8.1-4.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-4.6">The <code>extensions</code> field contains the details of any protocol extensions that apply to the group.<a href="#section-8.1-4.6" class="pilcrow">¶</a> </li> </ul> <p id="section-8.1-5">When a new member is added to the group, an existing member of the group provides the new member with a Welcome message. The Welcome message provides the information the new member needs to initialize its GroupContext.<a href="#section-8.1-5" class="pilcrow">¶</a></p> <p id="section-8.1-6">Different changes to the group will have different effects on the group state. These effects are described in their respective subsections of <a href="#proposals" class="auto internal xref">Section 12.1</a>. The following general rules apply:<a href="#section-8.1-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-8.1-7.1">The <code>group_id</code> field is constant.<a href="#section-8.1-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-7.2">The <code>epoch</code> field increments by one for each Commit message that is processed.<a href="#section-8.1-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-7.3">The <code>tree_hash</code> is updated to represent the current tree and credentials.<a href="#section-8.1-7.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-7.4">The <code>confirmed_transcript_hash</code> field is updated with the data for an AuthenticatedContent encoding a Commit message, as described below.<a href="#section-8.1-7.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.1-7.5">The <code>extensions</code> field changes when a GroupContextExtensions proposal is committed.<a href="#section-8.1-7.5" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="transcript-hashes"> <section id="section-8.2"> <h3 id="name-transcript-hashes"> <a href="#section-8.2" class="section-number selfRef">8.2. </a><a href="#name-transcript-hashes" class="section-name selfRef">Transcript Hashes</a> </h3> <p id="section-8.2-1">The transcript hashes computed in MLS represent a running hash over all Proposal and Commit messages that have ever been sent in a group. Commit messages are included directly. Proposal messages are indirectly included via the Commit that applied them. Messages of both types are included by hashing the AuthenticatedContent object in which they were sent.<a href="#section-8.2-1" class="pilcrow">¶</a></p> <p id="section-8.2-2">The transcript hash comprises two individual hashes:<a href="#section-8.2-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-8.2-3.1">A <code>confirmed_transcript_hash</code> that represents a transcript over the whole history of Commit messages, up to and including the signature of the most recent Commit.<a href="#section-8.2-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-8.2-3.2">An <code>interim_transcript_hash</code> that covers the confirmed transcript hash plus the <code>confirmation_tag</code> of the most recent Commit.<a href="#section-8.2-3.2" class="pilcrow">¶</a> </li> </ul> <p id="section-8.2-4">New members compute the interim transcript hash using the <code>confirmation_tag</code> field of the GroupInfo struct, while existing members can compute it directly.<a href="#section-8.2-4" class="pilcrow">¶</a></p> <p id="section-8.2-5">Each Commit message updates these hashes by way of its enclosing AuthenticatedContent. The AuthenticatedContent struct is split into ConfirmedTranscriptHashInput and InterimTranscriptHashInput. The former is used to update the confirmed transcript hash and the latter is used to update the interim transcript hash.<a href="#section-8.2-5" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-8.2-6"> <pre> struct { WireFormat wire_format; FramedContent content; /* with content_type == commit */ opaque signature<V>; } ConfirmedTranscriptHashInput; struct { MAC confirmation_tag; } InterimTranscriptHashInput; </pre><a href="#section-8.2-6" class="pilcrow">¶</a> </div> <div class="lang-pseudocode sourcecode" id="section-8.2-7"> <pre> confirmed_transcript_hash_[0] = ""; /* zero-length octet string */ interim_transcript_hash_[0] = ""; /* zero-length octet string */ confirmed_transcript_hash_[epoch] = Hash(interim_transcript_hash_[epoch - 1] || ConfirmedTranscriptHashInput_[epoch]); interim_transcript_hash_[epoch] = Hash(confirmed_transcript_hash_[epoch] || InterimTranscriptHashInput_[epoch]); </pre><a href="#section-8.2-7" class="pilcrow">¶</a> </div> <p id="section-8.2-8">In this notation, <code>ConfirmedTranscriptHashInput_[epoch]</code> and <code>InterimTranscriptHashInput_[epoch]</code> are based on the Commit that initiated the epoch with epoch number <code>epoch. (Note that the </code>epoch<code> field in this Commit will be set to </code>epoch - 1`, since it is sent within the previous epoch.)<a href="#section-8.2-8" class="pilcrow">¶</a></p> <p id="section-8.2-9">The transcript hash <code>ConfirmedTranscriptHashInput_[epoch]</code> is used as the <code>confirmed_transcript_hash</code> input to the <code>confirmation_tag</code> field for this Commit. Each Commit thus confirms the whole transcript of Commits up to that point, except for the latest Commit's confirmation tag.<a href="#section-8.2-9" class="pilcrow">¶</a></p> <span id="name-evolution-of-the-transcript"></span><figure id="figure-23"> <div id="section-8.2-10.1"> <div class="alignLeft art-svg artwork" id="section-8.2-10.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="720" text-anchor="middle" version="1.1" viewBox="0 0 576 720" width="576"> <path d="M 8,272 L 8,304" fill="none" stroke="black"></path> <path d="M 8,512 L 8,544" fill="none" stroke="black"></path> <path d="M 32,192 L 32,208" fill="none" stroke="black"></path> <path d="M 32,432 L 32,448" fill="none" stroke="black"></path> <path d="M 104,224 L 104,264" fill="none" stroke="black"></path> <path d="M 104,464 L 104,504" fill="none" stroke="black"></path> <path d="M 168,192 L 168,208" fill="none" stroke="black"></path> <path d="M 168,432 L 168,448" fill="none" stroke="black"></path> <path d="M 208,272 L 208,304" fill="none" stroke="black"></path> <path d="M 208,512 L 208,544" fill="none" stroke="black"></path> <path d="M 240,176 L 240,304" fill="none" stroke="black"></path> <path d="M 240,416 L 240,544" fill="none" stroke="black"></path> <path d="M 312,304 L 312,368" fill="none" stroke="black"></path> <path d="M 312,544 L 312,608" fill="none" stroke="black"></path> <path d="M 392,176 L 392,304" fill="none" stroke="black"></path> <path d="M 392,416 L 392,544" fill="none" stroke="black"></path> <path d="M 424,112 L 424,144" fill="none" stroke="black"></path> <path d="M 424,272 L 424,304" fill="none" stroke="black"></path> <path d="M 424,352 L 424,384" fill="none" stroke="black"></path> <path d="M 424,512 L 424,544" fill="none" stroke="black"></path> <path d="M 424,592 L 424,624" fill="none" stroke="black"></path> <path d="M 496,64 L 496,104" fill="none" stroke="black"></path> <path d="M 496,144 L 496,264" fill="none" stroke="black"></path> <path d="M 496,304 L 496,344" fill="none" stroke="black"></path> <path d="M 496,384 L 496,504" fill="none" stroke="black"></path> <path d="M 496,544 L 496,584" fill="none" stroke="black"></path> <path d="M 496,624 L 496,656" fill="none" stroke="black"></path> <path d="M 568,112 L 568,144" fill="none" stroke="black"></path> <path d="M 568,272 L 568,304" fill="none" stroke="black"></path> <path d="M 568,352 L 568,384" fill="none" stroke="black"></path> <path d="M 568,512 L 568,544" fill="none" stroke="black"></path> <path d="M 568,592 L 568,624" fill="none" stroke="black"></path> <path d="M 424,112 L 568,112" fill="none" stroke="black"></path> <path d="M 424,144 L 568,144" fill="none" stroke="black"></path> <path d="M 48,176 L 152,176" fill="none" stroke="black"></path> <path d="M 240,176 L 392,176" fill="none" stroke="black"></path> <path d="M 176,208 L 240,208" fill="none" stroke="black"></path> <path d="M 48,224 L 152,224" fill="none" stroke="black"></path> <path d="M 392,224 L 496,224" fill="none" stroke="black"></path> <path d="M 8,272 L 208,272" fill="none" stroke="black"></path> <path d="M 240,272 L 392,272" fill="none" stroke="black"></path> <path d="M 424,272 L 568,272" fill="none" stroke="black"></path> <path d="M 208,288 L 232,288" fill="none" stroke="black"></path> <path d="M 400,288 L 424,288" fill="none" stroke="black"></path> <path d="M 8,304 L 208,304" fill="none" stroke="black"></path> <path d="M 240,304 L 392,304" fill="none" stroke="black"></path> <path d="M 424,304 L 568,304" fill="none" stroke="black"></path> <path d="M 424,352 L 568,352" fill="none" stroke="black"></path> <path d="M 312,368 L 416,368" fill="none" stroke="black"></path> <path d="M 424,384 L 568,384" fill="none" stroke="black"></path> <path d="M 48,416 L 152,416" fill="none" stroke="black"></path> <path d="M 240,416 L 392,416" fill="none" stroke="black"></path> <path d="M 176,448 L 240,448" fill="none" stroke="black"></path> <path d="M 48,464 L 152,464" fill="none" stroke="black"></path> <path d="M 392,464 L 496,464" fill="none" stroke="black"></path> <path d="M 8,512 L 208,512" fill="none" stroke="black"></path> <path d="M 240,512 L 392,512" fill="none" stroke="black"></path> <path d="M 424,512 L 568,512" fill="none" stroke="black"></path> <path d="M 208,528 L 232,528" fill="none" stroke="black"></path> <path d="M 400,528 L 424,528" fill="none" stroke="black"></path> <path d="M 8,544 L 208,544" fill="none" stroke="black"></path> <path d="M 240,544 L 392,544" fill="none" stroke="black"></path> <path d="M 424,544 L 568,544" fill="none" stroke="black"></path> <path d="M 424,592 L 568,592" fill="none" stroke="black"></path> <path d="M 312,608 L 416,608" fill="none" stroke="black"></path> <path d="M 424,624 L 568,624" fill="none" stroke="black"></path> <path d="M 48,176 C 39.16936,176 32,183.16936 32,192" fill="none" stroke="black"></path> <path d="M 152,176 C 160.83064,176 168,183.16936 168,192" fill="none" stroke="black"></path> <path d="M 48,224 C 39.16936,224 32,216.83064 32,208" fill="none" stroke="black"></path> <path d="M 152,224 C 160.83064,224 168,216.83064 168,208" fill="none" stroke="black"></path> <path d="M 48,416 C 39.16936,416 32,423.16936 32,432" fill="none" stroke="black"></path> <path d="M 152,416 C 160.83064,416 168,423.16936 168,432" fill="none" stroke="black"></path> <path d="M 48,464 C 39.16936,464 32,456.83064 32,448" fill="none" stroke="black"></path> <path d="M 152,464 C 160.83064,464 168,456.83064 168,448" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="504,656 492,650.4 492,661.6" transform="rotate(90,496,656)"></polygon> <polygon class="arrowhead" fill="black" points="504,584 492,578.4 492,589.6" transform="rotate(90,496,584)"></polygon> <polygon class="arrowhead" fill="black" points="504,504 492,498.4 492,509.6" transform="rotate(90,496,504)"></polygon> <polygon class="arrowhead" fill="black" points="504,344 492,338.4 492,349.6" transform="rotate(90,496,344)"></polygon> <polygon class="arrowhead" fill="black" points="504,264 492,258.4 492,269.6" transform="rotate(90,496,264)"></polygon> <polygon class="arrowhead" fill="black" points="504,104 492,98.4 492,109.6" transform="rotate(90,496,104)"></polygon> <polygon class="arrowhead" fill="black" points="424,608 412,602.4 412,613.6" transform="rotate(0,416,608)"></polygon> <polygon class="arrowhead" fill="black" points="424,368 412,362.4 412,373.6" transform="rotate(0,416,368)"></polygon> <polygon class="arrowhead" fill="black" points="408,528 396,522.4 396,533.6" transform="rotate(180,400,528)"></polygon> <polygon class="arrowhead" fill="black" points="408,288 396,282.4 396,293.6" transform="rotate(180,400,288)"></polygon> <polygon class="arrowhead" fill="black" points="240,528 228,522.4 228,533.6" transform="rotate(0,232,528)"></polygon> <polygon class="arrowhead" fill="black" points="240,288 228,282.4 228,293.6" transform="rotate(0,232,288)"></polygon> <polygon class="arrowhead" fill="black" points="184,448 172,442.4 172,453.6" transform="rotate(180,176,448)"></polygon> <polygon class="arrowhead" fill="black" points="184,208 172,202.4 172,213.6" transform="rotate(180,176,208)"></polygon> <polygon class="arrowhead" fill="black" points="112,504 100,498.4 100,509.6" transform="rotate(90,104,504)"></polygon> <polygon class="arrowhead" fill="black" points="112,264 100,258.4 100,269.6" transform="rotate(90,104,264)"></polygon> <g class="text"> <text x="496" y="36">...</text> <text x="496" y="132">interim_[N-1]</text> <text x="80" y="196">Ratchet</text> <text x="132" y="196">Tree</text> <text x="296" y="196">wire_format</text> <text x="64" y="212">Key</text> <text x="116" y="212">Schedule</text> <text x="280" y="212">content</text> <text x="288" y="228">epoch</text> <text x="320" y="228">=</text> <text x="344" y="228">N-1</text> <text x="292" y="244">commit</text> <text x="288" y="260">signature</text> <text x="108" y="292">confirmation_key_[N]</text> <text x="316" y="292">confirmation_tag</text> <text x="496" y="292">confirmed_[N]</text> <text x="496" y="372">interim_[N]</text> <text x="80" y="436">Ratchet</text> <text x="132" y="436">Tree</text> <text x="296" y="436">wire_format</text> <text x="64" y="452">Key</text> <text x="116" y="452">Schedule</text> <text x="280" y="452">content</text> <text x="288" y="468">epoch</text> <text x="320" y="468">=</text> <text x="336" y="468">N</text> <text x="292" y="484">commit</text> <text x="288" y="500">signature</text> <text x="108" y="532">confirmation_key_[N+1]</text> <text x="316" y="532">confirmation_tag</text> <text x="496" y="532">confirmed_[N+1]</text> <text x="496" y="612">interim_[N+1]</text> <text x="496" y="692">...</text> </g> </svg><a href="#section-8.2-10.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-23" class="selfRef">Figure 23</a>: <a href="#name-evolution-of-the-transcript" class="selfRef">Evolution of the Transcript Hashes through Two Epoch Changes</a> </figcaption></figure> </section> </div> <div id="external-initialization"> <section id="section-8.3"> <h3 id="name-external-initialization"> <a href="#section-8.3" class="section-number selfRef">8.3. </a><a href="#name-external-initialization" class="section-name selfRef">External Initialization</a> </h3> <p id="section-8.3-1">In addition to initializing a new epoch via KDF invocations as described above, an MLS group can also initialize a new epoch via an asymmetric interaction using the external key pair for the previous epoch. This is done when a new member is joining via an external commit.<a href="#section-8.3-1" class="pilcrow">¶</a></p> <p id="section-8.3-2">In this process, the joiner sends a new <code>init_secret</code> value to the group using the HPKE export method. The joiner then uses that <code>init_secret</code> with information provided in the GroupInfo and an external Commit to initialize their copy of the key schedule for the new epoch.<a href="#section-8.3-2" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8.3-3"> <pre> kem_output, context = SetupBaseS(external_pub, "") init_secret = context.export("MLS 1.0 external init secret", KDF.Nh) </pre><a href="#section-8.3-3" class="pilcrow">¶</a> </div> <p id="section-8.3-4">Members of the group receive the <code>kem_output</code> in an ExternalInit proposal and perform the corresponding calculation to retrieve the <code>init_secret</code> value.<a href="#section-8.3-4" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8.3-5"> <pre> context = SetupBaseR(kem_output, external_priv, "") init_secret = context.export("MLS 1.0 external init secret", KDF.Nh) </pre><a href="#section-8.3-5" class="pilcrow">¶</a> </div> </section> </div> <div id="pre-shared-keys"> <section id="section-8.4"> <h3 id="name-pre-shared-keys"> <a href="#section-8.4" class="section-number selfRef">8.4. </a><a href="#name-pre-shared-keys" class="section-name selfRef">Pre-Shared Keys</a> </h3> <p id="section-8.4-1">Groups that already have an out-of-band mechanism to generate shared group secrets can inject them into the MLS key schedule to incorporate this external entropy in the computation of MLS group secrets.<a href="#section-8.4-1" class="pilcrow">¶</a></p> <p id="section-8.4-2">Injecting an external PSK can improve security in the case where having a full run of Updates across members is too expensive, or if the external group key establishment mechanism provides stronger security against classical or quantum adversaries.<a href="#section-8.4-2" class="pilcrow">¶</a></p> <p id="section-8.4-3">Note that, as a PSK may have a different lifetime than an Update, it does not necessarily provide the same forward secrecy or post-compromise security guarantees as a Commit message. Unlike the key pairs populated in the tree by an Update or Commit, which are always freshly generated, PSKs may be pre-distributed and stored. This creates the risk that a PSK may be compromised in the process of distribution and storage. The security that the group gets from injecting a PSK thus depends on both the entropy of the PSK and the risk of compromise. These factors are outside of the scope of this document, but they should be considered by application designers relying on PSKs.<a href="#section-8.4-3" class="pilcrow">¶</a></p> <p id="section-8.4-4">Each PSK in MLS has a type that designates how it was provisioned. External PSKs are provided by the application, while resumption PSKs are derived from the MLS key schedule and used in cases where it is necessary to authenticate a member's participation in a prior epoch.<a href="#section-8.4-4" class="pilcrow">¶</a></p> <p id="section-8.4-5">The injection of one or more PSKs into the key schedule is signaled in two ways: Existing members are informed via PreSharedKey proposals covered by a Commit, and new members added in the Commit are informed by the GroupSecrets object in the Welcome message corresponding to the Commit. To ensure that existing and new members compute the same PSK input to the key schedule, the Commit and GroupSecrets objects <span class="bcp14">MUST</span> indicate the same set of PSKs, in the same order.<a href="#section-8.4-5" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-8.4-6"> <pre> enum { reserved(0), external(1), resumption(2), (255) } PSKType; enum { reserved(0), application(1), reinit(2), branch(3), (255) } ResumptionPSKUsage; struct { PSKType psktype; select (PreSharedKeyID.psktype) { case external: opaque psk_id<V>; case resumption: ResumptionPSKUsage usage; opaque psk_group_id<V>; uint64 psk_epoch; }; opaque psk_nonce<V>; } PreSharedKeyID; </pre><a href="#section-8.4-6" class="pilcrow">¶</a> </div> <p id="section-8.4-7">Each time a client injects a PSK into a group, the <code>psk_nonce</code> of its PreSharedKeyID <span class="bcp14">MUST</span> be set to a fresh random value of length <code>KDF.Nh</code>, where <code>KDF</code> is the KDF for the cipher suite of the group into which the PSK is being injected. This ensures that even when a PSK is used multiple times, the value used as an input into the key schedule is different each time.<a href="#section-8.4-7" class="pilcrow">¶</a></p> <p id="section-8.4-8">Upon receiving a Commit with a PreSharedKey proposal or a GroupSecrets object with the <code>psks</code> field set, the receiving client includes them in the key schedule in the order listed in the Commit, or in the <code>psks</code> field, respectively. For resumption PSKs, the PSK is defined as the <code>resumption_psk</code> of the group and epoch specified in the PreSharedKeyID object. Specifically, <code>psk_secret</code> is computed as follows:<a href="#section-8.4-8" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-8.4-9"> <pre> struct { PreSharedKeyID id; uint16 index; uint16 count; } PSKLabel; </pre><a href="#section-8.4-9" class="pilcrow">¶</a> </div> <div class="lang-pseudocode sourcecode" id="section-8.4-10"> <pre> psk_extracted_[i] = KDF.Extract(0, psk_[i]) psk_input_[i] = ExpandWithLabel(psk_extracted_[i], "derived psk", PSKLabel, KDF.Nh) psk_secret_[0] = 0 psk_secret_[i] = KDF.Extract(psk_input_[i-1], psk_secret_[i-1]) psk_secret = psk_secret_[n] </pre><a href="#section-8.4-10" class="pilcrow">¶</a> </div> <p id="section-8.4-11">Here <code>0</code> represents the all-zero vector of length <code>KDF.Nh</code>. The <code>index</code> field in PSKLabel corresponds to the index of the PSK in the <code>psk</code> array, while the <code>count</code> field contains the total number of PSKs. In other words, the PSKs are chained together with KDF.Extract invocations (labeled "Extract" for brevity in the diagram), as follows:<a href="#section-8.4-11" class="pilcrow">¶</a></p> <span id="name-computation-of-a-psk-secret"></span><figure id="figure-24"> <div id="section-8.4-12.1"> <div class="alignLeft art-svg artwork" id="section-8.4-12.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="256" text-anchor="middle" version="1.1" viewBox="0 0 568 256" width="568"> <path d="M 400,96 L 400,144" fill="none" stroke="black"></path> <path d="M 400,192 L 400,224" fill="none" stroke="black"></path> <path d="M 88,80 L 104,80" fill="none" stroke="black"></path> <path d="M 184,80 L 200,80" fill="none" stroke="black"></path> <path d="M 344,80 L 360,80" fill="none" stroke="black"></path> <path d="M 88,160 L 104,160" fill="none" stroke="black"></path> <path d="M 184,160 L 200,160" fill="none" stroke="black"></path> <path d="M 344,160 L 360,160" fill="none" stroke="black"></path> <path d="M 88,240 L 104,240" fill="none" stroke="black"></path> <path d="M 184,240 L 200,240" fill="none" stroke="black"></path> <path d="M 344,240 L 360,240" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="408,224 396,218.4 396,229.6" transform="rotate(90,400,224)"></polygon> <polygon class="arrowhead" fill="black" points="408,144 396,138.4 396,149.6" transform="rotate(90,400,144)"></polygon> <polygon class="arrowhead" fill="black" points="368,240 356,234.4 356,245.6" transform="rotate(0,360,240)"></polygon> <polygon class="arrowhead" fill="black" points="368,160 356,154.4 356,165.6" transform="rotate(0,360,160)"></polygon> <polygon class="arrowhead" fill="black" points="368,80 356,74.4 356,85.6" transform="rotate(0,360,80)"></polygon> <polygon class="arrowhead" fill="black" points="208,240 196,234.4 196,245.6" transform="rotate(0,200,240)"></polygon> <polygon class="arrowhead" fill="black" points="208,160 196,154.4 196,165.6" transform="rotate(0,200,160)"></polygon> <polygon class="arrowhead" fill="black" points="208,80 196,74.4 196,85.6" transform="rotate(0,200,80)"></polygon> <polygon class="arrowhead" fill="black" points="112,240 100,234.4 100,245.6" transform="rotate(0,104,240)"></polygon> <polygon class="arrowhead" fill="black" points="112,160 100,154.4 100,165.6" transform="rotate(0,104,160)"></polygon> <polygon class="arrowhead" fill="black" points="112,80 100,74.4 100,85.6" transform="rotate(0,104,80)"></polygon> <g class="text"> <text x="144" y="36">0</text> <text x="400" y="36">0</text> <text x="440" y="36">=</text> <text x="508" y="36">psk_secret_[0]</text> <text x="144" y="52">|</text> <text x="400" y="52">|</text> <text x="32" y="84">psk_[0]</text> <text x="144" y="84">Extract</text> <text x="272" y="84">ExpandWithLabel</text> <text x="400" y="84">Extract</text> <text x="440" y="84">=</text> <text x="508" y="84">psk_secret_[1]</text> <text x="144" y="116">0</text> <text x="144" y="132">|</text> <text x="32" y="164">psk_[1]</text> <text x="144" y="164">Extract</text> <text x="272" y="164">ExpandWithLabel</text> <text x="400" y="164">Extract</text> <text x="440" y="164">=</text> <text x="508" y="164">psk_secret_[2]</text> <text x="400" y="180">|</text> <text x="144" y="196">0</text> <text x="392" y="196">.</text> <text x="408" y="196">.</text> <text x="144" y="212">|</text> <text x="40" y="244">psk_[n-1]</text> <text x="144" y="244">Extract</text> <text x="272" y="244">ExpandWithLabel</text> <text x="400" y="244">Extract</text> <text x="440" y="244">=</text> <text x="508" y="244">psk_secret_[n]</text> </g> </svg><a href="#section-8.4-12.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-24" class="selfRef">Figure 24</a>: <a href="#name-computation-of-a-psk-secret" class="selfRef">Computation of a PSK Secret from a Set of PSKs</a> </figcaption></figure> <p id="section-8.4-13">In particular, if there are no PreSharedKey proposals in a given Commit, then the resulting <code>psk_secret</code> is <code>psk_secret_[0]</code>, the all-zero vector.<a href="#section-8.4-13" class="pilcrow">¶</a></p> </section> </div> <div id="exporters"> <section id="section-8.5"> <h3 id="name-exporters"> <a href="#section-8.5" class="section-number selfRef">8.5. </a><a href="#name-exporters" class="section-name selfRef">Exporters</a> </h3> <p id="section-8.5-1">The main MLS key schedule provides an <code>exporter_secret</code> that can be used by an application to derive new secrets for use outside of MLS.<a href="#section-8.5-1" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-8.5-2"> <pre> MLS-Exporter(Label, Context, Length) = ExpandWithLabel(DeriveSecret(exporter_secret, Label), "exported", Hash(Context), Length) </pre><a href="#section-8.5-2" class="pilcrow">¶</a> </div> <p id="section-8.5-3">Applications <span class="bcp14">SHOULD</span> provide a unique label to <code>MLS-Exporter</code> that identifies the secret's intended purpose. This is to help prevent the same secret from being generated and used in two different places. To help avoid the same label being used in different applications, an IANA registry for these labels has been defined in <a href="#mls-exporter-labels" class="auto internal xref">Section 17.8</a>.<a href="#section-8.5-3" class="pilcrow">¶</a></p> <p id="section-8.5-4">The exported values are bound to the group epoch from which the <code>exporter_secret</code> is derived, and hence reflect a particular state of the group.<a href="#section-8.5-4" class="pilcrow">¶</a></p> <p id="section-8.5-5">It is <span class="bcp14">RECOMMENDED</span> for the application generating exported values to refresh those values after a Commit is processed.<a href="#section-8.5-5" class="pilcrow">¶</a></p> </section> </div> <div id="resumption-psk"> <section id="section-8.6"> <h3 id="name-resumption-psk"> <a href="#section-8.6" class="section-number selfRef">8.6. </a><a href="#name-resumption-psk" class="section-name selfRef">Resumption PSK</a> </h3> <p id="section-8.6-1">The main MLS key schedule provides a <code>resumption_psk</code> that is used as a PSK to inject entropy from one epoch into another. This functionality is used in the reinitialization and branching processes described in Sections <a href="#reinitialization" class="auto internal xref">11.2</a> and <a href="#subgroup-branching" class="auto internal xref">11.3</a>, but it may be used by applications for other purposes.<a href="#section-8.6-1" class="pilcrow">¶</a></p> <p id="section-8.6-2">Some uses of resumption PSKs might call for the use of PSKs from historical epochs. The application <span class="bcp14">SHOULD</span> specify an upper limit on the number of past epochs for which the <code>resumption_psk</code> may be stored.<a href="#section-8.6-2" class="pilcrow">¶</a></p> </section> </div> <div id="epoch-authenticators"> <section id="section-8.7"> <h3 id="name-epoch-authenticators"> <a href="#section-8.7" class="section-number selfRef">8.7. </a><a href="#name-epoch-authenticators" class="section-name selfRef">Epoch Authenticators</a> </h3> <p id="section-8.7-1">The main MLS key schedule provides a per-epoch <code>epoch_authenticator</code>. If one member of the group is being impersonated by an active attacker, the <code>epoch_authenticator</code> computed by their client will differ from those computed by the other group members.<a href="#section-8.7-1" class="pilcrow">¶</a></p> <p id="section-8.7-2">This property can be used to construct defenses against impersonation attacks that are effective even if members' signature keys are compromised. As a trivial example, if the users of the clients in an MLS group were to meet in person and reliably confirm that their epoch authenticator values were equal (using some suitable user interface), then each user would be assured that the others were not being impersonated in the current epoch. As soon as the epoch changed, though, they would need to redo this confirmation. The state of the group would have changed, possibly introducing an attacker.<a href="#section-8.7-2" class="pilcrow">¶</a></p> <p id="section-8.7-3">More generally, in order for the members of an MLS group to obtain concrete authentication protections using the <code>epoch_authenticator</code>, they will need to use it in some secondary protocol (such as the face-to-face protocol above). The details of that protocol will then determine the specific authentication protections provided to the MLS group.<a href="#section-8.7-3" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="secret-tree"> <section id="section-9"> <h2 id="name-secret-tree"> <a href="#section-9" class="section-number selfRef">9. </a><a href="#name-secret-tree" class="section-name selfRef">Secret Tree</a> </h2> <p id="section-9-1">For the generation of encryption keys and nonces, the key schedule begins with the <code>encryption_secret</code> at the root and derives a tree of secrets with the same structure as the group's ratchet tree. Each leaf in the secret tree is associated with the same group member as the corresponding leaf in the ratchet tree.<a href="#section-9-1" class="pilcrow">¶</a></p> <p id="section-9-2">If N is a parent node in the secret tree, then the secrets of the children of N are defined as follows (where left(N) and right(N) denote the children of N):<a href="#section-9-2" class="pilcrow">¶</a></p> <span id="name-derivation-of-secrets-from-"></span><figure id="figure-25"> <div id="section-9-3.1"> <div class="alignLeft art-svg artwork" id="section-9-3.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="160" text-anchor="middle" version="1.1" viewBox="0 0 456 160" width="456"> <path d="M 72,40 L 72,128" fill="none" stroke="black"></path> <path d="M 248,80 L 248,88" fill="none" stroke="black"></path> <path d="M 72,80 L 96,80" fill="none" stroke="black"></path> <path d="M 72,128 L 96,128" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="104,128 92,122.4 92,133.6" transform="rotate(0,96,128)"></polygon> <polygon class="arrowhead" fill="black" points="104,80 92,74.4 92,85.6" transform="rotate(0,96,80)"></polygon> <g class="text"> <text x="84" y="36">tree_node_[N]_secret</text> <text x="176" y="84">ExpandWithLabel(.</text> <text x="288" y="84">"tree",</text> <text x="352" y="84">"left",</text> <text x="416" y="84">KDF.Nh)</text> <text x="112" y="100">=</text> <text x="228" y="100">tree_node_[left(N)]_secret</text> <text x="180" y="132">ExpandWithLabel(.,</text> <text x="288" y="132">"tree",</text> <text x="356" y="132">"right",</text> <text x="424" y="132">KDF.Nh)</text> <text x="112" y="148">=</text> <text x="232" y="148">tree_node_[right(N)]_secret</text> </g> </svg><a href="#section-9-3.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-25" class="selfRef">Figure 25</a>: <a href="#name-derivation-of-secrets-from-" class="selfRef">Derivation of Secrets from Parent to Children within a Secret Tree</a> </figcaption></figure> <p id="section-9-4">The secret in the leaf of the secret tree is used to initiate two symmetric hash ratchets, from which a sequence of single-use keys and nonces are derived, as described in <a href="#encryption-keys" class="auto internal xref">Section 9.1</a>. The root of each ratchet is computed as:<a href="#section-9-4" class="pilcrow">¶</a></p> <span id="name-initialization-of-the-hash-"></span><figure id="figure-26"> <div id="section-9-5.1"> <div class="alignLeft art-svg artwork" id="section-9-5.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="160" text-anchor="middle" version="1.1" viewBox="0 0 472 160" width="472"> <path d="M 72,40 L 72,128" fill="none" stroke="black"></path> <path d="M 72,80 L 96,80" fill="none" stroke="black"></path> <path d="M 72,128 L 96,128" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="104,128 92,122.4 92,133.6" transform="rotate(0,96,128)"></polygon> <polygon class="arrowhead" fill="black" points="104,80 92,74.4 92,85.6" transform="rotate(0,96,80)"></polygon> <g class="text"> <text x="84" y="36">tree_node_[N]_secret</text> <text x="180" y="84">ExpandWithLabel(.,</text> <text x="308" y="84">"handshake",</text> <text x="376" y="84">"",</text> <text x="424" y="84">KDF.Nh)</text> <text x="112" y="100">=</text> <text x="252" y="100">handshake_ratchet_secret_[N]_[0]</text> <text x="180" y="132">ExpandWithLabel(.,</text> <text x="316" y="132">"application",</text> <text x="392" y="132">"",</text> <text x="440" y="132">KDF.Nh)</text> <text x="112" y="148">=</text> <text x="260" y="148">application_ratchet_secret_[N]_[0]</text> </g> </svg><a href="#section-9-5.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-26" class="selfRef">Figure 26</a>: <a href="#name-initialization-of-the-hash-" class="selfRef">Initialization of the Hash Ratchets from the Leaves of a Secret Tree</a> </figcaption></figure> <div id="encryption-keys"> <section id="section-9.1"> <h3 id="name-encryption-keys"> <a href="#section-9.1" class="section-number selfRef">9.1. </a><a href="#name-encryption-keys" class="section-name selfRef">Encryption Keys</a> </h3> <p id="section-9.1-1">As described in <a href="#message-framing" class="auto internal xref">Section 6</a>, MLS encrypts three different types of information:<a href="#section-9.1-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-9.1-2.1">Metadata (sender information)<a href="#section-9.1-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.1-2.2">Handshake messages (Proposal and Commit)<a href="#section-9.1-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.1-2.3">Application messages<a href="#section-9.1-2.3" class="pilcrow">¶</a> </li> </ul> <p id="section-9.1-3">The sender information used to look up the key for content encryption is encrypted with an AEAD where the key and nonce are derived from both <code>sender_data_secret</code> and a sample of the encrypted message content.<a href="#section-9.1-3" class="pilcrow">¶</a></p> <p id="section-9.1-4">For handshake and application messages, a sequence of keys is derived via a "sender ratchet". Each sender has their own sender ratchet, and each step along the ratchet is called a "generation".<a href="#section-9.1-4" class="pilcrow">¶</a></p> <p id="section-9.1-5">The following figure shows a secret tree for a four-member group, with the handshake and application ratchets that member D will use for sending and the first two application keys and nonces.<a href="#section-9.1-5" class="pilcrow">¶</a></p> <span id="name-secret-tree-for-a-four-memb"></span><div id="secret-tree-example"> <figure id="figure-27"> <div id="section-9.1-6.1"> <div class="alignLeft art-svg artwork" id="section-9.1-6.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="320" text-anchor="middle" version="1.1" viewBox="0 0 200 320" width="200"> <path d="M 56,48 L 56,64" fill="none" stroke="black"></path> <path d="M 128,176 L 128,208" fill="none" stroke="black"></path> <path d="M 128,240 L 128,272" fill="none" stroke="black"></path> <path d="M 160,160 L 160,192" fill="none" stroke="black"></path> <path d="M 160,224 L 160,256" fill="none" stroke="black"></path> <path d="M 40,64 L 72,64" fill="none" stroke="black"></path> <path d="M 144,160 L 176,160" fill="none" stroke="black"></path> <path d="M 160,192 L 176,192" fill="none" stroke="black"></path> <path d="M 144,224 L 176,224" fill="none" stroke="black"></path> <path d="M 160,256 L 176,256" fill="none" stroke="black"></path> <path d="M 72,64 L 80,80" fill="none" stroke="black"></path> <path d="M 32,80 L 40,64" fill="none" stroke="black"></path> <g class="text"> <text x="56" y="36">G</text> <text x="24" y="100">E</text> <text x="88" y="100">F</text> <text x="16" y="116">/</text> <text x="32" y="116">\</text> <text x="80" y="116">/</text> <text x="96" y="116">\</text> <text x="8" y="132">A</text> <text x="40" y="132">B</text> <text x="72" y="132">C</text> <text x="104" y="132">D</text> <text x="96" y="148">/</text> <text x="112" y="148">\</text> <text x="88" y="164">HR0</text> <text x="128" y="164">AR0</text> <text x="188" y="164">K0</text> <text x="188" y="196">N0</text> <text x="128" y="228">AR1</text> <text x="188" y="228">K1</text> <text x="188" y="260">N1</text> <text x="128" y="292">AR2</text> </g> </svg><a href="#section-9.1-6.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-27" class="selfRef">Figure 27</a>: <a href="#name-secret-tree-for-a-four-memb" class="selfRef">Secret Tree for a Four-Member Group</a> </figcaption></figure> </div> <p id="section-9.1-7">A sender ratchet starts from a per-sender base secret derived from a Secret Tree, as described in <a href="#secret-tree" class="auto internal xref">Section 9</a>. The base secret initiates a symmetric hash ratchet, which generates a sequence of keys and nonces. The sender uses the j-th key/nonce pair in the sequence to encrypt (using the AEAD) the j-th message they send during that epoch. Each key/nonce pair <span class="bcp14">MUST NOT</span> be used to encrypt more than one message.<a href="#section-9.1-7" class="pilcrow">¶</a></p> <p id="section-9.1-8">Keys, nonces, and the secrets in ratchets are derived using DeriveTreeSecret. The context in a given call consists of the current position in the ratchet.<a href="#section-9.1-8" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-9.1-9"> <pre> DeriveTreeSecret(Secret, Label, Generation, Length) = ExpandWithLabel(Secret, Label, Generation, Length) </pre><a href="#section-9.1-9" class="pilcrow">¶</a> </div> <p id="section-9.1-10">Where <code>Generation</code> is encoded as a big endian uint32.<a href="#section-9.1-10" class="pilcrow">¶</a></p> <div id="section-9.1-11"> <div class="alignLeft art-svg artwork" id="section-9.1-11.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="208" text-anchor="middle" version="1.1" viewBox="0 0 416 208" width="416"> <path d="M 56,40 L 56,160" fill="none" stroke="black"></path> <path d="M 56,64 L 80,64" fill="none" stroke="black"></path> <path d="M 56,112 L 80,112" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="88,112 76,106.4 76,117.6" transform="rotate(0,80,112)"></polygon> <polygon class="arrowhead" fill="black" points="88,64 76,58.4 76,69.6" transform="rotate(0,80,64)"></polygon> <polygon class="arrowhead" fill="black" points="64,160 52,154.4 52,165.6" transform="rotate(90,56,160)"></polygon> <g class="text"> <text x="92" y="36">ratchet_secret_[N]_[j]</text> <text x="168" y="68">DeriveTreeSecret(.,</text> <text x="284" y="68">"nonce",</text> <text x="332" y="68">j,</text> <text x="380" y="68">AEAD.Nn)</text> <text x="96" y="84">=</text> <text x="192" y="84">ratchet_nonce_[N]_[j]</text> <text x="168" y="116">DeriveTreeSecret(.,</text> <text x="276" y="116">"key",</text> <text x="316" y="116">j,</text> <text x="372" y="116">AEAD.Nk)</text> <text x="96" y="132">=</text> <text x="184" y="132">ratchet_key_[N]_[j]</text> <text x="80" y="180">DeriveTreeSecret(.,</text> <text x="200" y="180">"secret",</text> <text x="252" y="180">j,</text> <text x="296" y="180">KDF.Nh)</text> <text x="8" y="196">=</text> <text x="116" y="196">ratchet_secret_[N]_[j+1]</text> </g> </svg><a href="#section-9.1-11.1" class="pilcrow">¶</a> </div> </div> <p id="section-9.1-12">Here <code>AEAD.Nn</code> and <code>AEAD.Nk</code> denote the lengths in bytes of the nonce and key for the AEAD scheme defined by the cipher suite.<a href="#section-9.1-12" class="pilcrow">¶</a></p> </section> </div> <div id="deletion-schedule"> <section id="section-9.2"> <h3 id="name-deletion-schedule"> <a href="#section-9.2" class="section-number selfRef">9.2. </a><a href="#name-deletion-schedule" class="section-name selfRef">Deletion Schedule</a> </h3> <p id="section-9.2-1">It is important to delete all security-sensitive values as soon as they are <em>consumed</em>. A sensitive value S is said to be <em>consumed</em> if:<a href="#section-9.2-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-9.2-2.1">S was used to encrypt or (successfully) decrypt a message, or<a href="#section-9.2-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-2.2">a key, nonce, or secret derived from S has been consumed. (This goes for values derived via DeriveSecret as well as ExpandWithLabel.)<a href="#section-9.2-2.2" class="pilcrow">¶</a> </li> </ul> <p id="section-9.2-3">Here S may be the <code>init_secret</code>, <code>commit_secret</code>, <code>epoch_secret</code>, or <code>encryption_secret</code> as well as any secret in a secret tree or one of the ratchets.<a href="#section-9.2-3" class="pilcrow">¶</a></p> <p id="section-9.2-4">As soon as a group member consumes a value, they <span class="bcp14">MUST</span> immediately delete (all representations of) that value. This is crucial to ensuring forward secrecy for past messages. Members <span class="bcp14">MAY</span> keep unconsumed values around for some reasonable amount of time to handle out-of-order message delivery.<a href="#section-9.2-4" class="pilcrow">¶</a></p> <p id="section-9.2-5">For example, suppose a group member encrypts or (successfully) decrypts an application message using the j-th key and nonce in the ratchet of leaf node L in some epoch n. Then, for that member, at least the following values have been consumed and <span class="bcp14">MUST</span> be deleted:<a href="#section-9.2-5" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-9.2-6.1">the <code>commit_secret</code>, <code>joiner_secret</code>, <code>epoch_secret</code>, and <code>encryption_secret</code> of that epoch n as well as the <code>init_secret</code> of the previous epoch n-1,<a href="#section-9.2-6.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-6.2">all node secrets in the secret tree on the path from the root to the leaf with node L,<a href="#section-9.2-6.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-6.3">the first j secrets in the application data ratchet of node L, and<a href="#section-9.2-6.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-6.4"> <code>application_ratchet_nonce_[L]_[j]</code> and <code>application_ratchet_key_[L]_[j]</code>.<a href="#section-9.2-6.4" class="pilcrow">¶</a> </li> </ul> <p id="section-9.2-7">Concretely, consider the secret tree shown in <a href="#secret-tree-example" class="auto internal xref">Figure 27</a>. Client A, B, or C would generate the illustrated values on receiving a message from D with generation equal to 1, having not received a message with generation 0 (e.g., due to out-of-order delivery). In such a case, the following values would be consumed:<a href="#section-9.2-7" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-9.2-8.1">The key K1 and nonce N1 used to decrypt the message<a href="#section-9.2-8.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-8.2">The application ratchet secrets AR1 and AR0<a href="#section-9.2-8.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-8.3">The tree secrets D, F, and G (recall that G is the <code>encryption_secret</code> for the epoch)<a href="#section-9.2-8.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-8.4">The <code>epoch_secret</code>, <code>commit_secret</code>, <code>psk_secret</code>, and <code>joiner_secret</code> for the current epoch<a href="#section-9.2-8.4" class="pilcrow">¶</a> </li> </ul> <p id="section-9.2-9">Other values may be retained (not consumed):<a href="#section-9.2-9" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-9.2-10.1">K0 and N0 for decryption of an out-of-order message with generation 0<a href="#section-9.2-10.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-10.2">AR2 for derivation of further message decryption keys and nonces<a href="#section-9.2-10.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-10.3">HR0 for protection of handshake messages from D<a href="#section-9.2-10.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-9.2-10.4">E and C for deriving secrets used by senders A, B, and C<a href="#section-9.2-10.4" class="pilcrow">¶</a> </li> </ul> </section> </div> </section> </div> <div id="key-packages"> <section id="section-10"> <h2 id="name-key-packages"> <a href="#section-10" class="section-number selfRef">10. </a><a href="#name-key-packages" class="section-name selfRef">Key Packages</a> </h2> <p id="section-10-1">In order to facilitate the asynchronous addition of clients to a group, clients can pre-publish KeyPackage objects that provide some public information about a user. A KeyPackage object specifies:<a href="#section-10-1" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-10-2"> <li id="section-10-2.1">a protocol version and cipher suite that the client supports,<a href="#section-10-2.1" class="pilcrow">¶</a> </li> <li id="section-10-2.2">a public key that others can use to encrypt a Welcome message to this client (an "init key"), and<a href="#section-10-2.2" class="pilcrow">¶</a> </li> <li id="section-10-2.3">the content of the leaf node that should be added to the tree to represent this client.<a href="#section-10-2.3" class="pilcrow">¶</a> </li> </ol> <p id="section-10-3">KeyPackages are intended to be used only once and <span class="bcp14">SHOULD NOT</span> be reused except in the case of a "last resort" KeyPackage (see <a href="#keypackage-reuse" class="auto internal xref">Section 16.8</a>). Clients <span class="bcp14">MAY</span> generate and publish multiple KeyPackages to support multiple cipher suites.<a href="#section-10-3" class="pilcrow">¶</a></p> <p id="section-10-4">The value for <code>init_key</code> <span class="bcp14">MUST</span> be a public key for the asymmetric encryption scheme defined by <code>cipher_suite</code>, and it <span class="bcp14">MUST</span> be unique among the set of KeyPackages created by this client. Likewise, the <code>leaf_node</code> field <span class="bcp14">MUST</span> be valid for the cipher suite, including both the <code>encryption_key</code> and <code>signature_key</code> fields. The whole structure is signed using the client's signature key. A KeyPackage object with an invalid signature field <span class="bcp14">MUST</span> be considered malformed.<a href="#section-10-4" class="pilcrow">¶</a></p> <p id="section-10-5">The signature is computed by the function <code>SignWithLabel</code> with a label <code>"KeyPackageTBS"</code> and a <code>Content</code> input comprising all of the fields except for the signature field.<a href="#section-10-5" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-10-6"> <pre> struct { ProtocolVersion version; CipherSuite cipher_suite; HPKEPublicKey init_key; LeafNode leaf_node; Extension extensions<V>; /* SignWithLabel(., "KeyPackageTBS", KeyPackageTBS) */ opaque signature<V>; } KeyPackage; struct { ProtocolVersion version; CipherSuite cipher_suite; HPKEPublicKey init_key; LeafNode leaf_node; Extension extensions<V>; } KeyPackageTBS; </pre><a href="#section-10-6" class="pilcrow">¶</a> </div> <p id="section-10-7">If a client receives a KeyPackage carried within an MLSMessage object, then it <span class="bcp14">MUST</span> verify that the <code>version</code> field of the KeyPackage has the same value as the <code>version</code> field of the MLSMessage. The <code>version</code> field in the KeyPackage provides an explicit signal of the intended version to the other members of group when they receive the KeyPackage in an Add proposal.<a href="#section-10-7" class="pilcrow">¶</a></p> <p id="section-10-8">The field <code>leaf_node.capabilities</code> indicates what protocol versions, cipher suites, credential types, and non-default proposal/extension types are supported by the client. (As discussed in <a href="#leaf-node-contents" class="auto internal xref">Section 7.2</a>, some proposal and extension types defined in this document are considered "default" and thus are not listed.) This information allows MLS session establishment to be safe from downgrade attacks on the parameters described (as discussed in <a href="#group-creation" class="auto internal xref">Section 11</a>), while still only advertising one version and one cipher suite per KeyPackage.<a href="#section-10-8" class="pilcrow">¶</a></p> <p id="section-10-9">The field <code>leaf_node.leaf_node_source</code> of the LeafNode in a KeyPackage <span class="bcp14">MUST</span> be set to <code>key_package</code>.<a href="#section-10-9" class="pilcrow">¶</a></p> <p id="section-10-10">Extensions included in the <code>extensions</code> or <code>leaf_node.extensions</code> fields <span class="bcp14">MUST</span> be included in the <code>leaf_node.capabilities</code> field. As discussed in <a href="#extensibility" class="auto internal xref">Section 13</a>, unknown extensions in <code>KeyPackage.extensions</code> <span class="bcp14">MUST</span> be ignored, and the creator of a KeyPackage object <span class="bcp14">SHOULD</span> include some random GREASE extensions to help ensure that other clients correctly ignore unknown extensions.<a href="#section-10-10" class="pilcrow">¶</a></p> <div id="keypackage-validation"> <section id="section-10.1"> <h3 id="name-keypackage-validation"> <a href="#section-10.1" class="section-number selfRef">10.1. </a><a href="#name-keypackage-validation" class="section-name selfRef">KeyPackage Validation</a> </h3> <p id="section-10.1-1">The validity of a KeyPackage needs to be verified at a few stages:<a href="#section-10.1-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-10.1-2.1">When a KeyPackage is downloaded by a group member, before it is used to add the client to the group<a href="#section-10.1-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-10.1-2.2">When a KeyPackage is received by a group member in an Add message<a href="#section-10.1-2.2" class="pilcrow">¶</a> </li> </ul> <p id="section-10.1-3">The client verifies the validity of a KeyPackage using the following steps:<a href="#section-10.1-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-10.1-4.1">Verify that the cipher suite and protocol version of the KeyPackage match those in the GroupContext.<a href="#section-10.1-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-10.1-4.2">Verify that the <code>leaf_node</code> of the KeyPackage is valid for a KeyPackage according to <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a>.<a href="#section-10.1-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-10.1-4.3">Verify that the signature on the KeyPackage is valid using the public key in <code>leaf_node.credential</code>.<a href="#section-10.1-4.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-10.1-4.4">Verify that the value of <code>leaf_node.encryption_key</code> is different from the value of the <code>init_key</code> field.<a href="#section-10.1-4.4" class="pilcrow">¶</a> </li> </ul> </section> </div> </section> </div> <div id="group-creation"> <section id="section-11"> <h2 id="name-group-creation"> <a href="#section-11" class="section-number selfRef">11. </a><a href="#name-group-creation" class="section-name selfRef">Group Creation</a> </h2> <p id="section-11-1">A group is always created with a single member, the "creator". Other members are then added to the group using the usual Add/Commit mechanism.<a href="#section-11-1" class="pilcrow">¶</a></p> <p id="section-11-2">The creator of a group is responsible for setting the group ID, cipher suite, and initial extensions for the group. If the creator intends to add other members at the time of creation, then it <span class="bcp14">SHOULD</span> fetch KeyPackages for the members to be added, and select a cipher suite and extensions according to the capabilities of the members. To protect against downgrade attacks, the creator <span class="bcp14">MUST</span> use the <code>capabilities</code> information in these KeyPackages to verify that the chosen version and cipher suite is the best option supported by all members.<a href="#section-11-2" class="pilcrow">¶</a></p> <p id="section-11-3">Group IDs <span class="bcp14">SHOULD</span> be constructed in such a way that there is an overwhelmingly low probability of honest group creators generating the same group ID, even without assistance from the Delivery Service. This can be done, for example, by making the group ID a freshly generated random value of size <code>KDF.Nh</code>. The Delivery Service <span class="bcp14">MAY</span> attempt to ensure that group IDs are globally unique by rejecting the creation of new groups with a previously used ID.<a href="#section-11-3" class="pilcrow">¶</a></p> <p id="section-11-4">To initialize a group, the creator of the group <span class="bcp14">MUST</span> take the following steps:<a href="#section-11-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-11-5.1"> <p id="section-11-5.1.1">Initialize a one-member group with the following initial values:<a href="#section-11-5.1.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-11-5.1.2.1">Ratchet tree: A tree with a single node, a leaf node containing an HPKE public key and credential for the creator<a href="#section-11-5.1.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.2">Group ID: A value set by the creator<a href="#section-11-5.1.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.3">Epoch: 0<a href="#section-11-5.1.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.4">Tree hash: The root hash of the above ratchet tree<a href="#section-11-5.1.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.5">Confirmed transcript hash: The zero-length octet string<a href="#section-11-5.1.2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.6">Epoch secret: A fresh random value of size <code>KDF.Nh</code><a href="#section-11-5.1.2.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.1.2.7">Extensions: Any values of the creator's choosing<a href="#section-11-5.1.2.7" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-11-5.2"> <p id="section-11-5.2.1">Calculate the interim transcript hash:<a href="#section-11-5.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-11-5.2.2.1">Derive the <code>confirmation_key</code> for the epoch as described in <a href="#key-schedule" class="auto internal xref">Section 8</a>.<a href="#section-11-5.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.2.2.2">Compute a <code>confirmation_tag</code> over the empty <code>confirmed_transcript_hash</code> using the <code>confirmation_key</code> as described in <a href="#content-authentication" class="auto internal xref">Section 6.1</a>.<a href="#section-11-5.2.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-11-5.2.2.3">Compute the updated <code>interim_transcript_hash</code> from the <code>confirmed_transcript_hash</code> and the <code>confirmation_tag</code> as described in <a href="#transcript-hashes" class="auto internal xref">Section 8.2</a>.<a href="#section-11-5.2.2.3" class="pilcrow">¶</a> </li> </ul> </li> </ul> <p id="section-11-6">At this point, the creator's state represents a one-member group with a fully initialized key schedule, transcript hashes, etc. Proposals and Commits can be generated for this group state just like any other state of the group, such as Add proposals and Commits to add other members to the group. A GroupInfo object for this group state can also be published to facilitate external joins.<a href="#section-11-6" class="pilcrow">¶</a></p> <p id="section-11-7">Members other than the creator join either by being sent a Welcome message (as described in <a href="#joining-via-welcome-message" class="auto internal xref">Section 12.4.3.1</a>) or by sending an external Commit (see <a href="#joining-via-external-commits" class="auto internal xref">Section 12.4.3.2</a>).<a href="#section-11-7" class="pilcrow">¶</a></p> <p id="section-11-8">In principle, the above process could be streamlined by having the creator directly create a tree and choose a random value for first epoch's epoch secret. We follow the steps above because it removes unnecessary choices, by which, for example, bad randomness could be introduced. The only choices the creator makes here are its own KeyPackage and the leaf secret from which the Commit is built.<a href="#section-11-8" class="pilcrow">¶</a></p> <div id="required-capabilities"> <section id="section-11.1"> <h3 id="name-required-capabilities"> <a href="#section-11.1" class="section-number selfRef">11.1. </a><a href="#name-required-capabilities" class="section-name selfRef">Required Capabilities</a> </h3> <p id="section-11.1-1">The configuration of a group imposes certain requirements on clients in the group. At a minimum, all members of the group need to support the cipher suite and protocol version in use. Additional requirements can be imposed by including a <code>required_capabilities</code> extension in the GroupContext.<a href="#section-11.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-11.1-2"> <pre> struct { ExtensionType extension_types<V>; ProposalType proposal_types<V>; CredentialType credential_types<V>; } RequiredCapabilities; </pre><a href="#section-11.1-2" class="pilcrow">¶</a> </div> <p id="section-11.1-3">This extension lists the extensions, proposals, and credential types that must be supported by all members of the group. The "default" proposal and extension types defined in this document are assumed to be implemented by all clients, and need not be listed in RequiredCapabilities in order to be safely used. Note that this is not true for credential types.<a href="#section-11.1-3" class="pilcrow">¶</a></p> <p id="section-11.1-4">For new members, support for required capabilities is enforced by existing members during the application of Add commits. Existing members should of course be in compliance already. In order to ensure this continues to be the case even as the group's extensions are updated, a GroupContextExtensions proposal is deemed invalid if it contains a <code>required_capabilities</code> extension that requires non-default capabilities not supported by all current members.<a href="#section-11.1-4" class="pilcrow">¶</a></p> </section> </div> <div id="reinitialization"> <section id="section-11.2"> <h3 id="name-reinitialization"> <a href="#section-11.2" class="section-number selfRef">11.2. </a><a href="#name-reinitialization" class="section-name selfRef">Reinitialization</a> </h3> <p id="section-11.2-1">A group may be reinitialized by creating a new group with the same membership and different parameters, and linking it to the old group via a resumption PSK. The members of a group reinitialize it using the following steps:<a href="#section-11.2-1" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-11.2-2"> <li id="section-11.2-2.1">A member of the old group sends a ReInit proposal (see <a href="#reinit" class="auto internal xref">Section 12.1.5</a>).<a href="#section-11.2-2.1" class="pilcrow">¶</a> </li> <li id="section-11.2-2.2">A member of the old group sends a Commit covering the ReInit proposal.<a href="#section-11.2-2.2" class="pilcrow">¶</a> </li> <li id="section-11.2-2.3"> <p id="section-11.2-2.3.1">A member of the old group creates an initial Commit that sets up a new group that matches the ReInit and sends a Welcome message:<a href="#section-11.2-2.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-11.2-2.3.2.1">The <code>version</code>, <code>cipher_suite</code>, <code>group_id</code>, and <code>extensions</code> fields of the GroupContext object in the Welcome message <span class="bcp14">MUST</span> be the same as the corresponding fields in the ReInit proposal. The <code>epoch</code> in the Welcome message <span class="bcp14">MUST</span> be 1.<a href="#section-11.2-2.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-11.2-2.3.2.2">The Welcome message <span class="bcp14">MUST</span> specify a PreSharedKeyID of type <code>resumption</code> with usage <code>reinit</code>, where the <code>group_id</code> field matches the old group and the <code>epoch</code> field indicates the epoch after the Commit covering the ReInit.<a href="#section-11.2-2.3.2.2" class="pilcrow">¶</a> </li> </ul> </li> </ol> <p id="section-11.2-3">Note that these three steps may be done by the same group member or different members. For example, if a group member sends a Commit with an inline ReInit proposal (steps 1 and 2) but then goes offline, another group member may recreate the group instead. This flexibility avoids situations where a group gets stuck between steps 2 and 3.<a href="#section-11.2-3" class="pilcrow">¶</a></p> <p id="section-11.2-4">Resumption PSKs with usage <code>reinit</code> <span class="bcp14">MUST NOT</span> be used in other contexts. A PreSharedKey proposal with type <code>resumption</code> and usage <code>reinit</code> <span class="bcp14">MUST</span> be considered invalid.<a href="#section-11.2-4" class="pilcrow">¶</a></p> </section> </div> <div id="subgroup-branching"> <section id="section-11.3"> <h3 id="name-subgroup-branching"> <a href="#section-11.3" class="section-number selfRef">11.3. </a><a href="#name-subgroup-branching" class="section-name selfRef">Subgroup Branching</a> </h3> <p id="section-11.3-1">A new group can be formed from a subset of an existing group's members, using the same parameters as the old group.<a href="#section-11.3-1" class="pilcrow">¶</a></p> <p id="section-11.3-2">A member can create a subgroup by performing the following steps:<a href="#section-11.3-2" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-11.3-3"> <li id="section-11.3-3.1">Fetch a new KeyPackage for each group member that should be included in the subgroup.<a href="#section-11.3-3.1" class="pilcrow">¶</a> </li> <li id="section-11.3-3.2">Create an initial Commit message that sets up the new group and contains a PreSharedKey proposal of type <code>resumption</code> with usage <code>branch</code>. To avoid key reuse, the <code>psk_nonce</code> included in the PreSharedKeyID object <span class="bcp14">MUST</span> be a randomly sampled nonce of length <code>KDF.Nh</code>.<a href="#section-11.3-3.2" class="pilcrow">¶</a> </li> <li id="section-11.3-3.3">Send the corresponding Welcome message to the subgroup members.<a href="#section-11.3-3.3" class="pilcrow">¶</a> </li> </ol> <p id="section-11.3-4">A client receiving a Welcome message including a PreSharedKey of type <code>resumption</code> with usage <code>branch</code> <span class="bcp14">MUST</span> verify that the new group reflects a subgroup branched from the referenced group by checking that:<a href="#section-11.3-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-11.3-5.1">The <code>version</code> and <code>cipher_suite</code> values in the Welcome message are the same as those used by the old group.<a href="#section-11.3-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-11.3-5.2">The <code>epoch</code> in the Welcome message <span class="bcp14">MUST</span> be 1.<a href="#section-11.3-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-11.3-5.3">Each LeafNode in a new subgroup <span class="bcp14">MUST</span> match some LeafNode in the original group. In this context, a pair of LeafNodes is said to "match" if the identifiers presented by their respective credentials are considered equivalent by the application.<a href="#section-11.3-5.3" class="pilcrow">¶</a> </li> </ul> <p id="section-11.3-6">Resumption PSKs with usage <code>branch</code> <span class="bcp14">MUST NOT</span> be used in other contexts. A PreSharedKey proposal with type <code>resumption</code> and usage <code>branch</code> <span class="bcp14">MUST</span> be considered invalid.<a href="#section-11.3-6" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="group-evolution"> <section id="section-12"> <h2 id="name-group-evolution"> <a href="#section-12" class="section-number selfRef">12. </a><a href="#name-group-evolution" class="section-name selfRef">Group Evolution</a> </h2> <p id="section-12-1">Over the lifetime of a group, its membership can change, and existing members might want to change their keys in order to achieve post-compromise security. In MLS, each such change is accomplished by a two-step process:<a href="#section-12-1" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-12-2"> <li id="section-12-2.1">A proposal to make the change is broadcast to the group in a Proposal message.<a href="#section-12-2.1" class="pilcrow">¶</a> </li> <li id="section-12-2.2">A member of the group or a new member broadcasts a Commit message that causes one or more proposed changes to enter into effect.<a href="#section-12-2.2" class="pilcrow">¶</a> </li> </ol> <p id="section-12-3">In cases where the Proposal and Commit are sent by the same member, these two steps can be combined by sending the proposals in the commit.<a href="#section-12-3" class="pilcrow">¶</a></p> <p id="section-12-4">The group thus evolves from one cryptographic state to another each time a Commit message is sent and processed. These states are referred to as "epochs" and are uniquely identified among states of the group by eight-octet epoch values. When a new group is initialized, its initial state epoch is 0x0000000000000000. Each time a state transition occurs, the epoch number is incremented by one.<a href="#section-12-4" class="pilcrow">¶</a></p> <div id="proposals"> <section id="section-12.1"> <h3 id="name-proposals"> <a href="#section-12.1" class="section-number selfRef">12.1. </a><a href="#name-proposals" class="section-name selfRef">Proposals</a> </h3> <p id="section-12.1-1">Proposals are included in a FramedContent by way of a Proposal structure that indicates their type:<a href="#section-12.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1-2"> <pre> // See the "MLS Proposal Types" IANA registry for values uint16 ProposalType; struct { ProposalType proposal_type; select (Proposal.proposal_type) { case add: Add; case update: Update; case remove: Remove; case psk: PreSharedKey; case reinit: ReInit; case external_init: ExternalInit; case group_context_extensions: GroupContextExtensions; }; } Proposal; </pre><a href="#section-12.1-2" class="pilcrow">¶</a> </div> <p id="section-12.1-3">On receiving a FramedContent containing a Proposal, a client <span class="bcp14">MUST</span> verify the signature inside FramedContentAuthData and that the <code>epoch</code> field of the enclosing FramedContent is equal to the <code>epoch</code> field of the current GroupContext object. If the verification is successful, then the Proposal should be cached in such a way that it can be retrieved by hash (as a ProposalOrRef object) in a later Commit message.<a href="#section-12.1-3" class="pilcrow">¶</a></p> <div id="add"> <section id="section-12.1.1"> <h4 id="name-add"> <a href="#section-12.1.1" class="section-number selfRef">12.1.1. </a><a href="#name-add" class="section-name selfRef">Add</a> </h4> <p id="section-12.1.1-1">An Add proposal requests that a client with a specified KeyPackage be added to the group.<a href="#section-12.1.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.1-2"> <pre> struct { KeyPackage key_package; } Add; </pre><a href="#section-12.1.1-2" class="pilcrow">¶</a> </div> <p id="section-12.1.1-3">An Add proposal is invalid if the KeyPackage is invalid according to <a href="#keypackage-validation" class="auto internal xref">Section 10.1</a>.<a href="#section-12.1.1-3" class="pilcrow">¶</a></p> <p id="section-12.1.1-4">An Add is applied after being included in a Commit message. The position of the Add in the list of proposals determines the leaf node where the new member will be added. For the first Add in the Commit, the corresponding new member will be placed in the leftmost empty leaf in the tree, for the second Add, the next empty leaf to the right, etc. If no empty leaf exists, the tree is extended to the right.<a href="#section-12.1.1-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.1-5.1">Identify the leaf L for the new member: if there are empty leaves in the tree, L is the leftmost empty leaf. Otherwise, the tree is extended to the right as described in <a href="#adding-and-removing-leaves" class="auto internal xref">Section 7.7</a>, and L is assigned the leftmost new blank leaf.<a href="#section-12.1.1-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.1-5.2">For each non-blank intermediate node along the path from the leaf L to the root, add L's leaf index to the <code>unmerged_leaves</code> list for the node.<a href="#section-12.1.1-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.1-5.3">Set the leaf node L to a new node containing the LeafNode object carried in the <code>leaf_node</code> field of the KeyPackage in the Add.<a href="#section-12.1.1-5.3" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="update"> <section id="section-12.1.2"> <h4 id="name-update"> <a href="#section-12.1.2" class="section-number selfRef">12.1.2. </a><a href="#name-update" class="section-name selfRef">Update</a> </h4> <p id="section-12.1.2-1">An Update proposal is a similar mechanism to Add with the distinction that it replaces the sender's LeafNode in the tree instead of adding a new leaf to the tree.<a href="#section-12.1.2-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.2-2"> <pre> struct { LeafNode leaf_node; } Update; </pre><a href="#section-12.1.2-2" class="pilcrow">¶</a> </div> <p id="section-12.1.2-3">An Update proposal is invalid if the LeafNode is invalid for an Update proposal according to <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a>.<a href="#section-12.1.2-3" class="pilcrow">¶</a></p> <p id="section-12.1.2-4">A member of the group applies an Update message by taking the following steps:<a href="#section-12.1.2-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.2-5.1">Replace the sender's LeafNode with the one contained in the Update proposal.<a href="#section-12.1.2-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.2-5.2">Blank the intermediate nodes along the path from the sender's leaf to the root.<a href="#section-12.1.2-5.2" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="remove"> <section id="section-12.1.3"> <h4 id="name-remove"> <a href="#section-12.1.3" class="section-number selfRef">12.1.3. </a><a href="#name-remove" class="section-name selfRef">Remove</a> </h4> <p id="section-12.1.3-1">A Remove proposal requests that the member with the leaf index <code>removed</code> be removed from the group.<a href="#section-12.1.3-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.3-2"> <pre> struct { uint32 removed; } Remove; </pre><a href="#section-12.1.3-2" class="pilcrow">¶</a> </div> <p id="section-12.1.3-3">A Remove proposal is invalid if the <code>removed</code> field does not identify a non-blank leaf node.<a href="#section-12.1.3-3" class="pilcrow">¶</a></p> <p id="section-12.1.3-4">A member of the group applies a Remove message by taking the following steps:<a href="#section-12.1.3-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.3-5.1">Identify the leaf node matching <code>removed</code>. Let L be this leaf node.<a href="#section-12.1.3-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.3-5.2">Replace the leaf node L with a blank node.<a href="#section-12.1.3-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.3-5.3">Blank the intermediate nodes along the path from L to the root.<a href="#section-12.1.3-5.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.3-5.4">Truncate the tree by removing the right subtree until there is at least one non-blank leaf node in the right subtree. If the rightmost non-blank leaf has index L, then this will result in the tree having 2<sup>d</sup> leaves, where <code>d</code> is the smallest value such that 2<sup>d</sup> > <code>L</code>.<a href="#section-12.1.3-5.4" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="presharedkey"> <section id="section-12.1.4"> <h4 id="name-presharedkey"> <a href="#section-12.1.4" class="section-number selfRef">12.1.4. </a><a href="#name-presharedkey" class="section-name selfRef">PreSharedKey</a> </h4> <p id="section-12.1.4-1">A PreSharedKey proposal can be used to request that a pre-shared key be injected into the key schedule in the process of advancing the epoch.<a href="#section-12.1.4-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.4-2"> <pre> struct { PreSharedKeyID psk; } PreSharedKey; </pre><a href="#section-12.1.4-2" class="pilcrow">¶</a> </div> <p id="section-12.1.4-3">A PreSharedKey proposal is invalid if any of the following is true:<a href="#section-12.1.4-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.4-4.1">The PreSharedKey proposal is not being processed as part of a reinitialization of the group (see <a href="#reinitialization" class="auto internal xref">Section 11.2</a>), and the PreSharedKeyID has <code>psktype</code> set to <code>resumption</code> and <code>usage</code> set to <code>reinit</code>.<a href="#section-12.1.4-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.4-4.2">The PreSharedKey proposal is not being processed as part of a subgroup branching operation (see <a href="#subgroup-branching" class="auto internal xref">Section 11.3</a>), and the PreSharedKeyID has <code>psktype</code> set to <code>resumption</code> and <code>usage</code> set to <code>branch</code>.<a href="#section-12.1.4-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.4-4.3">The <code>psk_nonce</code> is not of length <code>KDF.Nh</code>.<a href="#section-12.1.4-4.3" class="pilcrow">¶</a> </li> </ul> <p id="section-12.1.4-5">The <code>psk_nonce</code> <span class="bcp14">MUST</span> be randomly sampled. When processing a Commit message that includes one or more PreSharedKey proposals, group members derive <code>psk_secret</code> as described in <a href="#pre-shared-keys" class="auto internal xref">Section 8.4</a>, where the order of the PSKs corresponds to the order of the PreSharedKey proposals in the Commit.<a href="#section-12.1.4-5" class="pilcrow">¶</a></p> </section> </div> <div id="reinit"> <section id="section-12.1.5"> <h4 id="name-reinit"> <a href="#section-12.1.5" class="section-number selfRef">12.1.5. </a><a href="#name-reinit" class="section-name selfRef">ReInit</a> </h4> <p id="section-12.1.5-1">A ReInit proposal represents a request to reinitialize the group with different parameters, for example, to increase the version number or to change the cipher suite. The reinitialization is done by creating a completely new group and shutting down the old one.<a href="#section-12.1.5-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.5-2"> <pre> struct { opaque group_id<V>; ProtocolVersion version; CipherSuite cipher_suite; Extension extensions<V>; } ReInit; </pre><a href="#section-12.1.5-2" class="pilcrow">¶</a> </div> <p id="section-12.1.5-3">A ReInit proposal is invalid if the <code>version</code> field is less than the version for the current group.<a href="#section-12.1.5-3" class="pilcrow">¶</a></p> <p id="section-12.1.5-4">A member of the group applies a ReInit proposal by waiting for the committer to send the Welcome message that matches the ReInit, according to the criteria in <a href="#reinitialization" class="auto internal xref">Section 11.2</a>.<a href="#section-12.1.5-4" class="pilcrow">¶</a></p> </section> </div> <div id="externalinit"> <section id="section-12.1.6"> <h4 id="name-externalinit"> <a href="#section-12.1.6" class="section-number selfRef">12.1.6. </a><a href="#name-externalinit" class="section-name selfRef">ExternalInit</a> </h4> <p id="section-12.1.6-1">An ExternalInit proposal is used by new members that want to join a group by using an external commit. This proposal can only be used in that context.<a href="#section-12.1.6-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.6-2"> <pre> struct { opaque kem_output<V>; } ExternalInit; </pre><a href="#section-12.1.6-2" class="pilcrow">¶</a> </div> <p id="section-12.1.6-3">A member of the group applies an ExternalInit message by initializing the next epoch using an init secret computed as described in <a href="#external-initialization" class="auto internal xref">Section 8.3</a>. The <code>kem_output</code> field contains the required KEM output.<a href="#section-12.1.6-3" class="pilcrow">¶</a></p> </section> </div> <div id="groupcontextextensions"> <section id="section-12.1.7"> <h4 id="name-groupcontextextensions"> <a href="#section-12.1.7" class="section-number selfRef">12.1.7. </a><a href="#name-groupcontextextensions" class="section-name selfRef">GroupContextExtensions</a> </h4> <p id="section-12.1.7-1">A GroupContextExtensions proposal is used to update the list of extensions in the GroupContext for the group.<a href="#section-12.1.7-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.7-2"> <pre> struct { Extension extensions<V>; } GroupContextExtensions; </pre><a href="#section-12.1.7-2" class="pilcrow">¶</a> </div> <p id="section-12.1.7-3">A GroupContextExtensions proposal is invalid if it includes a <code>required_capabilities</code> extension and some members of the group do not support some of the required capabilities (including those added in the same Commit, and excluding those removed).<a href="#section-12.1.7-3" class="pilcrow">¶</a></p> <p id="section-12.1.7-4">A member of the group applies a GroupContextExtensions proposal with the following steps:<a href="#section-12.1.7-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.7-5.1">Remove all of the existing extensions from the GroupContext object for the group and replace them with the list of extensions in the proposal. (This is a wholesale replacement, not a merge. An extension is only carried over if the sender of the proposal includes it in the new list.)<a href="#section-12.1.7-5.1" class="pilcrow">¶</a> </li> </ul> <p id="section-12.1.7-6">Note that once the GroupContext is updated, its inclusion in the <code>confirmation_tag</code> by way of the key schedule will confirm that all members of the group agree on the extensions in use.<a href="#section-12.1.7-6" class="pilcrow">¶</a></p> </section> </div> <div id="external-proposals"> <section id="section-12.1.8"> <h4 id="name-external-proposals"> <a href="#section-12.1.8" class="section-number selfRef">12.1.8. </a><a href="#name-external-proposals" class="section-name selfRef">External Proposals</a> </h4> <p id="section-12.1.8-1">Proposals can be constructed and sent to the group by a party that is outside the group in two cases. One case, indicated by the <code>external</code> SenderType, allows an entity outside the group to submit proposals to the group. For example, an automated service might propose removing a member of a group who has been inactive for a long time, or propose adding a newly hired staff member to a group representing a real-world team. An <code>external</code> sender might send a ReInit proposal to enforce a changed policy regarding MLS versions or cipher suites.<a href="#section-12.1.8-1" class="pilcrow">¶</a></p> <p id="section-12.1.8-2">The <code>external</code> SenderType requires that signers are pre-provisioned to the clients within a group and can only be used if the <code>external_senders</code> extension is present in the group's GroupContext.<a href="#section-12.1.8-2" class="pilcrow">¶</a></p> <p id="section-12.1.8-3">The other case, indicated by the <code>new_member_proposal</code> SenderType, is useful when existing members of the group can independently verify that an Add proposal sent by the new joiner itself (not an existing member) is authorized. External proposals that are not authorized are considered invalid.<a href="#section-12.1.8-3" class="pilcrow">¶</a></p> <p id="section-12.1.8-4">An external proposal <span class="bcp14">MUST</span> be sent as a PublicMessage object, since the sender will not have the keys necessary to construct a PrivateMessage object.<a href="#section-12.1.8-4" class="pilcrow">¶</a></p> <p id="section-12.1.8-5">Proposals of some types cannot be sent by an <code>external</code> sender. Among the proposal types defined in this document, only the following types may be sent by an <code>external</code> sender:<a href="#section-12.1.8-5" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.1.8-6.1"> <code>add</code><a href="#section-12.1.8-6.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.8-6.2"> <code>remove</code><a href="#section-12.1.8-6.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.8-6.3"> <code>psk</code><a href="#section-12.1.8-6.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.8-6.4"> <code>reinit</code><a href="#section-12.1.8-6.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.1.8-6.5"> <code>group_context_extensions</code><a href="#section-12.1.8-6.5" class="pilcrow">¶</a> </li> </ul> <p id="section-12.1.8-7">Messages from <code>external</code> senders containing proposal types other than the above <span class="bcp14">MUST</span> be rejected as malformed. New proposal types defined in the future <span class="bcp14">MUST</span> define whether they may be sent by <code>external</code> senders. The "Ext" column in the "MLS Proposal Types" registry (<a href="#mls-proposal-types" class="auto internal xref">Section 17.4</a>) reflects this property.<a href="#section-12.1.8-7" class="pilcrow">¶</a></p> <div id="external-senders-extension"> <section id="section-12.1.8.1"> <h5 id="name-external-senders-extension"> <a href="#section-12.1.8.1" class="section-number selfRef">12.1.8.1. </a><a href="#name-external-senders-extension" class="section-name selfRef">External Senders Extension</a> </h5> <p id="section-12.1.8.1-1">The <code>external_senders</code> extension is a group context extension that contains the credentials and signature keys of senders that are permitted to send external proposals to the group.<a href="#section-12.1.8.1-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.1.8.1-2"> <pre> struct { SignaturePublicKey signature_key; Credential credential; } ExternalSender; ExternalSender external_senders<V>; </pre><a href="#section-12.1.8.1-2" class="pilcrow">¶</a> </div> </section> </div> </section> </div> </section> </div> <div id="proposal-list-validation"> <section id="section-12.2"> <h3 id="name-proposal-list-validation"> <a href="#section-12.2" class="section-number selfRef">12.2. </a><a href="#name-proposal-list-validation" class="section-name selfRef">Proposal List Validation</a> </h3> <p id="section-12.2-1">A group member creating a Commit and a group member processing a Commit <span class="bcp14">MUST</span> verify that the list of committed proposals is valid using one of the following procedures, depending on whether the Commit is external or not. If the list of proposals is invalid, then the Commit message <span class="bcp14">MUST</span> be rejected as invalid.<a href="#section-12.2-1" class="pilcrow">¶</a></p> <p id="section-12.2-2">For a regular, i.e., not external, Commit, the list is invalid if any of the following occurs:<a href="#section-12.2-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.2-3.1">It contains an individual proposal that is invalid as specified in <a href="#proposals" class="auto internal xref">Section 12.1</a>.<a href="#section-12.2-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.2">It contains an Update proposal generated by the committer.<a href="#section-12.2-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.3">It contains a Remove proposal that removes the committer.<a href="#section-12.2-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.4">It contains multiple Update and/or Remove proposals that apply to the same leaf. If the committer has received multiple such proposals they <span class="bcp14">SHOULD</span> prefer any Remove received, or the most recent Update if there are no Removes.<a href="#section-12.2-3.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.5">It contains multiple Add proposals that contain KeyPackages that represent the same client according to the application (for example, identical signature keys).<a href="#section-12.2-3.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.6">It contains an Add proposal with a KeyPackage that represents a client already in the group according to the application, unless there is a Remove proposal in the list removing the matching client from the group.<a href="#section-12.2-3.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.7">It contains multiple PreSharedKey proposals that reference the same PreSharedKeyID.<a href="#section-12.2-3.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.8">It contains multiple GroupContextExtensions proposals.<a href="#section-12.2-3.8" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.9">It contains a ReInit proposal together with any other proposal. If the committer has received other proposals during the epoch, they <span class="bcp14">SHOULD</span> prefer them over the ReInit proposal, allowing the ReInit to be resent and applied in a subsequent epoch.<a href="#section-12.2-3.9" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.10">It contains an ExternalInit proposal.<a href="#section-12.2-3.10" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.11">It contains a Proposal with a non-default proposal type that is not supported by some members of the group that will process the Commit (i.e., members being added or removed by the Commit do not need to support the proposal type).<a href="#section-12.2-3.11" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-3.12">After processing the Commit the ratchet tree is invalid, in particular, if it contains any leaf node that is invalid according to <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a>.<a href="#section-12.2-3.12" class="pilcrow">¶</a> </li> </ul> <p id="section-12.2-4">An application may extend the above procedure by additional rules, for example, requiring application-level permissions to add members, or rules concerning non-default proposal types.<a href="#section-12.2-4" class="pilcrow">¶</a></p> <p id="section-12.2-5">For an external Commit, the list is valid if it contains only the following proposals (not necessarily in this order):<a href="#section-12.2-5" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.2-6.1">Exactly one ExternalInit<a href="#section-12.2-6.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-6.2">At most one Remove proposal, with which the joiner removes an old version of themselves. If a Remove proposal is present, then the LeafNode in the <code>path</code> field of the external Commit <span class="bcp14">MUST</span> meet the same criteria as would the LeafNode in an Update for the removed leaf (see <a href="#update" class="auto internal xref">Section 12.1.2</a>). In particular, the <code>credential</code> in the LeafNode <span class="bcp14">MUST</span> present a set of identifiers that is acceptable to the application for the removed participant.<a href="#section-12.2-6.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-6.3">Zero or more PreSharedKey proposals<a href="#section-12.2-6.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.2-6.4">No other proposals<a href="#section-12.2-6.4" class="pilcrow">¶</a> </li> </ul> <p id="section-12.2-7">Proposal types defined in the future may make updates to the above validation logic to incorporate considerations related to proposals of the new type.<a href="#section-12.2-7" class="pilcrow">¶</a></p> </section> </div> <div id="applying-a-proposal-list"> <section id="section-12.3"> <h3 id="name-applying-a-proposal-list"> <a href="#section-12.3" class="section-number selfRef">12.3. </a><a href="#name-applying-a-proposal-list" class="section-name selfRef">Applying a Proposal List</a> </h3> <p id="section-12.3-1">The sections above defining each proposal type describe how each individual proposal is applied. When creating or processing a Commit, a client applies a list of proposals to the ratchet tree and GroupContext. The client <span class="bcp14">MUST</span> apply the proposals in the list in the following order:<a href="#section-12.3-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.3-2.1">If there is a GroupContextExtensions proposal, replace the <code>extensions</code> field of the GroupContext for the group with the contents of the proposal. The new <code>extensions</code> <span class="bcp14">MUST</span> be used when evaluating other proposals in this list. For example, if a GroupContextExtensions proposal adds a <code>required_capabilities</code> extension, then any Add proposals need to indicate support for those capabilities.<a href="#section-12.3-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.2">Apply any Update proposals to the ratchet tree, in any order.<a href="#section-12.3-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.3">Apply any Remove proposals to the ratchet tree, in any order.<a href="#section-12.3-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.4">Apply any Add proposals to the ratchet tree, in the order they appear in the list.<a href="#section-12.3-2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.5">Look up the PSK secrets for any PreSharedKey proposals, in the order they appear in the list. These secrets are then used to advance the key schedule later in Commit processing.<a href="#section-12.3-2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.6">If there is an ExternalInit proposal, use it to derive the <code>init_secret</code> for use later in Commit processing.<a href="#section-12.3-2.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.3-2.7">If there is a ReInit proposal, note its parameters for application later in Commit processing.<a href="#section-12.3-2.7" class="pilcrow">¶</a> </li> </ul> <p id="section-12.3-3">Proposal types defined in the future <span class="bcp14">MUST</span> specify how the above steps are to be adjusted to accommodate the application of proposals of the new type.<a href="#section-12.3-3" class="pilcrow">¶</a></p> </section> </div> <div id="commit"> <section id="section-12.4"> <h3 id="name-commit"> <a href="#section-12.4" class="section-number selfRef">12.4. </a><a href="#name-commit" class="section-name selfRef">Commit</a> </h3> <p id="section-12.4-1">A Commit message initiates a new epoch for the group, based on a collection of Proposals. It instructs group members to update their representation of the state of the group by applying the proposals and advancing the key schedule.<a href="#section-12.4-1" class="pilcrow">¶</a></p> <p id="section-12.4-2">Each proposal covered by the Commit is included by a ProposalOrRef value, which identifies the proposal to be applied by value or by reference. Commits that refer to new Proposals from the committer can be included by value. Commits for previously sent proposals from anyone (including the committer) can be sent by reference. Proposals sent by reference are specified by including the hash of the AuthenticatedContent object in which the proposal was sent (see <a href="#hash-based-identifiers" class="auto internal xref">Section 5.2</a>).<a href="#section-12.4-2" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4-3"> <pre> enum { reserved(0), proposal(1), reference(2), (255) } ProposalOrRefType; struct { ProposalOrRefType type; select (ProposalOrRef.type) { case proposal: Proposal proposal; case reference: ProposalRef reference; }; } ProposalOrRef; struct { ProposalOrRef proposals<V>; optional<UpdatePath> path; } Commit; </pre><a href="#section-12.4-3" class="pilcrow">¶</a> </div> <p id="section-12.4-4">A group member that has observed one or more valid proposals within an epoch <span class="bcp14">MUST</span> send a Commit message before sending application data. This ensures, for example, that any members whose removal was proposed during the epoch are actually removed before any application data is transmitted.<a href="#section-12.4-4" class="pilcrow">¶</a></p> <p id="section-12.4-5">A sender and a receiver of a Commit <span class="bcp14">MUST</span> verify that the committed list of proposals is valid as specified in <a href="#proposal-list-validation" class="auto internal xref">Section 12.2</a>. A list is invalid if, for example, it includes an Update and a Remove for the same member, or an Add when the sender does not have the application-level permission to add new users.<a href="#section-12.4-5" class="pilcrow">¶</a></p> <p id="section-12.4-6">The sender of a Commit <span class="bcp14">SHOULD</span> include all proposals that it has received during the current epoch that are valid according to the rules for their proposal types and according to application policy, as long as this results in a valid proposal list.<a href="#section-12.4-6" class="pilcrow">¶</a></p> <p id="section-12.4-7">Due to the asynchronous nature of proposals, receivers of a Commit <span class="bcp14">SHOULD NOT</span> enforce that all valid proposals sent within the current epoch are referenced by the next Commit. In the event that a valid proposal is omitted from the next Commit, and that proposal is still valid in the current epoch, the sender of the proposal <span class="bcp14">MAY</span> resend it after updating it to reflect the current epoch.<a href="#section-12.4-7" class="pilcrow">¶</a></p> <p id="section-12.4-8">A member of the group <span class="bcp14">MAY</span> send a Commit that references no proposals at all, which would thus have an empty <code>proposals</code> vector. Such a Commit resets the sender's leaf and the nodes along its direct path, and provides forward secrecy and post-compromise security with regard to the sender of the Commit. An Update proposal can be regarded as a "lazy" version of this operation, where only the leaf changes and intermediate nodes are blanked out.<a href="#section-12.4-8" class="pilcrow">¶</a></p> <p id="section-12.4-9">By default, the <code>path</code> field of a Commit <span class="bcp14">MUST</span> be populated. The <code>path</code> field <span class="bcp14">MAY</span> be omitted if (a) it covers at least one proposal and (b) none of the proposals covered by the Commit are of "path required" types. A proposal type requires a path if it cannot change the group membership in a way that requires the forward secrecy and post-compromise security guarantees that an UpdatePath provides. The only proposal types defined in this document that do not require a path are:<a href="#section-12.4-9" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4-10.1"> <code>add</code><a href="#section-12.4-10.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4-10.2"> <code>psk</code><a href="#section-12.4-10.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4-10.3"> <code>reinit</code><a href="#section-12.4-10.3" class="pilcrow">¶</a> </li> </ul> <p id="section-12.4-11">New proposal types <span class="bcp14">MUST</span> state whether they require a path. If any instance of a proposal type requires a path, then the proposal type requires a path. This attribute of a proposal type is reflected in the "Path Required" field of the "MLS Proposal Types" registry defined in <a href="#mls-proposal-types" class="auto internal xref">Section 17.4</a>.<a href="#section-12.4-11" class="pilcrow">¶</a></p> <p id="section-12.4-12">Update and Remove proposals are the clearest examples of proposals that require a path. An UpdatePath is required to evict the removed member or the old appearance of the updated member.<a href="#section-12.4-12" class="pilcrow">¶</a></p> <p id="section-12.4-13">In pseudocode, the logic for validating the <code>path</code> field of a Commit is as follows:<a href="#section-12.4-13" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-12.4-14"> <pre> pathRequiredTypes = [ update, remove, external_init, group_context_extensions ] pathRequired = false for proposal in commit.proposals: pathRequired = pathRequired || (proposal.msg_type in pathRequiredTypes) if len(commit.proposals) == 0 || pathRequired: assert(commit.path != null) </pre><a href="#section-12.4-14" class="pilcrow">¶</a> </div> <p id="section-12.4-15">To summarize, a Commit can have three different configurations, with different uses:<a href="#section-12.4-15" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="section-12.4-16"> <li id="section-12.4-16.1">An "empty" Commit that references no proposals, which updates the committer's contribution to the group and provides PCS with regard to the committer.<a href="#section-12.4-16.1" class="pilcrow">¶</a> </li> <li id="section-12.4-16.2">A "partial" Commit that references proposals that do not require a path, and where the path is empty. Such a Commit doesn't provide PCS with regard to the committer.<a href="#section-12.4-16.2" class="pilcrow">¶</a> </li> <li id="section-12.4-16.3">A "full" Commit that references proposals of any type, which provides FS with regard to any removed members and PCS for the committer and any updated members.<a href="#section-12.4-16.3" class="pilcrow">¶</a> </li> </ol> <div id="creating-a-commit"> <section id="section-12.4.1"> <h4 id="name-creating-a-commit"> <a href="#section-12.4.1" class="section-number selfRef">12.4.1. </a><a href="#name-creating-a-commit" class="section-name selfRef">Creating a Commit</a> </h4> <p id="section-12.4.1-1">When creating or processing a Commit, a client updates the ratchet tree and GroupContext for the group. These values advance from an "old" state reflecting the current epoch to a "new" state reflecting the new epoch initiated by the Commit. When the Commit includes an UpdatePath, a "provisional" group context is constructed that reflects changes due to the proposals and UpdatePath, but with the old confirmed transcript hash.<a href="#section-12.4.1-1" class="pilcrow">¶</a></p> <p id="section-12.4.1-2">A member of the group creates a Commit message and the corresponding Welcome message at the same time, by taking the following steps:<a href="#section-12.4.1-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.1">Verify that the list of proposals to be committed is valid as specified in <a href="#proposal-list-validation" class="auto internal xref">Section 12.2</a>.<a href="#section-12.4.1-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.2">Construct an initial Commit object with the <code>proposals</code> field populated from Proposals received during the current epoch, and with the <code>path</code> field empty.<a href="#section-12.4.1-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.3">Create the new ratchet tree and GroupContext by applying the list of proposals to the old ratchet tree and GroupContext, as defined in <a href="#applying-a-proposal-list" class="auto internal xref">Section 12.3</a>.<a href="#section-12.4.1-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.4">Decide whether to populate the <code>path</code> field: If the <code>path</code> field is required based on the proposals that are in the Commit (see above), then it <span class="bcp14">MUST</span> be populated. Otherwise, the sender <span class="bcp14">MAY</span> omit the <code>path</code> field at its discretion.<a href="#section-12.4.1-3.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5"> <p id="section-12.4.1-3.5.1">If populating the <code>path</code> field:<a href="#section-12.4.1-3.5.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.5.2.1">If this is an external Commit, assign the sender the leftmost blank leaf node in the new ratchet tree. If there are no blank leaf nodes in the new ratchet tree, expand the tree to the right as defined in <a href="#adding-and-removing-leaves" class="auto internal xref">Section 7.7</a> and assign the leftmost new blank leaf to the sender.<a href="#section-12.4.1-3.5.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.2">Update the sender's direct path in the ratchet tree as described in <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>. Define <code>commit_secret</code> as the value <code>path_secret[n+1]</code> derived from the last path secret value (<code>path_secret[n]</code>) derived for the UpdatePath.<a href="#section-12.4.1-3.5.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.3"> <p id="section-12.4.1-3.5.2.3.1">Construct a provisional GroupContext object containing the following values:<a href="#section-12.4.1-3.5.2.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.5.2.3.2.1"> <code>group_id</code>: Same as the old GroupContext<a href="#section-12.4.1-3.5.2.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.3.2.2"> <code>epoch</code>: The epoch number for the new epoch<a href="#section-12.4.1-3.5.2.3.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.3.2.3"> <code>tree_hash</code>: The tree hash of the new ratchet tree<a href="#section-12.4.1-3.5.2.3.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.3.2.4"> <code>confirmed_transcript_hash</code>: Same as the old GroupContext<a href="#section-12.4.1-3.5.2.3.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.3.2.5"> <code>extensions</code>: The new GroupContext extensions (possibly updated by a GroupContextExtensions proposal)<a href="#section-12.4.1-3.5.2.3.2.5" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.5.2.4">Encrypt the path secrets resulting from the tree update to the group as described in <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>, using the provisional group context as the context for HPKE encryption.<a href="#section-12.4.1-3.5.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.5.2.5">Create an UpdatePath containing the sender's new leaf node and the new public keys and encrypted path secrets along the sender's filtered direct path. Assign this UpdatePath to the <code>path</code> field in the Commit.<a href="#section-12.4.1-3.5.2.5" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.6">If not populating the <code>path</code> field: Set the <code>path</code> field in the Commit to the null optional. Define <code>commit_secret</code> as the all-zero vector of length <code>KDF.Nh</code> (the same length as a <code>path_secret</code> value would be).<a href="#section-12.4.1-3.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.7">Derive the <code>psk_secret</code> as specified in <a href="#pre-shared-keys" class="auto internal xref">Section 8.4</a>, where the order of PSKs in the derivation corresponds to the order of PreSharedKey proposals in the <code>proposals</code> vector.<a href="#section-12.4.1-3.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.8"> <p id="section-12.4.1-3.8.1">Construct a FramedContent object containing the Commit object. Sign the FramedContent using the old GroupContext as context.<a href="#section-12.4.1-3.8.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.8.2.1">Use the FramedContent to update the confirmed transcript hash and update the new GroupContext.<a href="#section-12.4.1-3.8.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.8.2.2">Use the <code>init_secret</code> from the previous epoch, the <code>commit_secret</code> and <code>psk_secret</code> defined in the previous steps, and the new GroupContext to compute the new <code>joiner_secret</code>, <code>welcome_secret</code>, <code>epoch_secret</code>, and derived secrets for the new epoch.<a href="#section-12.4.1-3.8.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.8.2.3">Use the <code>confirmation_key</code> for the new epoch to compute the <code>confirmation_tag</code> value.<a href="#section-12.4.1-3.8.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.8.2.4">Calculate the interim transcript hash using the new confirmed transcript hash and the <code>confirmation_tag</code> from the FramedContentAuthData.<a href="#section-12.4.1-3.8.2.4" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.9"> <p id="section-12.4.1-3.9.1">Protect the AuthenticatedContent object using keys from the old epoch:<a href="#section-12.4.1-3.9.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.9.2.1">If encoding as PublicMessage, compute the <code>membership_tag</code> value using the <code>membership_key</code>.<a href="#section-12.4.1-3.9.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.9.2.2">If encoding as a PrivateMessage, encrypt the message using the <code>sender_data_secret</code> and the next (key, nonce) pair from the sender's handshake ratchet.<a href="#section-12.4.1-3.9.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.10"> <p id="section-12.4.1-3.10.1">Construct a GroupInfo reflecting the new state:<a href="#section-12.4.1-3.10.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.10.2.1">Set the <code>group_id</code>, <code>epoch</code>, <code>tree</code>, <code>confirmed_transcript_hash</code>, <code>interim_transcript_hash</code>, and <code>group_context_extensions</code> fields to reflect the new state.<a href="#section-12.4.1-3.10.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.10.2.2">Set the <code>confirmation_tag</code> field to the value of the corresponding field in the FramedContentAuthData object.<a href="#section-12.4.1-3.10.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.10.2.3">Add any other extensions as defined by the application.<a href="#section-12.4.1-3.10.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.10.2.4">Optionally derive an external key pair as described in <a href="#key-schedule" class="auto internal xref">Section 8</a>. (required for external Commits, see <a href="#joining-via-external-commits" class="auto internal xref">Section 12.4.3.2</a>).<a href="#section-12.4.1-3.10.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.10.2.5">Sign the GroupInfo using the member's private signing key.<a href="#section-12.4.1-3.10.2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.10.2.6">Encrypt the GroupInfo using the key and nonce derived from the <code>joiner_secret</code>. for the new epoch (see <a href="#joining-via-welcome-message" class="auto internal xref">Section 12.4.3.1</a>).<a href="#section-12.4.1-3.10.2.6" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.11"> <p id="section-12.4.1-3.11.1">For each new member in the group:<a href="#section-12.4.1-3.11.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.11.2.1">Identify the lowest common ancestor in the tree of the new member's leaf node and the member sending the Commit.<a href="#section-12.4.1-3.11.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.11.2.2">If the <code>path</code> field was populated above: Compute the path secret corresponding to the common ancestor node.<a href="#section-12.4.1-3.11.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.11.2.3">Compute an EncryptedGroupSecrets object that encapsulates the <code>init_secret</code> for the current epoch and the path secret (if present).<a href="#section-12.4.1-3.11.2.3" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.1-3.12">Construct one or more Welcome messages from the encrypted GroupInfo object, the encrypted key packages, and any PSKs for which a proposal was included in the Commit. The order of the <code>psks</code> <span class="bcp14">MUST</span> be the same as the order of PreSharedKey proposals in the <code>proposals</code> vector. As discussed in <a href="#joining-via-welcome-message" class="auto internal xref">Section 12.4.3.1</a>, the committer is free to choose how many Welcome messages to construct. However, the set of Welcome messages produced in this step <span class="bcp14">MUST</span> cover every new member added in the Commit.<a href="#section-12.4.1-3.12" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.13"> <p id="section-12.4.1-3.13.1">If a ReInit proposal was part of the Commit, the committer <span class="bcp14">MUST</span> create a new group with the parameters specified in the ReInit proposal, and with the same members as the original group. The Welcome message <span class="bcp14">MUST</span> include a PreSharedKeyID with the following parameters:<a href="#section-12.4.1-3.13.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.1-3.13.2.1"> <code>psktype</code>: <code>resumption</code><a href="#section-12.4.1-3.13.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.13.2.2"> <code>usage</code>: <code>reinit</code><a href="#section-12.4.1-3.13.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.13.2.3"> <code>group_id</code>: The group ID for the current group<a href="#section-12.4.1-3.13.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.1-3.13.2.4"> <code>epoch</code>: The epoch that the group will be in after this Commit<a href="#section-12.4.1-3.13.2.4" class="pilcrow">¶</a> </li> </ul> </li> </ul> </section> </div> <div id="processing-a-commit"> <section id="section-12.4.2"> <h4 id="name-processing-a-commit"> <a href="#section-12.4.2" class="section-number selfRef">12.4.2. </a><a href="#name-processing-a-commit" class="section-name selfRef">Processing a Commit</a> </h4> <p id="section-12.4.2-1">A member of the group applies a Commit message by taking the following steps:<a href="#section-12.4.2-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.2-2.1">Verify that the <code>epoch</code> field of the enclosing FramedContent is equal to the <code>epoch</code> field of the current GroupContext object.<a href="#section-12.4.2-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.2"> <p id="section-12.4.2-2.2.1">Unprotect the Commit using the keys from the current epoch:<a href="#section-12.4.2-2.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.2-2.2.2.1">If the message is encoded as PublicMessage, verify the membership MAC using the <code>membership_key</code>.<a href="#section-12.4.2-2.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.2.2.2">If the message is encoded as PrivateMessage, decrypt the message using the <code>sender_data_secret</code> and the (key, nonce) pair from the step on the sender's hash ratchet indicated by the <code>generation</code> field.<a href="#section-12.4.2-2.2.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.2-2.3">Verify the signature on the FramedContent message as described in <a href="#content-authentication" class="auto internal xref">Section 6.1</a>.<a href="#section-12.4.2-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.4">Verify that the <code>proposals</code> vector is valid according to the rules in <a href="#proposal-list-validation" class="auto internal xref">Section 12.2</a>.<a href="#section-12.4.2-2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.5">Verify that all PreSharedKey proposals in the <code>proposals</code> vector are available.<a href="#section-12.4.2-2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.6">Create the new ratchet tree and GroupContext by applying the list of proposals to the old ratchet tree and GroupContext, as defined in <a href="#applying-a-proposal-list" class="auto internal xref">Section 12.3</a>.<a href="#section-12.4.2-2.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.7">Verify that the <code>path</code> value is populated if the <code>proposals</code> vector contains any Update or Remove proposals, or if it's empty. Otherwise, the <code>path</code> value <span class="bcp14">MAY</span> be omitted.<a href="#section-12.4.2-2.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8"> <p id="section-12.4.2-2.8.1">If the <code>path</code> value is populated, validate it and apply it to the tree:<a href="#section-12.4.2-2.8.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.2-2.8.2.1">If this is an external Commit, assign the sender the leftmost blank leaf node in the new ratchet tree. If there are no blank leaf nodes in the new ratchet tree, add a blank leaf to the right side of the new ratchet tree and assign it to the sender.<a href="#section-12.4.2-2.8.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.2">Validate the LeafNode as specified in <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a>. The <code>leaf_node_source</code> field <span class="bcp14">MUST</span> be set to <code>commit</code>.<a href="#section-12.4.2-2.8.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.3">Verify that the <code>encryption_key</code> value in the LeafNode is different from the committer's current leaf node.<a href="#section-12.4.2-2.8.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.4">Verify that none of the public keys in the UpdatePath appear in any node of the new ratchet tree.<a href="#section-12.4.2-2.8.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.5">Merge the UpdatePath into the new ratchet tree, as described in <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>.<a href="#section-12.4.2-2.8.2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.6"> <p id="section-12.4.2-2.8.2.6.1">Construct a provisional GroupContext object containing the following values:<a href="#section-12.4.2-2.8.2.6.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.2-2.8.2.6.2.1"> <code>group_id</code>: Same as the old GroupContext<a href="#section-12.4.2-2.8.2.6.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.6.2.2"> <code>epoch</code>: The epoch number for the new epoch<a href="#section-12.4.2-2.8.2.6.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.6.2.3"> <code>tree_hash</code>: The tree hash of the new ratchet tree<a href="#section-12.4.2-2.8.2.6.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.6.2.4"> <code>confirmed_transcript_hash</code>: Same as the old GroupContext<a href="#section-12.4.2-2.8.2.6.2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.6.2.5"> <code>extensions</code>: The new GroupContext extensions (possibly updated by a GroupContextExtensions proposal)<a href="#section-12.4.2-2.8.2.6.2.5" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.2-2.8.2.7">Decrypt the path secrets for UpdatePath as described in <a href="#synchronizing-views-of-the-tree" class="auto internal xref">Section 7.5</a>, using the provisional GroupContext as the context for HPKE decryption.<a href="#section-12.4.2-2.8.2.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.8.2.8">Define <code>commit_secret</code> as the value <code>path_secret[n+1]</code> derived from the last path secret value (<code>path_secret[n]</code>) derived for the UpdatePath.<a href="#section-12.4.2-2.8.2.8" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.2-2.9">If the <code>path</code> value is not populated, define <code>commit_secret</code> as the all-zero vector of length <code>KDF.Nh</code> (the same length as a <code>path_secret</code> value would be).<a href="#section-12.4.2-2.9" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.10">Update the confirmed and interim transcript hashes using the new Commit, and generate the new GroupContext.<a href="#section-12.4.2-2.10" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.11">Derive the <code>psk_secret</code> as specified in <a href="#pre-shared-keys" class="auto internal xref">Section 8.4</a>, where the order of PSKs in the derivation corresponds to the order of PreSharedKey proposals in the <code>proposals</code> vector.<a href="#section-12.4.2-2.11" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.12">Use the <code>init_secret</code> from the previous epoch, the <code>commit_secret</code> and <code>psk_secret</code> defined in the previous steps, and the new GroupContext to compute the new <code>joiner_secret</code>, <code>welcome_secret</code>, <code>epoch_secret</code>, and derived secrets for the new epoch.<a href="#section-12.4.2-2.12" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.13">Use the <code>confirmation_key</code> for the new epoch to compute the confirmation tag for this message, as described below, and verify that it is the same as the <code>confirmation_tag</code> field in the FramedContentAuthData object.<a href="#section-12.4.2-2.13" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.14">If the above checks are successful, consider the new GroupContext object as the current state of the group.<a href="#section-12.4.2-2.14" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.2-2.15">If the Commit included a ReInit proposal, the client <span class="bcp14">MUST NOT</span> use the group to send messages anymore. Instead, it <span class="bcp14">MUST</span> wait for a Welcome message from the committer meeting the requirements of <a href="#reinitialization" class="auto internal xref">Section 11.2</a>.<a href="#section-12.4.2-2.15" class="pilcrow">¶</a> </li> </ul> <p id="section-12.4.2-3">Note that clients need to be prepared to receive a valid Commit message that removes them from the group. In this case, the client cannot send any more messages in the group and <span class="bcp14">SHOULD</span> promptly delete its group state and secret tree. (A client might keep the secret tree for a short time to decrypt late messages in the previous epoch.)<a href="#section-12.4.2-3" class="pilcrow">¶</a></p> </section> </div> <div id="adding-members-to-the-group"> <section id="section-12.4.3"> <h4 id="name-adding-members-to-the-group"> <a href="#section-12.4.3" class="section-number selfRef">12.4.3. </a><a href="#name-adding-members-to-the-group" class="section-name selfRef">Adding Members to the Group</a> </h4> <p id="section-12.4.3-1">New members can join the group in two ways: by being added by a group member or by adding themselves through an external Commit. In both cases, the new members need information to bootstrap their local group state.<a href="#section-12.4.3-1" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4.3-2"> <pre> struct { GroupContext group_context; Extension extensions<V>; MAC confirmation_tag; uint32 signer; /* SignWithLabel(., "GroupInfoTBS", GroupInfoTBS) */ opaque signature<V>; } GroupInfo; </pre><a href="#section-12.4.3-2" class="pilcrow">¶</a> </div> <p id="section-12.4.3-3">The <code>group_context</code> field represents the current state of the group. The <code>extensions</code> field allows the sender to provide additional data that might be useful to new joiners. The <code>confirmation_tag</code> represents the confirmation tag from the Commit that initiated the current epoch, or for epoch 0, the confirmation tag computed in the creation of the group (see <a href="#group-creation" class="auto internal xref">Section 11</a>). (In either case, the creator of a GroupInfo may recompute the confirmation tag as <code>MAC(confirmation_key, confirmed_transcript_hash)</code>.)<a href="#section-12.4.3-3" class="pilcrow">¶</a></p> <p id="section-12.4.3-4">As discussed in <a href="#extensibility" class="auto internal xref">Section 13</a>, unknown extensions in <code>GroupInfo.extensions</code> <span class="bcp14">MUST</span> be ignored, and the creator of a GroupInfo object <span class="bcp14">SHOULD</span> include some random GREASE extensions to help ensure that other clients correctly ignore unknown extensions. Extensions in <code>GroupInfo.group_context.extensions</code>, however, <span class="bcp14">MUST</span> be supported by the new joiner.<a href="#section-12.4.3-4" class="pilcrow">¶</a></p> <p id="section-12.4.3-5">New members <span class="bcp14">MUST</span> verify that <code>group_id</code> is unique among the groups they are currently participating in.<a href="#section-12.4.3-5" class="pilcrow">¶</a></p> <p id="section-12.4.3-6">New members also <span class="bcp14">MUST</span> verify the <code>signature</code> using the public key taken from the leaf node of the ratchet tree with leaf index <code>signer</code>. The signature covers the following structure, comprising all the fields in the GroupInfo above <code>signature</code>:<a href="#section-12.4.3-6" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4.3-7"> <pre> struct { GroupContext group_context; Extension extensions<V>; MAC confirmation_tag; uint32 signer; } GroupInfoTBS; </pre><a href="#section-12.4.3-7" class="pilcrow">¶</a> </div> <div id="joining-via-welcome-message"> <section id="section-12.4.3.1"> <h5 id="name-joining-via-welcome-message"> <a href="#section-12.4.3.1" class="section-number selfRef">12.4.3.1. </a><a href="#name-joining-via-welcome-message" class="section-name selfRef">Joining via Welcome Message</a> </h5> <p id="section-12.4.3.1-1">The sender of a Commit message is responsible for sending a Welcome message to each new member added via Add proposals. The format of the Welcome message allows a single Welcome message to be encrypted for multiple new members. It is up to the committer to decide how many Welcome messages to create for a given Commit. The committer could create one Welcome that is encrypted for all new members, a different Welcome for each new member, or Welcome messages for batches of new members (according to some batching scheme that works well for the application). The processes for creating and processing the Welcome are the same in all cases, aside from the set of new members for whom a given Welcome is encrypted.<a href="#section-12.4.3.1-1" class="pilcrow">¶</a></p> <p id="section-12.4.3.1-2">The Welcome message provides the new members with the current state of the group after the application of the Commit message. The new members will not be able to decrypt or verify the Commit message, but they will have the secrets they need to participate in the epoch initiated by the Commit message.<a href="#section-12.4.3.1-2" class="pilcrow">¶</a></p> <p id="section-12.4.3.1-3">In order to allow the same Welcome message to be sent to multiple new members, information describing the group is encrypted with a symmetric key and nonce derived from the <code>joiner_secret</code> for the new epoch. The <code>joiner_secret</code> is then encrypted to each new member using HPKE. In the same encrypted package, the committer transmits the path secret for the lowest (closest to the leaf) node that is contained in the direct paths of both the committer and the new member. This allows the new member to compute private keys for nodes in its direct path that are being reset by the corresponding Commit.<a href="#section-12.4.3.1-3" class="pilcrow">¶</a></p> <p id="section-12.4.3.1-4">If the sender of the Welcome message wants the receiving member to include a PSK in the derivation of the <code>epoch_secret</code>, they can populate the <code>psks</code> field indicating which PSK to use.<a href="#section-12.4.3.1-4" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4.3.1-5"> <pre> struct { opaque path_secret<V>; } PathSecret; struct { opaque joiner_secret<V>; optional<PathSecret> path_secret; PreSharedKeyID psks<V>; } GroupSecrets; struct { KeyPackageRef new_member; HPKECiphertext encrypted_group_secrets; } EncryptedGroupSecrets; struct { CipherSuite cipher_suite; EncryptedGroupSecrets secrets<V>; opaque encrypted_group_info<V>; } Welcome; </pre><a href="#section-12.4.3.1-5" class="pilcrow">¶</a> </div> <p id="section-12.4.3.1-6">The client processing a Welcome message will need to have a copy of the group's ratchet tree. The tree can be provided in the Welcome message, in an extension of type <code>ratchet_tree</code>. If it is sent otherwise (e.g., provided by a caching service on the Delivery Service), then the client <span class="bcp14">MUST</span> download the tree before processing the Welcome.<a href="#section-12.4.3.1-6" class="pilcrow">¶</a></p> <p id="section-12.4.3.1-7">On receiving a Welcome message, a client processes it using the following steps:<a href="#section-12.4.3.1-7" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.1-8.1">Identify an entry in the <code>secrets</code> array where the <code>new_member</code> value corresponds to one of this client's KeyPackages, using the hash indicated by the <code>cipher_suite</code> field. If no such field exists, or if the cipher suite indicated in the KeyPackage does not match the one in the Welcome message, return an error.<a href="#section-12.4.3.1-8.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-8.2">Decrypt the <code>encrypted_group_secrets</code> value with the algorithms indicated by the cipher suite and the private key <code>init_key_priv</code> corresponding to <code>init_key</code> in the referenced KeyPackage.<a href="#section-12.4.3.1-8.2" class="pilcrow">¶</a> </li> </ul> <div class="lang-pseudocode sourcecode" id="section-12.4.3.1-9"> <pre> encrypted_group_secrets = EncryptWithLabel(init_key, "Welcome", encrypted_group_info, group_secrets) group_secrets = DecryptWithLabel(init_key_priv, "Welcome", encrypted_group_info, kem_output, ciphertext) </pre><a href="#section-12.4.3.1-9" class="pilcrow">¶</a> </div> <ul class="normal"> <li class="normal" id="section-12.4.3.1-10.1">If a PreSharedKeyID is part of the GroupSecrets and the client is not in possession of the corresponding PSK, return an error. Additionally, if a PreSharedKeyID has type <code>resumption</code> with usage <code>reinit</code> or <code>branch</code>, verify that it is the only such PSK.<a href="#section-12.4.3.1-10.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-10.2">From the <code>joiner_secret</code> in the decrypted GroupSecrets object and the PSKs specified in the GroupSecrets, derive the <code>welcome_secret</code> and then the <code>welcome_key</code> and <code>welcome_nonce</code>. Use the key and nonce to decrypt the <code>encrypted_group_info</code> field.<a href="#section-12.4.3.1-10.2" class="pilcrow">¶</a> </li> </ul> <div class="lang-pseudocode sourcecode" id="section-12.4.3.1-11"> <pre> welcome_nonce = ExpandWithLabel(welcome_secret, "nonce", "", AEAD.Nn) welcome_key = ExpandWithLabel(welcome_secret, "key", "", AEAD.Nk) </pre><a href="#section-12.4.3.1-11" class="pilcrow">¶</a> </div> <ul class="normal"> <li class="normal" id="section-12.4.3.1-12.1">Verify the signature on the GroupInfo object. The signature input comprises all of the fields in the GroupInfo object except the signature field. The public key is taken from the LeafNode of the ratchet tree with leaf index <code>signer</code>. If the node is blank or if signature verification fails, return an error.<a href="#section-12.4.3.1-12.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.2">Verify that the <code>group_id</code> is unique among the groups that the client is currently participating in.<a href="#section-12.4.3.1-12.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.3">Verify that the <code>cipher_suite</code> in the GroupInfo matches the <code>cipher_suite</code> in the KeyPackage.<a href="#section-12.4.3.1-12.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4"> <p id="section-12.4.3.1-12.4.1">Verify the integrity of the ratchet tree.<a href="#section-12.4.3.1-12.4.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.1-12.4.2.1">Verify that the tree hash of the ratchet tree matches the <code>tree_hash</code> field in GroupInfo.<a href="#section-12.4.3.1-12.4.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4.2.2">For each non-empty parent node, verify that it is "parent-hash valid", as described in <a href="#verifying-parent-hashes" class="auto internal xref">Section 7.9.2</a>.<a href="#section-12.4.3.1-12.4.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4.2.3">For each non-empty leaf node, validate the LeafNode as described in <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a>.<a href="#section-12.4.3.1-12.4.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4.2.4"> <p id="section-12.4.3.1-12.4.2.4.1">For each non-empty parent node and each entry in the node's <code>unmerged_leaves</code> field:<a href="#section-12.4.3.1-12.4.2.4.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.1-12.4.2.4.2.1">Verify that the entry represents a non-blank leaf node that is a descendant of the parent node.<a href="#section-12.4.3.1-12.4.2.4.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4.2.4.2.2">Verify that every non-blank intermediate node between the leaf node and the parent node also has an entry for the leaf node in its <code>unmerged_leaves</code>.<a href="#section-12.4.3.1-12.4.2.4.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.4.2.4.2.3">Verify that the encryption key in the parent node does not appear in any other node of the tree.<a href="#section-12.4.3.1-12.4.2.4.2.3" class="pilcrow">¶</a> </li> </ul> </li> </ul> </li> <li class="normal" id="section-12.4.3.1-12.5">Identify a leaf whose LeafNode is identical to the one in the KeyPackage. If no such field exists, return an error. Let <code>my_leaf</code> represent this leaf in the tree.<a href="#section-12.4.3.1-12.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.6"> <p id="section-12.4.3.1-12.6.1">Construct a new group state using the information in the GroupInfo object.<a href="#section-12.4.3.1-12.6.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.1-12.6.2.1">Initialize the GroupContext for the group from the <code>group_context</code> field from the GroupInfo object.<a href="#section-12.4.3.1-12.6.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.6.2.2">Update the leaf <code>my_leaf</code> with the private key corresponding to the public key in the node, where <code>my_leaf</code> is the new member's leaf node in the ratchet tree, as defined above.<a href="#section-12.4.3.1-12.6.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.6.2.3">If the <code>path_secret</code> value is set in the GroupSecrets object: Identify the lowest common ancestor of the leaf node <code>my_leaf</code> and of the node of the member with leaf index <code>GroupInfo.signer</code>. Set the private key for this node to the private key derived from the <code>path_secret</code>.<a href="#section-12.4.3.1-12.6.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.6.2.4">For each parent of the common ancestor, up to the root of the tree, derive a new path secret, and set the private key for the node to the private key derived from the path secret. The private key <span class="bcp14">MUST</span> be the private key that corresponds to the public key in the node.<a href="#section-12.4.3.1-12.6.2.4" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-12.4.3.1-12.7">Use the <code>joiner_secret</code> from the GroupSecrets object to generate the epoch secret and other derived secrets for the current epoch.<a href="#section-12.4.3.1-12.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.8">Set the confirmed transcript hash in the new state to the value of the <code>confirmed_transcript_hash</code> in the GroupInfo.<a href="#section-12.4.3.1-12.8" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.9">Verify the confirmation tag in the GroupInfo using the derived confirmation key and the <code>confirmed_transcript_hash</code> from the GroupInfo.<a href="#section-12.4.3.1-12.9" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.10">Use the confirmed transcript hash and confirmation tag to compute the interim transcript hash in the new state.<a href="#section-12.4.3.1-12.10" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.11"> <p id="section-12.4.3.1-12.11.1">If a PreSharedKeyID was used that has type <code>resumption</code> with usage <code>reinit</code> or <code>branch</code>, verify that the <code>epoch</code> field in the GroupInfo is equal to 1.<a href="#section-12.4.3.1-12.11.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.1-12.11.2.1">For usage <code>reinit</code>, verify that the last Commit to the referenced group contains a ReInit proposal and that the <code>group_id</code>, <code>version</code>, <code>cipher_suite</code>, and <code>group_context.extensions</code> fields of the GroupInfo match the ReInit proposal. Additionally, verify that all the members of the old group are also members of the new group, according to the application.<a href="#section-12.4.3.1-12.11.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.1-12.11.2.2">For usage <code>branch</code>, verify that the <code>version</code> and <code>cipher_suite</code> of the new group match those of the old group, and that the members of the new group compose a subset of the members of the old group, according to the application.<a href="#section-12.4.3.1-12.11.2.2" class="pilcrow">¶</a> </li> </ul> </li> </ul> </section> </div> <div id="joining-via-external-commits"> <section id="section-12.4.3.2"> <h5 id="name-joining-via-external-commit"> <a href="#section-12.4.3.2" class="section-number selfRef">12.4.3.2. </a><a href="#name-joining-via-external-commit" class="section-name selfRef">Joining via External Commits</a> </h5> <p id="section-12.4.3.2-1">External Commits are a mechanism for new members (external parties that want to become members of the group) to add themselves to a group, without requiring that an existing member has to come online to issue a Commit that references an Add proposal.<a href="#section-12.4.3.2-1" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-2">Whether existing members of the group will accept or reject an external Commit follows the same rules that are applied to other handshake messages.<a href="#section-12.4.3.2-2" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-3">New members can create and issue an external Commit if they have access to the following information for the group's current epoch:<a href="#section-12.4.3.2-3" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.2-4.1">group ID<a href="#section-12.4.3.2-4.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.2">epoch ID<a href="#section-12.4.3.2-4.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.3">cipher suite<a href="#section-12.4.3.2-4.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.4">public tree hash<a href="#section-12.4.3.2-4.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.5">confirmed transcript hash<a href="#section-12.4.3.2-4.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.6">confirmation tag of the most recent Commit<a href="#section-12.4.3.2-4.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.7">group extensions<a href="#section-12.4.3.2-4.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-4.8">external public key<a href="#section-12.4.3.2-4.8" class="pilcrow">¶</a> </li> </ul> <p id="section-12.4.3.2-5">In other words, to join a group via an external Commit, a new member needs a GroupInfo with an <code>external_pub</code> extension present in its <code>extensions</code> field.<a href="#section-12.4.3.2-5" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4.3.2-6"> <pre> struct { HPKEPublicKey external_pub; } ExternalPub; </pre><a href="#section-12.4.3.2-6" class="pilcrow">¶</a> </div> <p id="section-12.4.3.2-7">Thus, a member of the group can enable new clients to join by making a GroupInfo object available to them. Note that because a GroupInfo object is specific to an epoch, it will need to be updated as the group advances. In particular, each GroupInfo object can be used for one external join, since that external join will cause the epoch to change.<a href="#section-12.4.3.2-7" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-8">Note that the <code>tree_hash</code> field is used the same way as in the Welcome message. The full tree can be included via the <code>ratchet_tree</code> extension (see <a href="#ratchet-tree-extension" class="auto internal xref">Section 12.4.3.3</a>).<a href="#section-12.4.3.2-8" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-9">The information in a GroupInfo is not generally public information, but applications can choose to make it available to new members in order to allow External Commits.<a href="#section-12.4.3.2-9" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-10">In principle, external Commits work like regular Commits. However, their content has to meet a specific set of requirements:<a href="#section-12.4.3.2-10" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-12.4.3.2-11.1">External Commits <span class="bcp14">MUST</span> contain a <code>path</code> field (and is therefore a "full" Commit). The joiner is added at the leftmost free leaf node (just as if they were added with an Add proposal), and the path is calculated relative to that leaf node.<a href="#section-12.4.3.2-11.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-11.2">The Commit <span class="bcp14">MUST NOT</span> include any proposals by reference, since an external joiner cannot determine the validity of proposals sent within the group.<a href="#section-12.4.3.2-11.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-11.3">External Commits <span class="bcp14">MUST</span> be signed by the new member. In particular, the signature on the enclosing AuthenticatedContent <span class="bcp14">MUST</span> verify using the public key for the credential in the <code>leaf_node</code> of the <code>path</code> field.<a href="#section-12.4.3.2-11.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-11.4">When processing a Commit, both existing and new members <span class="bcp14">MUST</span> use the external init secret as described in <a href="#external-initialization" class="auto internal xref">Section 8.3</a>.<a href="#section-12.4.3.2-11.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-12.4.3.2-11.5">The sender type for the AuthenticatedContent encapsulating the external Commit <span class="bcp14">MUST</span> be <code>new_member_commit</code>.<a href="#section-12.4.3.2-11.5" class="pilcrow">¶</a> </li> </ul> <p id="section-12.4.3.2-12">External Commits come in two "flavors" -- a "join" Commit that adds the sender to the group or a "resync" Commit that replaces a member's prior appearance with a new one.<a href="#section-12.4.3.2-12" class="pilcrow">¶</a></p> <p id="section-12.4.3.2-13">Note that the "resync" operation allows an attacker that has compromised a member's signature private key to introduce themselves into the group and remove the prior, legitimate member in a single Commit. Without resync, this can still be done, but it requires two operations: the external Commit to join and a second Commit to remove the old appearance. Applications for whom this distinction is salient can choose to disallow external commits that contain a Remove, or to allow such resync commits only if they contain a "reinit" PSK proposal that demonstrates the joining member's presence in a prior epoch of the group. With the latter approach, the attacker would need to compromise the PSK as well as the signing key, but the application will need to ensure that continuing, non-resynchronizing members have the required PSK.<a href="#section-12.4.3.2-13" class="pilcrow">¶</a></p> </section> </div> <div id="ratchet-tree-extension"> <section id="section-12.4.3.3"> <h5 id="name-ratchet-tree-extension"> <a href="#section-12.4.3.3" class="section-number selfRef">12.4.3.3. </a><a href="#name-ratchet-tree-extension" class="section-name selfRef">Ratchet Tree Extension</a> </h5> <p id="section-12.4.3.3-1">By default, a GroupInfo message only provides the joiner with a hash of the group's ratchet tree. In order to process or generate handshake messages, the joiner will need to get a copy of the ratchet tree from some other source. (For example, the DS might provide a cached copy.) The inclusion of the tree hash in the GroupInfo message means that the source of the ratchet tree need not be trusted to maintain the integrity of the tree.<a href="#section-12.4.3.3-1" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-2">In cases where the application does not wish to provide such an external source, the whole public state of the ratchet tree can be provided in an extension of type <code>ratchet_tree</code>, containing a <code>ratchet_tree</code> object of the following form:<a href="#section-12.4.3.3-2" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-12.4.3.3-3"> <pre> struct { NodeType node_type; select (Node.node_type) { case leaf: LeafNode leaf_node; case parent: ParentNode parent_node; }; } Node; optional<Node> ratchet_tree<V>; </pre><a href="#section-12.4.3.3-3" class="pilcrow">¶</a> </div> <p id="section-12.4.3.3-4">Each entry in the <code>ratchet_tree</code> vector provides the value for a node in the tree, or the null optional for a blank node.<a href="#section-12.4.3.3-4" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-5">The nodes are listed in the order specified by a left-to-right in-order traversal of the ratchet tree. Each node is listed between its left subtree and its right subtree. (This is the same ordering as specified for the array-based trees outlined in <a href="#array-based-trees" class="auto internal xref">Appendix C</a>.)<a href="#section-12.4.3.3-5" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-6">If the tree has 2<sup>d</sup> leaves, then it has 2<sup>d+1</sup> - 1 nodes. The <code>ratchet_tree</code> vector logically has this number of entries, but the sender <span class="bcp14">MUST NOT</span> include blank nodes after the last non-blank node. The receiver <span class="bcp14">MUST</span> check that the last node in <code>ratchet_tree</code> is non-blank, and then extend the tree to the right until it has a length of the form 2<sup>d+1</sup> - 1, adding the minimum number of blank values possible. (Obviously, this may be done "virtually", by synthesizing blank nodes when required, as opposed to actually changing the structure in memory.)<a href="#section-12.4.3.3-6" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-7">The leaves of the tree are stored in even-numbered entries in the array (the leaf with index <code>L</code> in array position <code>2*L</code>). The root node of the tree is at position 2<sup>d</sup> - 1 of the array. Intermediate parent nodes can be identified by performing the same calculation to the subarrays to the left and right of the root, following something like the following algorithm:<a href="#section-12.4.3.3-7" class="pilcrow">¶</a></p> <div class="lang-python sourcecode" id="section-12.4.3.3-8"> <pre> # Assuming a class Node that has left and right members def subtree_root(nodes): # If there is only one node in the array, return it if len(nodes) == 1: return Node(nodes[0]) # Otherwise, the length of the array MUST be odd if len(nodes) % 2 == 0: raise Exception("Malformed node array {}", len(nodes)) # Identify the root of the subtree d = 0 while (2**(d+1)) < len(nodes): d += 1 R = 2**d - 1 root = Node(nodes[R]) root.left = subtree_root(nodes[:R]) root.right = subtree_root(nodes[(R+1):]) return root </pre><a href="#section-12.4.3.3-8" class="pilcrow">¶</a> </div> <p id="section-12.4.3.3-9">(Note that this is the same ordering of nodes as in the array-based tree representation described in <a href="#array-based-trees" class="auto internal xref">Appendix C</a>. The algorithms in that section may be used to simplify decoding this extension into other representations.)<a href="#section-12.4.3.3-9" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-10">For example, the following tree with six non-blank leaves would be represented as an array of eleven elements, <code>[A, W, B, X, C, _, D, Y, E, Z, F]</code>. The above decoding procedure would identify the subtree roots as follows (using R to represent a subtree root):<a href="#section-12.4.3.3-10" class="pilcrow">¶</a></p> <span id="name-left-to-right-in-order-trav"></span><figure id="figure-28"> <div id="section-12.4.3.3-11.1"> <div class="alignLeft art-svg artwork" id="section-12.4.3.3-11.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="304" text-anchor="middle" version="1.1" viewBox="0 0 240 304" width="240"> <path d="M 56,112 L 56,128" fill="none" stroke="black"></path> <path d="M 120,48 L 120,64" fill="none" stroke="black"></path> <path d="M 184,104 L 184,128" fill="none" stroke="black"></path> <path d="M 72,64 L 168,64" fill="none" stroke="black"></path> <path d="M 40,128 L 72,128" fill="none" stroke="black"></path> <path d="M 168,128 L 200,128" fill="none" stroke="black"></path> <path d="M 8,256 L 104,256" fill="none" stroke="black"></path> <path d="M 136,256 L 232,256" fill="none" stroke="black"></path> <path d="M 8,272 L 40,272" fill="none" stroke="black"></path> <path d="M 72,272 L 104,272" fill="none" stroke="black"></path> <path d="M 136,272 L 168,272" fill="none" stroke="black"></path> <path d="M 200,272 L 232,272" fill="none" stroke="black"></path> <path d="M 72,128 L 80,144" fill="none" stroke="black"></path> <path d="M 92,168 L 96,176" fill="none" stroke="black"></path> <path d="M 168,64 L 176,80" fill="none" stroke="black"></path> <path d="M 200,128 L 208,144" fill="none" stroke="black"></path> <path d="M 220,168 L 224,176" fill="none" stroke="black"></path> <path d="M 32,144 L 40,128" fill="none" stroke="black"></path> <path d="M 64,80 L 72,64" fill="none" stroke="black"></path> <path d="M 80,176 L 84,168" fill="none" stroke="black"></path> <path d="M 160,144 L 168,128" fill="none" stroke="black"></path> <path d="M 208,176 L 212,168" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="240,272 228,266.4 228,277.6" transform="rotate(0,232,272)"></polygon> <polygon class="arrowhead" fill="black" points="240,256 228,250.4 228,261.6" transform="rotate(0,232,256)"></polygon> <polygon class="arrowhead" fill="black" points="208,272 196,266.4 196,277.6" transform="rotate(180,200,272)"></polygon> <polygon class="arrowhead" fill="black" points="176,272 164,266.4 164,277.6" transform="rotate(0,168,272)"></polygon> <polygon class="arrowhead" fill="black" points="144,272 132,266.4 132,277.6" transform="rotate(180,136,272)"></polygon> <polygon class="arrowhead" fill="black" points="144,256 132,250.4 132,261.6" transform="rotate(180,136,256)"></polygon> <polygon class="arrowhead" fill="black" points="112,272 100,266.4 100,277.6" transform="rotate(0,104,272)"></polygon> <polygon class="arrowhead" fill="black" points="112,256 100,250.4 100,261.6" transform="rotate(0,104,256)"></polygon> <polygon class="arrowhead" fill="black" points="80,272 68,266.4 68,277.6" transform="rotate(180,72,272)"></polygon> <polygon class="arrowhead" fill="black" points="48,272 36,266.4 36,277.6" transform="rotate(0,40,272)"></polygon> <polygon class="arrowhead" fill="black" points="16,272 4,266.4 4,277.6" transform="rotate(180,8,272)"></polygon> <polygon class="arrowhead" fill="black" points="16,256 4,250.4 4,261.6" transform="rotate(180,8,256)"></polygon> <g class="text"> <text x="120" y="36">Y</text> <text x="56" y="100">X</text> <text x="184" y="100">_</text> <text x="24" y="164">W</text> <text x="88" y="164">_</text> <text x="152" y="164">Z</text> <text x="216" y="164">_</text> <text x="16" y="180">/</text> <text x="32" y="180">\</text> <text x="144" y="180">/</text> <text x="160" y="180">\</text> <text x="8" y="196">A</text> <text x="40" y="196">B</text> <text x="72" y="196">C</text> <text x="104" y="196">D</text> <text x="136" y="196">E</text> <text x="168" y="196">F</text> <text x="200" y="196">_</text> <text x="232" y="196">_</text> <text x="168" y="228">1</text> <text x="8" y="244">0</text> <text x="24" y="244">1</text> <text x="40" y="244">2</text> <text x="56" y="244">3</text> <text x="72" y="244">4</text> <text x="88" y="244">5</text> <text x="104" y="244">6</text> <text x="120" y="244">7</text> <text x="136" y="244">8</text> <text x="152" y="244">9</text> <text x="168" y="244">0</text> <text x="120" y="260">R</text> <text x="56" y="276">R</text> <text x="184" y="276">R</text> <text x="8" y="292">-</text> <text x="24" y="292">R</text> <text x="40" y="292">-</text> <text x="72" y="292">-</text> <text x="88" y="292">R</text> <text x="104" y="292">-</text> <text x="136" y="292">-</text> <text x="152" y="292">R</text> <text x="168" y="292">-</text> <text x="200" y="292">-</text> <text x="216" y="292">R</text> <text x="232" y="292">-</text> </g> </svg><a href="#section-12.4.3.3-11.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-28" class="selfRef">Figure 28</a>: <a href="#name-left-to-right-in-order-trav" class="selfRef">Left-to-Right In-Order Traversal of a Six-Member Tree</a> </figcaption></figure> <p id="section-12.4.3.3-12">The presence of a <code>ratchet_tree</code> extension in a GroupInfo message does not result in any changes to the GroupContext extensions for the group. The ratchet tree provided is simply stored by the client and used for MLS operations.<a href="#section-12.4.3.3-12" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-13">If this extension is not provided in a Welcome message, then the client will need to fetch the ratchet tree over some other channel before it can generate or process Commit messages. Applications should ensure that this out-of-band channel is provided with security protections equivalent to the protections that are afforded to Proposal and Commit messages. For example, an application that encrypts Proposal and Commit messages might distribute ratchet trees encrypted using a key exchanged over the MLS channel.<a href="#section-12.4.3.3-13" class="pilcrow">¶</a></p> <p id="section-12.4.3.3-14">Regardless of how the client obtains the tree, the client <span class="bcp14">MUST</span> verify that the root hash of the ratchet tree matches the <code>tree_hash</code> of the GroupContext before using the tree for MLS operations.<a href="#section-12.4.3.3-14" class="pilcrow">¶</a></p> </section> </div> </section> </div> </section> </div> </section> </div> <div id="extensibility"> <section id="section-13"> <h2 id="name-extensibility"> <a href="#section-13" class="section-number selfRef">13. </a><a href="#name-extensibility" class="section-name selfRef">Extensibility</a> </h2> <p id="section-13-1">The base MLS protocol can be extended in a few ways. New cipher suites can be added to enable the use of new cryptographic algorithms. New types of proposals can be used to perform new actions within an epoch. Extension fields can be used to add additional information to the protocol. In this section, we discuss some constraints on these extensibility mechanisms that are necessary to ensure broad interoperability.<a href="#section-13-1" class="pilcrow">¶</a></p> <div id="additional-cipher-suites"> <section id="section-13.1"> <h3 id="name-additional-cipher-suites"> <a href="#section-13.1" class="section-number selfRef">13.1. </a><a href="#name-additional-cipher-suites" class="section-name selfRef">Additional Cipher Suites</a> </h3> <p id="section-13.1-1">As discussed in <a href="#cipher-suites" class="auto internal xref">Section 5.1</a>, MLS allows the participants in a group to negotiate the cryptographic algorithms used within the group. This extensibility is important for maintaining the security of the protocol over time <span>[<a href="#RFC7696" class="cite xref">RFC7696</a>]</span>. It also creates a risk of interoperability failure due to clients not supporting a common cipher suite.<a href="#section-13.1-1" class="pilcrow">¶</a></p> <p id="section-13.1-2">The cipher suite registry defined in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a> attempts to strike a balance on this point. On the one hand, the base policy for the registry is Specification Required, a fairly low bar designed to avoid the need for standards work in cases where different ciphers are needed for niche applications. On the other hand, there is a higher bar (Standards Action) for ciphers to set the Recommended field in the registry. This higher bar is there in part to ensure that the interoperability implications of new cipher suites are considered.<a href="#section-13.1-2" class="pilcrow">¶</a></p> <p id="section-13.1-3">MLS cipher suites are defined independent of MLS versions, so that in principle, the same cipher suite can be used across versions. Standards work defining new versions of MLS should consider whether it is desirable for the new version to be compatible with existing cipher suites, or whether the new version should rule out some cipher suites. For example, a new version could follow the example of HTTP/2, which restricted the set of allowed TLS ciphers (see <span><a href="https://www.rfc-editor.org/rfc/rfc9113#section-9.2.2" class="relref">Section 9.2.2</a> of [<a href="#RFC9113" class="cite xref">RFC9113</a>]</span>).<a href="#section-13.1-3" class="pilcrow">¶</a></p> </section> </div> <div id="proposals-1"> <section id="section-13.2"> <h3 id="name-proposals-2"> <a href="#section-13.2" class="section-number selfRef">13.2. </a><a href="#name-proposals-2" class="section-name selfRef">Proposals</a> </h3> <p id="section-13.2-1">Commit messages do not have an extension field because the set of proposals is extensible. As discussed in <a href="#commit" class="auto internal xref">Section 12.4</a>, Proposals with a non-default proposal type <span class="bcp14">MUST NOT</span> be included in a commit unless the proposal type is supported by all the members of the group that will process the Commit.<a href="#section-13.2-1" class="pilcrow">¶</a></p> </section> </div> <div id="credential-extensibility"> <section id="section-13.3"> <h3 id="name-credential-extensibility"> <a href="#section-13.3" class="section-number selfRef">13.3. </a><a href="#name-credential-extensibility" class="section-name selfRef">Credential Extensibility</a> </h3> <p id="section-13.3-1">In order to ensure that MLS provides meaningful authentication, it is important that each member is able to authenticate some identity information for each other member. Identity information is encoded in Credentials, so this property is provided by ensuring that members use compatible credential types.<a href="#section-13.3-1" class="pilcrow">¶</a></p> <p id="section-13.3-2">The only types of credential that may be used in a group are those that all members of the group support, as specified by the <code>capabilities</code> field of each LeafNode in the ratchet tree. An application can introduce new credential types by choosing an unallocated identifier from the registry in <a href="#mls-credential-types" class="auto internal xref">Section 17.5</a> and indicating support for the credential type in published LeafNodes, whether in Update proposals to existing groups or KeyPackages that are added to new groups. Once all members in a group indicate support for the credential type, members can start using LeafNodes with the new credential. Application may enforce that certain credential types always remain supported by adding a <code>required_capabilities</code> extension to the group's GroupContext, which would prevent any member from being added to the group that doesn't support them.<a href="#section-13.3-2" class="pilcrow">¶</a></p> <p id="section-13.3-3">In future extensions to MLS, it may be useful to allow a member to present more than one credential. For example, such credentials might present different attributes attested by different authorities. To be consistent with the general principle stated at the beginning of this section, such an extension would need to ensure that each member can authenticate some identity for each other member. For each pair of members (Alice, Bob), Alice would need to present at least one credential of a type that Bob supports.<a href="#section-13.3-3" class="pilcrow">¶</a></p> </section> </div> <div id="extensions"> <section id="section-13.4"> <h3 id="name-extensions"> <a href="#section-13.4" class="section-number selfRef">13.4. </a><a href="#name-extensions" class="section-name selfRef">Extensions</a> </h3> <p id="section-13.4-1">This protocol includes a mechanism for negotiating extension parameters similar to the one in TLS <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span>. In TLS, extension negotiation is one-to-one: The client offers extensions in its ClientHello message, and the server expresses its choices for the session with extensions in its ServerHello and EncryptedExtensions messages. In MLS, extensions appear in the following places:<a href="#section-13.4-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-13.4-2.1">In KeyPackages, to describe additional information related to the client<a href="#section-13.4-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-2.2">In LeafNodes, to describe additional information about the client or its participation in the group (once in the ratchet tree)<a href="#section-13.4-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-2.3">In the GroupInfo, to tell new members of a group what parameters are being used by the group, and to provide any additional details required to join the group<a href="#section-13.4-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-2.4">In the GroupContext object, to ensure that all members of the group have the same view of the parameters in use<a href="#section-13.4-2.4" class="pilcrow">¶</a> </li> </ul> <p id="section-13.4-3">In other words, an application can use GroupContext extensions to ensure that all members of the group agree on a set of parameters. Clients indicate their support for parameters in the <code>capabilities</code> field of their LeafNode. New members of a group are informed of the group's GroupContext extensions via the <code>extensions</code> field in the <code>group_context</code> field of the GroupInfo object. The <code>extensions</code> field in a GroupInfo object (outside of the <code>group_context</code> field) can be used to provide additional parameters to new joiners that are used to join the group.<a href="#section-13.4-3" class="pilcrow">¶</a></p> <p id="section-13.4-4">This extension mechanism is designed to allow for the secure and forward-compatible negotiation of extensions. For this to work, implementations <span class="bcp14">MUST</span> correctly handle extensible fields:<a href="#section-13.4-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-13.4-5.1">A client that posts a KeyPackage <span class="bcp14">MUST</span> support all parameters advertised in it. Otherwise, another client might fail to interoperate by selecting one of those parameters.<a href="#section-13.4-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-5.2">A client processing a KeyPackage object <span class="bcp14">MUST</span> ignore all unrecognized values in the <code>capabilities</code> field of the LeafNode and all unknown extensions in the <code>extensions</code> and <code>leaf_node.extensions</code> fields. Otherwise, it could fail to interoperate with newer clients.<a href="#section-13.4-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-5.3">A client processing a GroupInfo object <span class="bcp14">MUST</span> ignore all unrecognized extensions in the <code>extensions</code> field.<a href="#section-13.4-5.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-5.4">Any field containing a list of extensions <span class="bcp14">MUST NOT</span> have more than one extension of any given type.<a href="#section-13.4-5.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-5.5">A client adding a new member to a group <span class="bcp14">MUST</span> verify that the LeafNode for the new member is compatible with the group's extensions. The <code>capabilities</code> field <span class="bcp14">MUST</span> indicate support for each extension in the GroupContext.<a href="#section-13.4-5.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.4-5.6">A client joining a group <span class="bcp14">MUST</span> verify that it supports every extension in the GroupContext for the group. Otherwise, it <span class="bcp14">MUST</span> treat the enclosing GroupInfo message as invalid and not join the group.<a href="#section-13.4-5.6" class="pilcrow">¶</a> </li> </ul> <p id="section-13.4-6">Note that the latter two requirements mean that all MLS GroupContext extensions are mandatory, in the sense that an extension in use by the group <span class="bcp14">MUST</span> be supported by all members of the group.<a href="#section-13.4-6" class="pilcrow">¶</a></p> <p id="section-13.4-7">The parameters of a group may be changed by sending a GroupContextExtensions proposal to enable additional extensions (<a href="#groupcontextextensions" class="auto internal xref">Section 12.1.7</a>), or by reinitializing the group (<a href="#reinitialization" class="auto internal xref">Section 11.2</a>).<a href="#section-13.4-7" class="pilcrow">¶</a></p> </section> </div> <div id="grease"> <section id="section-13.5"> <h3 id="name-grease"> <a href="#section-13.5" class="section-number selfRef">13.5. </a><a href="#name-grease" class="section-name selfRef">GREASE</a> </h3> <p id="section-13.5-1">As described in <a href="#extensions" class="auto internal xref">Section 13.4</a>, clients are required to ignore unknown values for certain parameters. To help ensure that other clients implement this behavior, a client can follow the "Generate Random Extensions And Sustain Extensibility" or GREASE approach described in <span>[<a href="#RFC8701" class="cite xref">RFC8701</a>]</span>. In the context of MLS, this means that a client generating a KeyPackage, LeafNode, or GroupInfo object includes random values in certain fields which would be ignored by a correctly implemented client processing the message. A client that incorrectly rejects unknown code points will fail to process such a message, providing a signal to its implementer that the client needs to be fixed.<a href="#section-13.5-1" class="pilcrow">¶</a></p> <p id="section-13.5-2">When generating the following fields, an MLS client <span class="bcp14">SHOULD</span> include a random selection of values chosen from these GREASE values:<a href="#section-13.5-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-13.5-3.1"> <code>LeafNode.capabilities.cipher_suites</code><a href="#section-13.5-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.2"> <code>LeafNode.capabilities.extensions</code><a href="#section-13.5-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.3"> <code>LeafNode.capabilities.proposals</code><a href="#section-13.5-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.4"> <code>LeafNode.capabilities.credentials</code><a href="#section-13.5-3.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.5"> <code>LeafNode.extensions</code><a href="#section-13.5-3.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.6"> <code>KeyPackage.extensions</code><a href="#section-13.5-3.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-3.7"> <code>GroupInfo.extensions</code><a href="#section-13.5-3.7" class="pilcrow">¶</a> </li> </ul> <p id="section-13.5-4">For the KeyPackage and GroupInfo extensions, the <code>extension_data</code> for GREASE extensions <span class="bcp14">MAY</span> have any contents selected by the sender, since they will be ignored by a correctly implemented receiver. For example, a sender might populate these extensions with a randomly sized amount of random data.<a href="#section-13.5-4" class="pilcrow">¶</a></p> <p id="section-13.5-5">Note that any GREASE values added to <code>LeafNode.extensions</code> need to be reflected in <code>LeafNode.capabilities.extensions</code>, since the LeafNode validation process described in <a href="#leaf-node-validation" class="auto internal xref">Section 7.3</a> requires that these two fields be consistent.<a href="#section-13.5-5" class="pilcrow">¶</a></p> <p id="section-13.5-6">GREASE values <span class="bcp14">MUST NOT</span> be sent in the following fields, because an unsupported value in one these fields (including a GREASE value) will cause the enclosing message to be rejected:<a href="#section-13.5-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-13.5-7.1"> <code>Proposal.proposal_type</code><a href="#section-13.5-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-7.2"> <code>Credential.credential_type</code><a href="#section-13.5-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-7.3"> <code>GroupContext.extensions</code><a href="#section-13.5-7.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-13.5-7.4"> <code>GroupContextExtensions.extensions</code><a href="#section-13.5-7.4" class="pilcrow">¶</a> </li> </ul> <p id="section-13.5-8">Values reserved for GREASE have been registered in the various registries in <a href="#iana-considerations" class="auto internal xref">Section 17</a>. This prevents conflict between GREASE and real future values. The following values are reserved in each registry: <code>0x0A0A</code>, <code>0x1A1A</code>, <code>0x2A2A</code>, <code>0x3A3A</code>, <code>0x4A4A</code>, <code>0x5A5A</code>, <code>0x6A6A</code>, <code>0x7A7A</code>, <code>0x8A8A</code>, <code>0x9A9A</code>, <code>0xAAAA</code>, <code>0xBABA</code>, <code>0xCACA</code>, <code>0xDADA</code>, and <code>0xEAEA</code>. (The value <code>0xFAFA</code> falls within the private use range.) These values <span class="bcp14">MUST</span> only appear in the fields listed above, and not, for example, in the <code>proposal_type</code> field of a Proposal. Clients <span class="bcp14">MUST NOT</span> implement any special processing rules for how to handle these values when receiving them, since this negates their utility for detecting extensibility failures.<a href="#section-13.5-8" class="pilcrow">¶</a></p> <p id="section-13.5-9">GREASE values <span class="bcp14">MUST</span> be handled using normal logic for processing unsupported values. When comparing lists of capabilities to identify mutually supported capabilities, clients <span class="bcp14">MUST</span> represent their own capabilities with a list containing only the capabilities actually supported, without any GREASE values. In other words, lists including GREASE values are only sent to other clients; representations of a client's own capabilities <span class="bcp14">MUST NOT</span> contain GREASE values.<a href="#section-13.5-9" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="sequencing"> <section id="section-14"> <h2 id="name-sequencing-of-state-changes"> <a href="#section-14" class="section-number selfRef">14. </a><a href="#name-sequencing-of-state-changes" class="section-name selfRef">Sequencing of State Changes</a> </h2> <p id="section-14-1">Each Commit message is premised on a given starting state, indicated by the <code>epoch</code> field of the enclosing FramedContent. If the changes implied by a Commit message are made starting from a different state, the results will be incorrect.<a href="#section-14-1" class="pilcrow">¶</a></p> <p id="section-14-2">This need for sequencing is not a problem as long as each time a group member sends a Commit message, it is based on the most current state of the group. In practice, however, there is a risk that two members will generate Commit messages simultaneously based on the same state.<a href="#section-14-2" class="pilcrow">¶</a></p> <p id="section-14-3">Applications <span class="bcp14">MUST</span> have an established way to resolve conflicting Commit messages for the same epoch. They can do this either by preventing conflicting messages from occurring in the first place, or by developing rules for deciding which Commit out of several sent in an epoch will be canonical. The approach chosen <span class="bcp14">MUST</span> minimize the amount of time that forked or previous group states are kept in memory, and promptly delete them once they're no longer necessary to ensure forward secrecy.<a href="#section-14-3" class="pilcrow">¶</a></p> <p id="section-14-4">The generation of Commit messages <span class="bcp14">MUST NOT</span> modify a client's state, since the client doesn't know at that time whether the changes implied by the Commit message will conflict with another Commit or not. Similarly, the Welcome message corresponding to a Commit <span class="bcp14">MUST NOT</span> be delivered to a new joiner until it's clear that the Commit has been accepted.<a href="#section-14-4" class="pilcrow">¶</a></p> <p id="section-14-5">Regardless of how messages are kept in sequence, there is a risk that in a sufficiently busy group, a given member may never be able to send a Commit message because they always lose to other members. The degree to which this is a practical problem will depend on the dynamics of the application.<a href="#section-14-5" class="pilcrow">¶</a></p> </section> </div> <div id="application-messages"> <section id="section-15"> <h2 id="name-application-messages"> <a href="#section-15" class="section-number selfRef">15. </a><a href="#name-application-messages" class="section-name selfRef">Application Messages</a> </h2> <p id="section-15-1">The primary purpose of handshake messages is to provide an authenticated group key exchange to clients. In order to protect application messages sent among the members of a group, the <code>encryption_secret</code> provided by the key schedule is used to derive a sequence of nonces and keys for message encryption. Every epoch moves the key schedule forward, which triggers the creation of a new secret tree, as described in <a href="#secret-tree" class="auto internal xref">Section 9</a>, along with a new set of symmetric ratchets of nonces and keys for each member.<a href="#section-15-1" class="pilcrow">¶</a></p> <p id="section-15-2">Each client maintains their own local copy of the key schedule for each epoch during which they are a group member. They derive new keys, nonces, and secrets as needed while deleting old ones as soon as they have been used.<a href="#section-15-2" class="pilcrow">¶</a></p> <p id="section-15-3">The group identifier and epoch allow a recipient to know which group secrets should be used and from which <code>epoch_secret</code> to start computing other secrets. The sender identifier and content type are used to identify which symmetric ratchet to use from the secret tree. The <code>generation</code> counter determines how far into the ratchet to iterate in order to produce the required nonce and key for encryption or decryption.<a href="#section-15-3" class="pilcrow">¶</a></p> <div id="padding"> <section id="section-15.1"> <h3 id="name-padding"> <a href="#section-15.1" class="section-number selfRef">15.1. </a><a href="#name-padding" class="section-name selfRef">Padding</a> </h3> <p id="section-15.1-1">Application messages <span class="bcp14">MAY</span> be padded to provide some resistance against traffic analysis techniques over encrypted traffic <span>[<a href="#CLINIC" class="cite xref">CLINIC</a>]</span> <span>[<a href="#HCJ16" class="cite xref">HCJ16</a>]</span>. While MLS might deliver the same payload less frequently across a lot of ciphertexts than traditional web servers, it might still provide the attacker enough information to mount an attack. If Alice asks Bob "When are we going to the movie?", then the answer "Wednesday" could be leaked to an adversary solely by the ciphertext length.<a href="#section-15.1-1" class="pilcrow">¶</a></p> <p id="section-15.1-2">The length of the <code>padding</code> field in PrivateMessageContent can be chosen by the sender at the time of message encryption. Senders may use padding to reduce the ability of attackers outside the group to infer the size of the encrypted content. Note, however, that the transports used to carry MLS messages may have maximum message sizes, so padding schemes <span class="bcp14">SHOULD</span> avoid increasing message size beyond any such limits that exist in a given deployment scenario.<a href="#section-15.1-2" class="pilcrow">¶</a></p> </section> </div> <div id="restrictions"> <section id="section-15.2"> <h3 id="name-restrictions"> <a href="#section-15.2" class="section-number selfRef">15.2. </a><a href="#name-restrictions" class="section-name selfRef">Restrictions</a> </h3> <p id="section-15.2-1">During each epoch, senders <span class="bcp14">MUST NOT</span> encrypt more data than permitted by the security bounds of the AEAD scheme used <span>[<a href="#I-D.irtf-cfrg-aead-limits" class="cite xref">CFRG-AEAD-LIMITS</a>]</span>.<a href="#section-15.2-1" class="pilcrow">¶</a></p> <p id="section-15.2-2">Note that each change to the group through a handshake message will also set a new <code>encryption_secret</code>. Hence this change <span class="bcp14">MUST</span> be applied before encrypting any new application message. This is required both to ensure that any users removed from the group can no longer receive messages and to (potentially) recover confidentiality and authenticity for future messages despite a past state compromise.<a href="#section-15.2-2" class="pilcrow">¶</a></p> </section> </div> <div id="delayed-and-reordered-application-messages"> <section id="section-15.3"> <h3 id="name-delayed-and-reordered-appli"> <a href="#section-15.3" class="section-number selfRef">15.3. </a><a href="#name-delayed-and-reordered-appli" class="section-name selfRef">Delayed and Reordered Application Messages</a> </h3> <p id="section-15.3-1">Since each application message contains the group identifier, the epoch, and a generation counter, a client can receive messages out of order. When messages are received out of order, the client moves the sender ratchet forward to match the received generation counter. Any unused nonce and key pairs from the ratchet are potentially stored so that they can be used to decrypt the messages that were delayed or reordered.<a href="#section-15.3-1" class="pilcrow">¶</a></p> <p id="section-15.3-2">Applications <span class="bcp14">SHOULD</span> define a policy on how long to keep unused nonce and key pairs for a sender, and the maximum number to keep. This is in addition to ensuring that these secrets are deleted according to the deletion schedule defined in <a href="#deletion-schedule" class="auto internal xref">Section 9.2</a>. Applications <span class="bcp14">SHOULD</span> also define a policy limiting the maximum number of steps that clients will move the ratchet forward in response to a new message. Messages received with a generation counter that is too much higher than the last message received would then be rejected. This avoids causing a denial-of-service attack by requiring the recipient to perform an excessive number of key derivations. For example, a malicious group member could send a message with <code>generation = 0xffffffff</code> at the beginning of a new epoch, forcing recipients to perform billions of key derivations unless they apply limits of the type discussed above.<a href="#section-15.3-2" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="security-considerations"> <section id="section-16"> <h2 id="name-security-considerations"> <a href="#section-16" class="section-number selfRef">16. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a> </h2> <p id="section-16-1">The security goals of MLS are described in <span>[<a href="#I-D.ietf-mls-architecture" class="cite xref">MLS-ARCH</a>]</span>. We describe here how the protocol achieves its goals at a high level, though a complete security analysis is outside of the scope of this document. The Security Considerations section of <span>[<a href="#I-D.ietf-mls-architecture" class="cite xref">MLS-ARCH</a>]</span> provides some citations to detailed security analyses.<a href="#section-16-1" class="pilcrow">¶</a></p> <div id="transport-security"> <section id="section-16.1"> <h3 id="name-transport-security"> <a href="#section-16.1" class="section-number selfRef">16.1. </a><a href="#name-transport-security" class="section-name selfRef">Transport Security</a> </h3> <p id="section-16.1-1">Because MLS messages are protected at the message level, the confidentiality and integrity of the group state do not depend on those messages being protected in transit. However, an attacker who can observe those messages in transit will be able to learn about the group state, including potentially the group membership (see <a href="#group-membership" class="auto internal xref">Section 16.4.3</a> below). Such an attacker might also be able to mount denial-of-service attacks on the group or exclude new members by selectively removing messages in transit. In order to prevent this form of attack, it is <span class="bcp14">RECOMMENDED</span> that all MLS messages be carried over a secure transport such as TLS <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span> or QUIC <span>[<a href="#RFC9000" class="cite xref">RFC9000</a>]</span>.<a href="#section-16.1-1" class="pilcrow">¶</a></p> </section> </div> <div id="confidentiality-of-group-secrets"> <section id="section-16.2"> <h3 id="name-confidentiality-of-group-se"> <a href="#section-16.2" class="section-number selfRef">16.2. </a><a href="#name-confidentiality-of-group-se" class="section-name selfRef">Confidentiality of Group Secrets</a> </h3> <p id="section-16.2-1">Group secrets are partly derived from the output of a ratchet tree. Ratchet trees work by assigning each member of the group to a leaf in the tree and maintaining the following property: the private key of a node in the tree is known only to members of the group that are assigned a leaf in the node's subtree. This is called the <em>tree invariant</em>, and it makes it possible to encrypt to all group members except one, with a number of ciphertexts that is logarithmic in the number of group members.<a href="#section-16.2-1" class="pilcrow">¶</a></p> <p id="section-16.2-2">The ability to efficiently encrypt to all members except one allows members to be securely removed from a group. It also allows a member to rotate their key pair such that the old private key can no longer be used to decrypt new messages.<a href="#section-16.2-2" class="pilcrow">¶</a></p> </section> </div> <div id="confidentiality-of-sender-data"> <section id="section-16.3"> <h3 id="name-confidentiality-of-sender-d"> <a href="#section-16.3" class="section-number selfRef">16.3. </a><a href="#name-confidentiality-of-sender-d" class="section-name selfRef">Confidentiality of Sender Data</a> </h3> <p id="section-16.3-1">The PrivateMessage framing encrypts "sender data" that identifies which group member sent an encrypted message, as described in <a href="#sender-data-encryption" class="auto internal xref">Section 6.3.2</a>. As with the QUIC header protection scheme <span>[<a href="#RFC9001" class="cite xref">RFC9001</a>], <a href="https://www.rfc-editor.org/rfc/rfc9001#section-5.4" class="relref">Section 5.4</a></span>, this scheme is a variant of the HN1 construction analyzed in <span>[<a href="#NAN" class="cite xref">NAN</a>]</span>. A sample of the ciphertext is combined with a <code>sender_data_secret</code> to derive a key and nonce that are used for AEAD encryption of the sender data.<a href="#section-16.3-1" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-16.3-2"> <pre> (key, nonce) = PRF(sender_data_secret, sample) encrypted_sender_data = AEAD.Seal(key, nonce, sender_data_aad, sender_data) </pre><a href="#section-16.3-2" class="pilcrow">¶</a> </div> <p id="section-16.3-3">The only differences between this construction and HN1 as described in <span>[<a href="#NAN" class="cite xref">NAN</a>]</span> are that it (1) uses authenticated encryption instead of unauthenticated encryption and (2) protects information used to derive a nonce instead of the nonce itself.<a href="#section-16.3-3" class="pilcrow">¶</a></p> <p id="section-16.3-4">Since the <code>sender_data_secret</code> is distinct from the content encryption key, it follows that the sender data encryption scheme achieves AE2 security as defined in <span>[<a href="#NAN" class="cite xref">NAN</a>]</span>, and therefore guarantees the confidentiality of the sender data.<a href="#section-16.3-4" class="pilcrow">¶</a></p> <p id="section-16.3-5">Use of the same <code>sender_data_secret</code> and ciphertext sample more than once risks compromising sender data protection by reusing an AEAD (key, nonce) pair. For example, in many AEAD schemes, reusing a key and nonce reveals the exclusive OR of the two plaintexts. Assuming the ciphertext output of the AEAD algorithm is indistinguishable from random data (i.e., the AEAD is AE1-secure in the phrasing of <span>[<a href="#NAN" class="cite xref">NAN</a>]</span>), the odds of two ciphertext samples being identical is roughly 2<sup>-L/2</sup>, i.e., the birthday bound.<a href="#section-16.3-5" class="pilcrow">¶</a></p> <p id="section-16.3-6">The AEAD algorithms for cipher suites defined in this document all provide this property. The size of the sample depends on the cipher suite's hash function, but in all cases, the probability of collision is no more than 2<sup>-128</sup>. Any future cipher suite <span class="bcp14">MUST</span> use an AE1-secure AEAD algorithm.<a href="#section-16.3-6" class="pilcrow">¶</a></p> </section> </div> <div id="confidentiality-of-group-metadata"> <section id="section-16.4"> <h3 id="name-confidentiality-of-group-me"> <a href="#section-16.4" class="section-number selfRef">16.4. </a><a href="#name-confidentiality-of-group-me" class="section-name selfRef">Confidentiality of Group Metadata</a> </h3> <p id="section-16.4-1">MLS does not provide confidentiality protection to some messages and fields within messages:<a href="#section-16.4-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-16.4-2.1">KeyPackage messages<a href="#section-16.4-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-2.2">GroupInfo messages<a href="#section-16.4-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-2.3">The unencrypted portion of a Welcome message<a href="#section-16.4-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-2.4">Any Proposal or Commit messages sent as PublicMessage messages<a href="#section-16.4-2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-2.5">The unencrypted header fields in PrivateMessage messages<a href="#section-16.4-2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-2.6">The lengths of encrypted Welcome and PrivateMessage messages<a href="#section-16.4-2.6" class="pilcrow">¶</a> </li> </ul> <p id="section-16.4-3">The only mechanism MLS provides for confidentially distributing a group's ratchet tree to new members is to send it in a Welcome message as a <code>ratchet_tree</code> extension. If an application distributes the tree in some other way, its security will depend on that application mechanism.<a href="#section-16.4-3" class="pilcrow">¶</a></p> <p id="section-16.4-4">A party observing these fields might be able to infer certain properties of the group:<a href="#section-16.4-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-16.4-5.1">Group ID<a href="#section-16.4-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-5.2">Current epoch and frequency of epoch changes<a href="#section-16.4-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-5.3">Frequency of messages within an epoch<a href="#section-16.4-5.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-5.4">Group extensions<a href="#section-16.4-5.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-5.5">Group membership<a href="#section-16.4-5.5" class="pilcrow">¶</a> </li> </ul> <p id="section-16.4-6">The amount of metadata exposed to parties outside the group, and thus the ability of these parties to infer the group's properties, depends on several aspects of the DS design, such as:<a href="#section-16.4-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-16.4-7.1">How KeyPackages are distributed<a href="#section-16.4-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-7.2">How the ratchet tree is distributed<a href="#section-16.4-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-7.3">How prospective external joiners get a GroupInfo object for the group<a href="#section-16.4-7.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-16.4-7.4">Whether Proposal and Commit messages are sent as PublicMessage or PrivateMessage<a href="#section-16.4-7.4" class="pilcrow">¶</a> </li> </ul> <p id="section-16.4-8">In the remainder of this section, we note the ways that the above properties of the group are reflected in unprotected group messages, as a guide to understanding how they might be exposed or protected in a given application.<a href="#section-16.4-8" class="pilcrow">¶</a></p> <div id="groupid-epoch-and-message-frequency"> <section id="section-16.4.1"> <h4 id="name-groupid-epoch-and-message-f"> <a href="#section-16.4.1" class="section-number selfRef">16.4.1. </a><a href="#name-groupid-epoch-and-message-f" class="section-name selfRef">GroupID, Epoch, and Message Frequency</a> </h4> <p id="section-16.4.1-1">MLS provides no mechanism to protect the group ID and epoch of a message from the DS, so the group ID and the frequency of messages and epoch changes are not protected against inspection by the DS. However, any modifications to these will cause decryption failure.<a href="#section-16.4.1-1" class="pilcrow">¶</a></p> </section> </div> <div id="group-extensions"> <section id="section-16.4.2"> <h4 id="name-group-extensions"> <a href="#section-16.4.2" class="section-number selfRef">16.4.2. </a><a href="#name-group-extensions" class="section-name selfRef">Group Extensions</a> </h4> <p id="section-16.4.2-1">A group's extensions are first set by the group's creator and then updated by GroupContextExtensions proposals. A GroupContextExtensions proposal sent as a PublicMessage leaks the group's extensions.<a href="#section-16.4.2-1" class="pilcrow">¶</a></p> <p id="section-16.4.2-2">A new member learns the group's extensions via a GroupInfo object. When the new member joins via a Welcome message, the Welcome message's encryption protects the GroupInfo message. When the new member joins via an external join, they must be provided with a GroupInfo object. Protection of this GroupInfo object is up to the application -- if it is transmitted over a channel that is not confidential to the group and the new joiner, then it will leak the group's extensions.<a href="#section-16.4.2-2" class="pilcrow">¶</a></p> </section> </div> <div id="group-membership"> <section id="section-16.4.3"> <h4 id="name-group-membership"> <a href="#section-16.4.3" class="section-number selfRef">16.4.3. </a><a href="#name-group-membership" class="section-name selfRef">Group Membership</a> </h4> <p id="section-16.4.3-1">The group's membership is represented directly by its ratchet tree, since each member's LeafNode contains members' cryptographic keys, a credential that contains information about the member's identity, and possibly other identifiers. Applications that expose the group's ratchet tree outside the group also leak the group's membership.<a href="#section-16.4.3-1" class="pilcrow">¶</a></p> <p id="section-16.4.3-2">Changes to the group's membership are made by means of Add and Remove proposals. If these proposals are sent as PublicMessage, then information will be leaked about the corresponding changes to the group's membership. A party that sees all of these changes can reconstruct the group membership.<a href="#section-16.4.3-2" class="pilcrow">¶</a></p> <p id="section-16.4.3-3">Welcome messages contain a hash of each KeyPackage for which the Welcome message is encrypted. If a party has access to a pool of KeyPackages and observes a Welcome message, then they can identify the KeyPackage representing the new member. If the party can also associate the Welcome with a group, then the party can infer that the identified new member was added to that group.<a href="#section-16.4.3-3" class="pilcrow">¶</a></p> <p id="section-16.4.3-4">Note that these information leaks reveal the group's membership only to the degree that membership is revealed by the contents of a member's LeafNode in the ratchet tree. In some cases, this may be quite direct, e.g., due to credentials attesting to identifiers such as email addresses. An application could construct a member's leaf node to be less identifying, e.g., by using a pseudonymous credential and frequently rotating encryption and signature keys.<a href="#section-16.4.3-4" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="authentication"> <section id="section-16.5"> <h3 id="name-authentication"> <a href="#section-16.5" class="section-number selfRef">16.5. </a><a href="#name-authentication" class="section-name selfRef">Authentication</a> </h3> <p id="section-16.5-1">The first form of authentication we provide is that group members can verify a message originated from one of the members of the group. For encrypted messages, this is guaranteed because messages are encrypted with an AEAD under a key derived from the group secrets. For plaintext messages, this is guaranteed by the use of a <code>membership_tag</code>, which constitutes a MAC over the message, under a key derived from the group secrets.<a href="#section-16.5-1" class="pilcrow">¶</a></p> <p id="section-16.5-2">The second form of authentication is that group members can verify a message originated from a particular member of the group. This is guaranteed by a digital signature on each message from the sender's signature key.<a href="#section-16.5-2" class="pilcrow">¶</a></p> <p id="section-16.5-3">The signature keys held by group members are critical to the security of MLS against active attacks. If a member's signature key is compromised, then an attacker can create LeafNodes and KeyPackages impersonating the member; depending on the application, this can then allow the attacker to join the group with the compromised member's identity. For example, if a group has enabled external parties to join via external commits, then an attacker that has compromised a member's signature key could use an external Commit to insert themselves into the group -- even using a "resync"-style external Commit to replace the compromised member in the group.<a href="#section-16.5-3" class="pilcrow">¶</a></p> <p id="section-16.5-4">Applications can mitigate the risks of signature key compromise using pre-shared keys. If a group requires joiners to know a PSK in addition to authenticating with a credential, then in order to mount an impersonation attack, the attacker would need to compromise the relevant PSK as well as the victim's signature key. The cost of this mitigation is that the application needs some external arrangement that ensures that the legitimate members of the group have the required PSKs.<a href="#section-16.5-4" class="pilcrow">¶</a></p> </section> </div> <div id="forward-secrecy-and-post-compromise-security"> <section id="section-16.6"> <h3 id="name-forward-secrecy-and-post-co"> <a href="#section-16.6" class="section-number selfRef">16.6. </a><a href="#name-forward-secrecy-and-post-co" class="section-name selfRef">Forward Secrecy and Post-Compromise Security</a> </h3> <p id="section-16.6-1">Forward secrecy and post-compromise security are important security notions for long-lived MLS groups. Forward secrecy means that messages sent at a certain point in time are secure in the face of later compromise of a group member. Post-compromise security means that messages are secure even if a group member was compromised at some point in the past.<a href="#section-16.6-1" class="pilcrow">¶</a></p> <span id="name-forward-secrecy-and-post-com"></span><figure id="figure-29"> <div id="section-16.6-2.1"> <div class="alignLeft art-svg artwork" id="section-16.6-2.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="176" text-anchor="middle" version="1.1" viewBox="0 0 448 176" width="448"> <path d="M 152,80 L 152,160" fill="none" stroke="black"></path> <path d="M 192,48 L 192,88" fill="none" stroke="black"></path> <path d="M 232,80 L 232,160" fill="none" stroke="black"></path> <path d="M 8,96 L 144,96" fill="none" stroke="black"></path> <path d="M 160,96 L 224,96" fill="none" stroke="black"></path> <path d="M 240,96 L 440,96" fill="none" stroke="black"></path> <path d="M 8,128 L 144,128" fill="none" stroke="black"></path> <path d="M 240,128 L 368,128" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="448,96 436,90.4 436,101.6" transform="rotate(0,440,96)"></polygon> <polygon class="arrowhead" fill="black" points="376,128 364,122.4 364,133.6" transform="rotate(0,368,128)"></polygon> <polygon class="arrowhead" fill="black" points="200,88 188,82.4 188,93.6" transform="rotate(90,192,88)"></polygon> <polygon class="arrowhead" fill="black" points="16,128 4,122.4 4,133.6" transform="rotate(180,8,128)"></polygon> <g class="text"> <text x="196" y="36">Compromise</text> <text x="420" y="116">Time</text> <text x="48" y="148">Forward</text> <text x="112" y="148">Secrecy</text> <text x="304" y="148">Post-Compromise</text> <text x="292" y="164">Security</text> </g> </svg><a href="#section-16.6-2.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-29" class="selfRef">Figure 29</a>: <a href="#name-forward-secrecy-and-post-com" class="selfRef">Forward Secrecy and Post-Compromise Security</a> </figcaption></figure> <p id="section-16.6-3">Post-compromise security is provided between epochs by members regularly updating their leaf key in the ratchet tree. Updating their leaf key prevents group secrets from continuing to be encrypted to public keys whose private keys had previously been compromised. Note that sending an Update proposal does not achieve PCS until another member includes it in a Commit. Members can achieve immediate PCS by sending their own Commit and populating the <code>path</code> field, as described in <a href="#commit" class="auto internal xref">Section 12.4</a>. To be clear, in all these cases, the PCS guarantees come into effect when the members of the group process the relevant Commit, not when the sender creates it.<a href="#section-16.6-3" class="pilcrow">¶</a></p> <p id="section-16.6-4">Forward secrecy between epochs is provided by deleting private keys from past versions of the ratchet tree, as this prevents old group secrets from being re-derived. Forward secrecy <em>within</em> an epoch is provided by deleting message encryption keys once they've been used to encrypt or decrypt a message. Note that group secrets and message encryption keys are shared by the group. There is thus a risk to forward secrecy as long as any member has not deleted these keys. This is a particular risk if a member is offline for a long period of time. Applications <span class="bcp14">SHOULD</span> have mechanisms for evicting group members that are offline for too long (i.e., have not changed their key within some period).<a href="#section-16.6-4" class="pilcrow">¶</a></p> <p id="section-16.6-5">New groups are also at risk of using previously compromised keys (as with post-compromise security) if a member is added to a new group via an old KeyPackage whose corresponding private key has been compromised. This risk can be mitigated by having clients regularly generate new KeyPackages and upload them to the Delivery Service. This way, the key material used to add a member to a new group is more likely to be fresh and less likely to be compromised.<a href="#section-16.6-5" class="pilcrow">¶</a></p> </section> </div> <div id="uniqueness-of-ratchet-tree-key-pairs"> <section id="section-16.7"> <h3 id="name-uniqueness-of-ratchet-tree-"> <a href="#section-16.7" class="section-number selfRef">16.7. </a><a href="#name-uniqueness-of-ratchet-tree-" class="section-name selfRef">Uniqueness of Ratchet Tree Key Pairs</a> </h3> <p id="section-16.7-1">The encryption and signature keys stored in the <code>encryption_key</code> and <code>signature_key</code> fields of ratchet tree nodes <span class="bcp14">MUST</span> be distinct from one another. If two members' leaf nodes have the same signature key, for example, then the data origin authentication properties afforded by signatures within the group are degraded.<a href="#section-16.7-1" class="pilcrow">¶</a></p> <p id="section-16.7-2">Uniqueness of keys in leaf nodes is assured by explicitly checking each leaf node as it is added to the tree, whether in an Add proposal, in an Update proposal, or in the <code>path</code> field of a Commit. Details can be found in Sections <a href="#leaf-node-validation" class="auto internal xref">7.3</a>, <a href="#proposal-list-validation" class="auto internal xref">12.2</a>, and <a href="#processing-a-commit" class="auto internal xref">12.4.2</a>. Uniqueness of encryption keys in parent nodes is assured by checking that the keys in an UpdatePath are not found elsewhere in the tree (see <a href="#processing-a-commit" class="auto internal xref">Section 12.4.2</a>).<a href="#section-16.7-2" class="pilcrow">¶</a></p> </section> </div> <div id="keypackage-reuse"> <section id="section-16.8"> <h3 id="name-keypackage-reuse"> <a href="#section-16.8" class="section-number selfRef">16.8. </a><a href="#name-keypackage-reuse" class="section-name selfRef">KeyPackage Reuse</a> </h3> <p id="section-16.8-1">KeyPackages are intended to be used only once. That is, once a KeyPackage has been used to introduce the corresponding client to a group, it <span class="bcp14">SHOULD</span> be deleted from the KeyPackage publication system. Reuse of KeyPackages can lead to replay attacks.<a href="#section-16.8-1" class="pilcrow">¶</a></p> <p id="section-16.8-2">An application <span class="bcp14">MAY</span> allow for reuse of a "last resort" KeyPackage in order to prevent denial-of-service attacks. Since a KeyPackage is needed to add a client to a new group, an attacker could prevent a client from being added to new groups by exhausting all available KeyPackages. To prevent such a denial-of-service attack, the KeyPackage publication system <span class="bcp14">SHOULD</span> rate-limit KeyPackage requests, especially if not authenticated.<a href="#section-16.8-2" class="pilcrow">¶</a></p> </section> </div> <div id="delivery-service-compromise"> <section id="section-16.9"> <h3 id="name-delivery-service-compromise"> <a href="#section-16.9" class="section-number selfRef">16.9. </a><a href="#name-delivery-service-compromise" class="section-name selfRef">Delivery Service Compromise</a> </h3> <p id="section-16.9-1">MLS is designed to protect the confidentiality and integrity of the group data even in the face of a compromised DS. However, a compromised DS can still mount some attacks. While it cannot forge messages, it can selectively delay or remove them. In some cases, this can be observed by detecting gaps in the per-sender generation counter, though it may not always be possible to distinguish an attack from message loss. In addition, the DS can permanently block messages to and from a group member. This will not always be detectable by other members. If an application uses the DS to resolve conflicts between simultaneous Commits (see <a href="#sequencing" class="auto internal xref">Section 14</a>), it is also possible for the DS to influence which Commit is applied, even to the point of preventing a member from ever having its Commits applied.<a href="#section-16.9-1" class="pilcrow">¶</a></p> <p id="section-16.9-2">When put together, these abilities potentially allow a DS to collude with an attacker who has compromised a member's state to defeat PCS by suppressing the valid Update and Commit messages from the member that would lock out the attacker and update the member's leaf to a new, uncompromised state. Aside from the SenderData.generation value, MLS leaves loss detection up to the application.<a href="#section-16.9-2" class="pilcrow">¶</a></p> </section> </div> <div id="authentication-service-compromise"> <section id="section-16.10"> <h3 id="name-authentication-service-comp"> <a href="#section-16.10" class="section-number selfRef">16.10. </a><a href="#name-authentication-service-comp" class="section-name selfRef">Authentication Service Compromise</a> </h3> <p id="section-16.10-1">Authentication Service compromise is much more serious than compromise of the Delivery Service. A compromised AS can assert a binding for a signature key and identity pair of its choice, thus allowing impersonation of a given user. This ability is sufficient to allow the AS to join new groups as if it were that user. Depending on the application architecture, it may also be sufficient to allow the compromised AS to join the group as an existing user, for instance, as if it were a new device associated with the same user. If the application uses a transparency mechanism such as CONIKS <span>[<a href="#CONIKS" class="cite xref">CONIKS</a>]</span> or Key Transparency <span>[<a href="#KT" class="cite xref">KT</a>]</span>, then it may be possible for end users to detect this kind of misbehavior by the AS. It is also possible to construct schemes in which the various clients owned by a user vouch for each other, e.g., by signing each others' keys.<a href="#section-16.10-1" class="pilcrow">¶</a></p> </section> </div> <div id="additional-policy-enforcement"> <section id="section-16.11"> <h3 id="name-additional-policy-enforceme"> <a href="#section-16.11" class="section-number selfRef">16.11. </a><a href="#name-additional-policy-enforceme" class="section-name selfRef">Additional Policy Enforcement</a> </h3> <p id="section-16.11-1">The DS and AS may also apply additional policies to MLS operations to obtain additional security properties. For example, MLS enables any participant to add or remove members of a group; a DS could enforce a policy that only certain members are allowed to perform these operations. MLS authenticates all members of a group; a DS could help ensure that only clients with certain types of credentials are admitted. MLS provides no inherent protection against denial of service; a DS could also enforce rate limits in order to mitigate these risks.<a href="#section-16.11-1" class="pilcrow">¶</a></p> </section> </div> <div id="group-fragmentation-by-malicious-insiders"> <section id="section-16.12"> <h3 id="name-group-fragmentation-by-mali"> <a href="#section-16.12" class="section-number selfRef">16.12. </a><a href="#name-group-fragmentation-by-mali" class="section-name selfRef">Group Fragmentation by Malicious Insiders</a> </h3> <p id="section-16.12-1">It is possible for a malicious member of a group to "fragment" the group by crafting an invalid UpdatePath. Recall that an UpdatePath encrypts a sequence of path secrets to different subtrees of the group's ratchet trees. These path secrets should be derived in a sequence as described in <a href="#ratchet-tree-evolution" class="auto internal xref">Section 7.4</a>, but the UpdatePath syntax allows the sender to encrypt arbitrary, unrelated secrets. The syntax also does not guarantee that the encrypted path secret for a given node corresponds to the public key provided for that node.<a href="#section-16.12-1" class="pilcrow">¶</a></p> <p id="section-16.12-2">Both of these types of corruption will cause processing of a Commit to fail for some members of the group. If the public key for a node does not match the path secret, then the members that decrypt that path secret will reject the Commit based on this mismatch. If the path secret sequence is incorrect at some point, then members that can decrypt nodes before that point will compute a different public key for the mismatched node than the one in the UpdatePath, which also causes the Commit to fail. Applications <span class="bcp14">SHOULD</span> provide mechanisms for failed commits to be reported, so that group members who were not able to recognize the error themselves can reinitialize the group if necessary.<a href="#section-16.12-2" class="pilcrow">¶</a></p> <p id="section-16.12-3">Even with such an error reporting mechanism in place, however, it is still possible for members to get locked out of the group by a malformed Commit. Since malformed Commits can only be recognized by certain members of the group, in an asynchronous application, it may be the case that all members that could detect a fault in a Commit are offline. In such a case, the Commit will be accepted by the group, and the resulting state will possibly be used as the basis for further Commits. When the affected members come back online, they will reject the first Commit, and thus be unable to catch up with the group. These members will need to either add themselves back with an external Commit or reinitialize the group from scratch.<a href="#section-16.12-3" class="pilcrow">¶</a></p> <p id="section-16.12-4">Applications can address this risk by requiring certain members of the group to acknowledge successful processing of a Commit before the group regards the Commit as accepted. The minimum set of acknowledgements necessary to verify that a Commit is well-formed comprises an acknowledgement from one member per node in the UpdatePath, that is, one member from each subtree rooted in the copath node corresponding to the node in the UpdatePath. MLS does not provide a built-in mechanism for such acknowledgements, but they can be added at the application layer.<a href="#section-16.12-4" class="pilcrow">¶</a></p> </section> </div> </section> </div> <div id="iana-considerations"> <section id="section-17"> <h2 id="name-iana-considerations"> <a href="#section-17" class="section-number selfRef">17. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a> </h2> <p id="section-17-1">IANA has created the following registries:<a href="#section-17-1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17-2.1">MLS Cipher Suites (<a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a>)<a href="#section-17-2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.2">MLS Wire Formats (<a href="#mls-wire-formats" class="auto internal xref">Section 17.2</a>)<a href="#section-17-2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.3">MLS Extension Types (<a href="#mls-extension-types" class="auto internal xref">Section 17.3</a>)<a href="#section-17-2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.4">MLS Proposal Types (<a href="#mls-proposal-types" class="auto internal xref">Section 17.4</a>)<a href="#section-17-2.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.5">MLS Credential Types (<a href="#mls-credential-types" class="auto internal xref">Section 17.5</a>)<a href="#section-17-2.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.6">MLS Signature Labels (<a href="#mls-signature-labels" class="auto internal xref">Section 17.6</a>)<a href="#section-17-2.6" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.7">MLS Public Key Encryption Labels (<a href="#mls-public-key-encryption-labels" class="auto internal xref">Section 17.7</a>)<a href="#section-17-2.7" class="pilcrow">¶</a> </li> <li class="normal" id="section-17-2.8">MLS Exporter Labels (<a href="#mls-exporter-labels" class="auto internal xref">Section 17.8</a>)<a href="#section-17-2.8" class="pilcrow">¶</a> </li> </ul> <p id="section-17-3">All of these registries are under the "Messaging Layer Security" group registry heading, and assignments are made via the Specification Required policy <span>[<a href="#RFC8126" class="cite xref">RFC8126</a>]</span>. See <a href="#de" class="auto internal xref">Section 17.9</a> for additional information about the MLS Designated Experts (DEs).<a href="#section-17-3" class="pilcrow">¶</a></p> <div id="mls-cipher-suites"> <section id="section-17.1"> <h3 id="name-mls-cipher-suites"> <a href="#section-17.1" class="section-number selfRef">17.1. </a><a href="#name-mls-cipher-suites" class="section-name selfRef">MLS Cipher Suites</a> </h3> <p id="section-17.1-1">A cipher suite is a combination of a protocol version and the set of cryptographic algorithms that should be used.<a href="#section-17.1-1" class="pilcrow">¶</a></p> <p id="section-17.1-2">Cipher suite names follow the naming convention:<a href="#section-17.1-2" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="section-17.1-3"> <pre> CipherSuite MLS_LVL_KEM_AEAD_HASH_SIG = VALUE; </pre><a href="#section-17.1-3" class="pilcrow">¶</a> </div> <p id="section-17.1-4">Where VALUE is represented as a 16-bit integer:<a href="#section-17.1-4" class="pilcrow">¶</a></p> <div class="lang-tls-presentation sourcecode" id="section-17.1-5"> <pre> uint16 CipherSuite; </pre><a href="#section-17.1-5" class="pilcrow">¶</a> </div> <table class="center" id="table-5"> <caption><a href="#table-5" class="selfRef">Table 5</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Component</th> <th class="text-left" rowspan="1" colspan="1">Contents</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">LVL</td> <td class="text-left" rowspan="1" colspan="1">The security level (in bits)</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">KEM</td> <td class="text-left" rowspan="1" colspan="1">The KEM algorithm used for HPKE in ratchet tree operations</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">AEAD</td> <td class="text-left" rowspan="1" colspan="1">The AEAD algorithm used for HPKE and message protection</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">HASH</td> <td class="text-left" rowspan="1" colspan="1">The hash algorithm used for HPKE and the MLS transcript hash</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">SIG</td> <td class="text-left" rowspan="1" colspan="1">The signature algorithm used for message authentication</td> </tr> </tbody> </table> <p id="section-17.1-7">The columns in the registry are as follows:<a href="#section-17.1-7" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.1-8.1">Value: The numeric value of the cipher suite<a href="#section-17.1-8.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.1-8.2">Name: The name of the cipher suite<a href="#section-17.1-8.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.1-8.3"> <p id="section-17.1-8.3.1">Recommended: Whether support for this cipher suite is recommended by the IETF. Valid values are "Y", "N", and "D", as described below. The default value of the "Recommended" column is "N". Setting the Recommended item to "Y" or "D", or changing an item whose current value is "Y" or "D", requires Standards Action <span>[<a href="#RFC8126" class="cite xref">RFC8126</a>]</span>.<a href="#section-17.1-8.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.1-8.3.2.1">Y: Indicates that the IETF has consensus that the item is <span class="bcp14">RECOMMENDED</span>. This only means that the associated mechanism is fit for the purpose for which it was defined. Careful reading of the documentation for the mechanism is necessary to understand the applicability of that mechanism. The IETF could recommend mechanisms that have limited applicability, but it will provide applicability statements that describe any limitations of the mechanism or necessary constraints on its use.<a href="#section-17.1-8.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.1-8.3.2.2">N: Indicates that the item has not been evaluated by the IETF and that the IETF has made no statement about the suitability of the associated mechanism. This does not necessarily mean that the mechanism is flawed, only that no consensus exists. The IETF might have consensus to leave an item marked as "N" on the basis of it having limited applicability or usage constraints.<a href="#section-17.1-8.3.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.1-8.3.2.3">D: Indicates that the item is discouraged and <span class="bcp14">SHOULD NOT</span> or <span class="bcp14">MUST NOT</span> be used. This marking could be used to identify mechanisms that might result in problems if they are used, such as a weak cryptographic algorithm or a mechanism that might cause interoperability problems in deployment.<a href="#section-17.1-8.3.2.3" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-17.1-8.4">Reference: The document where this cipher suite is defined<a href="#section-17.1-8.4" class="pilcrow">¶</a> </li> </ul> <p id="section-17.1-9">Initial contents:<a href="#section-17.1-9" class="pilcrow">¶</a></p> <span id="name-mls-extension-types-registr"></span><table class="center" id="table-6"> <caption> <a href="#table-6" class="selfRef">Table 6</a>: <a href="#name-mls-extension-types-registr" class="selfRef">MLS Extension Types Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">Name</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0000</td> <td class="text-left" rowspan="1" colspan="1">RESERVED</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">MLS_128_DHKEMP256_AES128GCM_SHA256_P256</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0004</td> <td class="text-left" rowspan="1" colspan="1">MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0005</td> <td class="text-left" rowspan="1" colspan="1">MLS_256_DHKEMP521_AES256GCM_SHA512_P521</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0006</td> <td class="text-left" rowspan="1" colspan="1">MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0007</td> <td class="text-left" rowspan="1" colspan="1">MLS_256_DHKEMP384_AES256GCM_SHA384_P384</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0A0A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x1A1A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x2A2A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x3A3A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x4A4A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x5A5A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x6A6A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x7A7A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x8A8A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x9A9A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xAAAA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xBABA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xCACA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xDADA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xEAEA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xF000 - 0xFFFF</td> <td class="text-left" rowspan="1" colspan="1">Reserved for Private Use</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> <p id="section-17.1-11">All of the non-GREASE cipher suites use HMAC <span>[<a href="#RFC2104" class="cite xref">RFC2104</a>]</span> as their MAC function, with different hashes per cipher suite. The mapping of cipher suites to HPKE primitives <span>[<a href="#RFC9180" class="cite xref">RFC9180</a>]</span>, HMAC hash functions, and TLS signature schemes <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span> is as follows:<a href="#section-17.1-11" class="pilcrow">¶</a></p> <table class="center" id="table-7"> <caption><a href="#table-7" class="selfRef">Table 7</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">KEM</th> <th class="text-left" rowspan="1" colspan="1">KDF</th> <th class="text-left" rowspan="1" colspan="1">AEAD</th> <th class="text-left" rowspan="1" colspan="1">Hash</th> <th class="text-left" rowspan="1" colspan="1">Signature</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">0x0020</td> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">SHA256</td> <td class="text-left" rowspan="1" colspan="1">ed25519</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">0x0010</td> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">SHA256</td> <td class="text-left" rowspan="1" colspan="1">ecdsa_secp256r1_sha256</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">0x0020</td> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">SHA256</td> <td class="text-left" rowspan="1" colspan="1">ed25519</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0004</td> <td class="text-left" rowspan="1" colspan="1">0x0021</td> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">SHA512</td> <td class="text-left" rowspan="1" colspan="1">ed448</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0005</td> <td class="text-left" rowspan="1" colspan="1">0x0012</td> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">SHA512</td> <td class="text-left" rowspan="1" colspan="1">ecdsa_secp521r1_sha512</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0006</td> <td class="text-left" rowspan="1" colspan="1">0x0021</td> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">SHA512</td> <td class="text-left" rowspan="1" colspan="1">ed448</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0007</td> <td class="text-left" rowspan="1" colspan="1">0x0011</td> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">SHA384</td> <td class="text-left" rowspan="1" colspan="1">ecdsa_secp384r1_sha384</td> </tr> </tbody> </table> <p id="section-17.1-13">The hash used for the MLS transcript hash is the one referenced in the cipher suite name. In the cipher suites defined above, "SHA256", "SHA384", and "SHA512" refer, respectively, to the SHA-256, SHA-384, and SHA-512 functions defined in <span>[<a href="#SHS" class="cite xref">SHS</a>]</span>.<a href="#section-17.1-13" class="pilcrow">¶</a></p> <p id="section-17.1-14">In addition to the general requirements of <a href="#additional-cipher-suites" class="auto internal xref">Section 13.1</a>, future cipher suites <span class="bcp14">MUST</span> meet the requirements of <a href="#confidentiality-of-sender-data" class="auto internal xref">Section 16.3</a>.<a href="#section-17.1-14" class="pilcrow">¶</a></p> <p id="section-17.1-15">It is advisable to keep the number of cipher suites low to increase the likelihood that clients can interoperate in a federated environment. The cipher suites therefore include only modern, yet well-established algorithms. Depending on their requirements, clients can choose between two security levels (roughly 128-bit and 256-bit). Within the security levels, clients can choose between faster X25519/X448 curves and curves compliant with FIPS 140-2 for Diffie-Hellman key negotiations. Clients may also choose ChaCha20Poly1305 or AES-GCM, e.g., for performance reasons. Since ChaCha20Poly1305 is not listed by FIPS 140-2, it is not paired with curves compliant with FIPS 140-2. The security level of symmetric encryption algorithms and hash functions is paired with the security level of the curves.<a href="#section-17.1-15" class="pilcrow">¶</a></p> <p id="section-17.1-16">The mandatory-to-implement cipher suite for MLS 1.0 is <code>MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519</code>, which uses Curve25519 for key exchange, AES-128-GCM for HPKE, HKDF over SHA2-256, and Ed25519 for signatures. MLS clients <span class="bcp14">MUST</span> implement this cipher suite.<a href="#section-17.1-16" class="pilcrow">¶</a></p> </section> </div> <div id="mls-wire-formats"> <section id="section-17.2"> <h3 id="name-mls-wire-formats"> <a href="#section-17.2" class="section-number selfRef">17.2. </a><a href="#name-mls-wire-formats" class="section-name selfRef">MLS Wire Formats</a> </h3> <p id="section-17.2-1">The "MLS Wire Formats" registry lists identifiers for the types of messages that can be sent in MLS. The wire format field is two bytes wide, so the valid wire format values are in the range 0x0000 to 0xFFFF.<a href="#section-17.2-1" class="pilcrow">¶</a></p> <p id="section-17.2-2">Template:<a href="#section-17.2-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.2-3.1">Value: The numeric value of the wire format<a href="#section-17.2-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.2-3.2">Name: The name of the wire format<a href="#section-17.2-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.2-3.3">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.2-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.2-3.4">Reference: The document where this wire format is defined<a href="#section-17.2-3.4" class="pilcrow">¶</a> </li> </ul> <p id="section-17.2-4">Initial contents:<a href="#section-17.2-4" class="pilcrow">¶</a></p> <span id="name-mls-wire-formats-registry"></span><table class="center" id="table-8"> <caption> <a href="#table-8" class="selfRef">Table 8</a>: <a href="#name-mls-wire-formats-registry" class="selfRef">MLS Wire Formats Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">Name</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0000</td> <td class="text-left" rowspan="1" colspan="1">RESERVED</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">mls_public_message</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">mls_private_message</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">mls_welcome</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0004</td> <td class="text-left" rowspan="1" colspan="1">mls_group_info</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0005</td> <td class="text-left" rowspan="1" colspan="1">mls_key_package</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xF000 - 0xFFFF</td> <td class="text-left" rowspan="1" colspan="1">Reserved for Private Use</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-extension-types"> <section id="section-17.3"> <h3 id="name-mls-extension-types"> <a href="#section-17.3" class="section-number selfRef">17.3. </a><a href="#name-mls-extension-types" class="section-name selfRef">MLS Extension Types</a> </h3> <p id="section-17.3-1">The "MLS Extension Types" registry lists identifiers for extensions to the MLS protocol. The extension type field is two bytes wide, so valid extension type values are in the range 0x0000 to 0xFFFF.<a href="#section-17.3-1" class="pilcrow">¶</a></p> <p id="section-17.3-2">Template:<a href="#section-17.3-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.3-3.1">Value: The numeric value of the extension type<a href="#section-17.3-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.2">Name: The name of the extension type<a href="#section-17.3-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.3"> <p id="section-17.3-3.3.1">Message(s): The messages in which the extension may appear, drawn from the following list:<a href="#section-17.3-3.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.3-3.3.2.1">KP: KeyPackage objects<a href="#section-17.3-3.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.3.2.2">LN: LeafNode objects<a href="#section-17.3-3.3.2.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.3.2.3">GC: GroupContext objects<a href="#section-17.3-3.3.2.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.3.2.4">GI: GroupInfo objects<a href="#section-17.3-3.3.2.4" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="section-17.3-3.4">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.3-3.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.3-3.5">Reference: The document where this extension is defined<a href="#section-17.3-3.5" class="pilcrow">¶</a> </li> </ul> <p id="section-17.3-4">Initial contents:<a href="#section-17.3-4" class="pilcrow">¶</a></p> <span id="name-mls-extension-types-registry"></span><table class="center" id="table-9"> <caption> <a href="#table-9" class="selfRef">Table 9</a>: <a href="#name-mls-extension-types-registry" class="selfRef">MLS Extension Types Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">Name</th> <th class="text-left" rowspan="1" colspan="1">Message(s)</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0000</td> <td class="text-left" rowspan="1" colspan="1">RESERVED</td> <td class="text-left" rowspan="1" colspan="1">N/A</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">application_id</td> <td class="text-left" rowspan="1" colspan="1">LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">ratchet_tree</td> <td class="text-left" rowspan="1" colspan="1">GI</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">required_capabilities</td> <td class="text-left" rowspan="1" colspan="1">GC</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0004</td> <td class="text-left" rowspan="1" colspan="1">external_pub</td> <td class="text-left" rowspan="1" colspan="1">GI</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0005</td> <td class="text-left" rowspan="1" colspan="1">external_senders</td> <td class="text-left" rowspan="1" colspan="1">GC</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0A0A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x1A1A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x2A2A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x3A3A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x4A4A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x5A5A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x6A6A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x7A7A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x8A8A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x9A9A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xAAAA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xBABA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xCACA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xDADA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xEAEA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">KP, GI, LN</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xF000 - 0xFFFF</td> <td class="text-left" rowspan="1" colspan="1">Reserved for Private Use</td> <td class="text-left" rowspan="1" colspan="1">N/A</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-proposal-types"> <section id="section-17.4"> <h3 id="name-mls-proposal-types"> <a href="#section-17.4" class="section-number selfRef">17.4. </a><a href="#name-mls-proposal-types" class="section-name selfRef">MLS Proposal Types</a> </h3> <p id="section-17.4-1">The "MLS Proposal Types" registry lists identifiers for types of proposals that can be made for changes to an MLS group. The extension type field is two bytes wide, so valid extension type values are in the range 0x0000 to 0xFFFF.<a href="#section-17.4-1" class="pilcrow">¶</a></p> <p id="section-17.4-2">Template:<a href="#section-17.4-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.4-3.1">Value: The numeric value of the proposal type<a href="#section-17.4-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.4-3.2">Name: The name of the proposal type<a href="#section-17.4-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.4-3.3">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.4-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.4-3.4">External: Whether a proposal of this type may be sent by an <code>external</code> sender (see <a href="#external-proposals" class="auto internal xref">Section 12.1.8</a>)<a href="#section-17.4-3.4" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.4-3.5">Path Required: Whether a Commit covering a proposal of this type is required to have its <code>path</code> field populated (see <a href="#commit" class="auto internal xref">Section 12.4</a>)<a href="#section-17.4-3.5" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.4-3.6">Reference: The document where this extension is defined<a href="#section-17.4-3.6" class="pilcrow">¶</a> </li> </ul> <p id="section-17.4-4">Initial contents:<a href="#section-17.4-4" class="pilcrow">¶</a></p> <span id="name-mls-proposal-types-registry"></span><table class="center" id="table-10"> <caption> <a href="#table-10" class="selfRef">Table 10</a>: <a href="#name-mls-proposal-types-registry" class="selfRef">MLS Proposal Types Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">Name</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ext</th> <th class="text-left" rowspan="1" colspan="1">Path</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0000</td> <td class="text-left" rowspan="1" colspan="1">RESERVED</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">add</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">N</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">update</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">N</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0003</td> <td class="text-left" rowspan="1" colspan="1">remove</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0004</td> <td class="text-left" rowspan="1" colspan="1">psk</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">N</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0005</td> <td class="text-left" rowspan="1" colspan="1">reinit</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">N</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0006</td> <td class="text-left" rowspan="1" colspan="1">external_init</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">N</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0007</td> <td class="text-left" rowspan="1" colspan="1">group_context_extensions</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0A0A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x1A1A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x2A2A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x3A3A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x4A4A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x5A5A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x6A6A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x7A7A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x8A8A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x9A9A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xAAAA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xBABA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xCACA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xDADA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xEAEA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xF000 - 0xFFFF</td> <td class="text-left" rowspan="1" colspan="1">Reserved for Private Use</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-credential-types"> <section id="section-17.5"> <h3 id="name-mls-credential-types"> <a href="#section-17.5" class="section-number selfRef">17.5. </a><a href="#name-mls-credential-types" class="section-name selfRef">MLS Credential Types</a> </h3> <p id="section-17.5-1">The "MLS Credential Types" registry lists identifiers for types of credentials that can be used for authentication in the MLS protocol. The credential type field is two bytes wide, so valid credential type values are in the range 0x0000 to 0xFFFF.<a href="#section-17.5-1" class="pilcrow">¶</a></p> <p id="section-17.5-2">Template:<a href="#section-17.5-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.5-3.1">Value: The numeric value of the credential type<a href="#section-17.5-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.5-3.2">Name: The name of the credential type<a href="#section-17.5-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.5-3.3">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.5-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.5-3.4">Reference: The document where this credential is defined<a href="#section-17.5-3.4" class="pilcrow">¶</a> </li> </ul> <p id="section-17.5-4">Initial contents:<a href="#section-17.5-4" class="pilcrow">¶</a></p> <span id="name-mls-credential-types-regist"></span><table class="center" id="table-11"> <caption> <a href="#table-11" class="selfRef">Table 11</a>: <a href="#name-mls-credential-types-regist" class="selfRef">MLS Credential Types Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Value</th> <th class="text-left" rowspan="1" colspan="1">Name</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">0x0000</td> <td class="text-left" rowspan="1" colspan="1">RESERVED</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0001</td> <td class="text-left" rowspan="1" colspan="1">basic</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0002</td> <td class="text-left" rowspan="1" colspan="1">x509</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x0A0A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x1A1A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x2A2A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x3A3A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x4A4A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x5A5A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x6A6A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x7A7A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x8A8A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0x9A9A</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xAAAA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xBABA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xCACA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xDADA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xEAEA</td> <td class="text-left" rowspan="1" colspan="1">GREASE</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">0xF000 - 0xFFFF</td> <td class="text-left" rowspan="1" colspan="1">Reserved for Private Use</td> <td class="text-left" rowspan="1" colspan="1">-</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-signature-labels"> <section id="section-17.6"> <h3 id="name-mls-signature-labels"> <a href="#section-17.6" class="section-number selfRef">17.6. </a><a href="#name-mls-signature-labels" class="section-name selfRef">MLS Signature Labels</a> </h3> <p id="section-17.6-1">The <code>SignWithLabel</code> function defined in <a href="#signing" class="auto internal xref">Section 5.1.2</a> avoids the risk of confusion between signatures in different contexts. Each context is assigned a distinct label that is incorporated into the signature. The "MLS Signature Labels" registry records the labels defined in this document and allows additional labels to be registered in case extensions add other types of signatures using the same signature keys used elsewhere in MLS.<a href="#section-17.6-1" class="pilcrow">¶</a></p> <p id="section-17.6-2">Template:<a href="#section-17.6-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.6-3.1">Label: The string to be used as the <code>Label</code> parameter to <code>SignWithLabel</code><a href="#section-17.6-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.6-3.2">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.6-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.6-3.3">Reference: The document where this label is defined<a href="#section-17.6-3.3" class="pilcrow">¶</a> </li> </ul> <p id="section-17.6-4">Initial contents:<a href="#section-17.6-4" class="pilcrow">¶</a></p> <span id="name-mls-signature-labels-regist"></span><table class="center" id="table-12"> <caption> <a href="#table-12" class="selfRef">Table 12</a>: <a href="#name-mls-signature-labels-regist" class="selfRef">MLS Signature Labels Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Label</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">"FramedContentTBS"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"LeafNodeTBS"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"KeyPackageTBS"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"GroupInfoTBS"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-public-key-encryption-labels"> <section id="section-17.7"> <h3 id="name-mls-public-key-encryption-l"> <a href="#section-17.7" class="section-number selfRef">17.7. </a><a href="#name-mls-public-key-encryption-l" class="section-name selfRef">MLS Public Key Encryption Labels</a> </h3> <p id="section-17.7-1">The <code>EncryptWithLabel</code> function defined in <a href="#public-key-encryption" class="auto internal xref">Section 5.1.3</a> avoids the risk of confusion between ciphertexts produced for different purposes in different contexts. Each context is assigned a distinct label that is incorporated into the signature. The "MLS Public Key Encryption Labels" registry records the labels defined in this document and allows additional labels to be registered in case extensions add other types of public key encryption using the same HPKE keys used elsewhere in MLS.<a href="#section-17.7-1" class="pilcrow">¶</a></p> <p id="section-17.7-2">Template:<a href="#section-17.7-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.7-3.1">Label: The string to be used as the <code>Label</code> parameter to <code>EncryptWithLabel</code><a href="#section-17.7-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.7-3.2">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.7-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.7-3.3">Reference: The document where this label is defined<a href="#section-17.7-3.3" class="pilcrow">¶</a> </li> </ul> <p id="section-17.7-4">Initial contents:<a href="#section-17.7-4" class="pilcrow">¶</a></p> <span id="name-mls-public-key-encryption-la"></span><table class="center" id="table-13"> <caption> <a href="#table-13" class="selfRef">Table 13</a>: <a href="#name-mls-public-key-encryption-la" class="selfRef">MLS Public Key Encryption Labels Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Label</th> <th class="text-left" rowspan="1" colspan="1">R</th> <th class="text-left" rowspan="1" colspan="1">Ref</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">"UpdatePathNode"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">"Welcome"</td> <td class="text-left" rowspan="1" colspan="1">Y</td> <td class="text-left" rowspan="1" colspan="1">RFC 9420</td> </tr> </tbody> </table> </section> </div> <div id="mls-exporter-labels"> <section id="section-17.8"> <h3 id="name-mls-exporter-labels"> <a href="#section-17.8" class="section-number selfRef">17.8. </a><a href="#name-mls-exporter-labels" class="section-name selfRef">MLS Exporter Labels</a> </h3> <p id="section-17.8-1">The exporter function defined in <a href="#exporters" class="auto internal xref">Section 8.5</a> allows applications to derive key material from the MLS key schedule. Like the TLS exporter <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span>, the MLS exporter uses a label to distinguish between different applications' use of the exporter. The "MLS Exporter Labels" registry allows applications to register their usage to avoid collisions.<a href="#section-17.8-1" class="pilcrow">¶</a></p> <p id="section-17.8-2">Template:<a href="#section-17.8-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="section-17.8-3.1">Label: The string to be used as the <code>Label</code> parameter to <code>MLS-Exporter</code><a href="#section-17.8-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.8-3.2">Recommended: Same as in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a><a href="#section-17.8-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="section-17.8-3.3">Reference: The document where this label is defined<a href="#section-17.8-3.3" class="pilcrow">¶</a> </li> </ul> <p id="section-17.8-4">The registry has no initial contents, since it is intended to be used by applications, not the core protocol. The table below is intended only to show the column layout of the registry.<a href="#section-17.8-4" class="pilcrow">¶</a></p> <span id="name-mls-exporter-labels-registr"></span><table class="center" id="table-14"> <caption> <a href="#table-14" class="selfRef">Table 14</a>: <a href="#name-mls-exporter-labels-registr" class="selfRef">MLS Exporter Labels Registry</a> </caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Label</th> <th class="text-left" rowspan="1" colspan="1">Recommended</th> <th class="text-left" rowspan="1" colspan="1">Reference</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">(N/A)</td> <td class="text-left" rowspan="1" colspan="1">(N/A)</td> <td class="text-left" rowspan="1" colspan="1">(N/A)</td> </tr> </tbody> </table> </section> </div> <div id="de"> <section id="section-17.9"> <h3 id="name-mls-designated-expert-pool"> <a href="#section-17.9" class="section-number selfRef">17.9. </a><a href="#name-mls-designated-expert-pool" class="section-name selfRef">MLS Designated Expert Pool</a> </h3> <p id="section-17.9-1">Specification Required <span>[<a href="#RFC8126" class="cite xref">RFC8126</a>]</span> registry requests are registered after a three-week review period on the MLS Designated Expert (DE) mailing list <span><<a href="mailto:mls-reg-review@ietf.org">mailto:mls-reg-review@ietf.org</a>></span> on the advice of one or more of the MLS DEs. However, to allow for the allocation of values prior to publication, the MLS DEs may approve registration once they are satisfied that such a specification will be published.<a href="#section-17.9-1" class="pilcrow">¶</a></p> <p id="section-17.9-2">Registration requests sent to the MLS DEs' mailing list for review <span class="bcp14">SHOULD</span> use an appropriate subject (e.g., "Request to register value in MLS Bar registry").<a href="#section-17.9-2" class="pilcrow">¶</a></p> <p id="section-17.9-3">Within the review period, the MLS DEs will either approve or deny the registration request, communicating this decision to the MLS DEs' mailing list and IANA. Denials <span class="bcp14">SHOULD</span> include an explanation and, if applicable, suggestions as to how to make the request successful. Registration requests that are undetermined for a period longer than 21 days can be brought to the IESG's attention for resolution using the <span><<a href="mailto:iesg@ietf.org">mailto:iesg@ietf.org</a>></span> mailing list.<a href="#section-17.9-3" class="pilcrow">¶</a></p> <p id="section-17.9-4">Criteria that <span class="bcp14">SHOULD</span> be applied by the MLS DEs includes determining whether the proposed registration duplicates existing functionality, whether it is likely to be of general applicability or useful only for a single application, and whether the registration description is clear. For example, for cipher suite registrations, the MLS DEs will apply the advisory found in <a href="#mls-cipher-suites" class="auto internal xref">Section 17.1</a>.<a href="#section-17.9-4" class="pilcrow">¶</a></p> <p id="section-17.9-5">IANA <span class="bcp14">MUST</span> only accept registry updates from the MLS DEs and <span class="bcp14">SHOULD</span> direct all requests for registration to the MLS DEs' mailing list.<a href="#section-17.9-5" class="pilcrow">¶</a></p> <p id="section-17.9-6">It is suggested that multiple MLS DEs who are able to represent the perspectives of different applications using this specification be appointed, in order to enable a broadly informed review of registration decisions. In cases where a registration decision could be perceived as creating a conflict of interest for a particular MLS DE, that MLS DE <span class="bcp14">SHOULD</span> defer to the judgment of the other MLS DEs.<a href="#section-17.9-6" class="pilcrow">¶</a></p> </section> </div> <div id="the-messagemls-media-type"> <section id="section-17.10"> <h3 id="name-the-message-mls-media-type"> <a href="#section-17.10" class="section-number selfRef">17.10. </a><a href="#name-the-message-mls-media-type" class="section-name selfRef">The "message/mls" Media Type</a> </h3> <p id="section-17.10-1">This document registers the "message/mls" media type in the "message" registry in order to allow other protocols (e.g., HTTP <span>[<a href="#RFC9113" class="cite xref">RFC9113</a>]</span>) to convey MLS messages.<a href="#section-17.10-1" class="pilcrow">¶</a></p> <span class="break"></span><dl class="dlParallel" id="section-17.10-2"> <dt id="section-17.10-2.1">Type name:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.2">message<a href="#section-17.10-2.2" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.3">Subtype name:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.4">mls<a href="#section-17.10-2.4" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.5">Required parameters:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.6">none<a href="#section-17.10-2.6" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.7">Optional parameters:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.8"> <span class="break"></span><dl class="dlParallel" id="section-17.10-2.8.1"> <dt id="section-17.10-2.8.1.1">version</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.8.1.2"></dd> <dd class="break"></dd> <dt id="section-17.10-2.8.1.3"> version:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.8.1.4">The MLS protocol version expressed as a string <code><major>.<minor></code>. If omitted, the version is "1.0", which corresponds to MLS ProtocolVersion mls10. If for some reason the version number in the media type parameter differs from the ProtocolVersion embedded in the protocol, the protocol takes precedence.<a href="#section-17.10-2.8.1.4" class="pilcrow">¶</a> </dd> <dd class="break"></dd> </dl> </dd> <dd class="break"></dd> <dt id="section-17.10-2.9">Encoding considerations:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.10">MLS messages are represented using the TLS presentation language <span>[<a href="#RFC8446" class="cite xref">RFC8446</a>]</span>. Therefore, MLS messages need to be treated as binary data.<a href="#section-17.10-2.10" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.11">Security considerations:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.12">MLS is an encrypted messaging layer designed to be transmitted over arbitrary lower-layer protocols. The security considerations in this document (RFC 9420) also apply.<a href="#section-17.10-2.12" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.13">Interoperability considerations:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.14">N/A<a href="#section-17.10-2.14" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.15">Published specification:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.16">RFC 9420<a href="#section-17.10-2.16" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.17">Applications that use this media type:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.18">MLS-based messaging applications<a href="#section-17.10-2.18" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.19">Fragment identifier considerations:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.20">N/A<a href="#section-17.10-2.20" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.21">Additional information:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.22"> <p id="section-17.10-2.22.1"> <br><a href="#section-17.10-2.22.1" class="pilcrow">¶</a></p> <span class="break"></span><dl class="dlCompact dlParallel" id="section-17.10-2.22.2"> <dt id="section-17.10-2.22.2.1">Deprecated alias names for this type:</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.22.2.2">N/A<a href="#section-17.10-2.22.2.2" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.22.2.3">Magic number(s):</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.22.2.4">N/A<a href="#section-17.10-2.22.2.4" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.22.2.5">File extension(s):</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.22.2.6">N/A<a href="#section-17.10-2.22.2.6" class="pilcrow">¶</a> </dd> <dd class="break"></dd> <dt id="section-17.10-2.22.2.7">Macintosh file type code(s):</dt> <dd style="margin-left: 1.5em" id="section-17.10-2.22.2.8">N/A<a href="#section-17.10-2.22.2.8" class="pilcrow">¶</a> </dd> <dd class="break"></dd> </dl> </dd> <dd class="break"></dd> </dl> <span class="break"></span><dl class="dlParallel" id="section-17.10-3"> <dt id="section-17.10-3.1">Person & email address to contact for further information:</dt> <dd style="margin-left: 1.5em" id="section-17.10-3.2"> <p id="section-17.10-3.2.1">IETF MLS Working Group <span><<a href="mailto:mls@ietf.org">mailto:mls@ietf.org</a>></span><a href="#section-17.10-3.2.1" class="pilcrow">¶</a></p> </dd> <dd class="break"></dd> <dt id="section-17.10-3.3">Intended usage:</dt> <dd style="margin-left: 1.5em" id="section-17.10-3.4"> <p id="section-17.10-3.4.1">COMMON<a href="#section-17.10-3.4.1" class="pilcrow">¶</a></p> </dd> <dd class="break"></dd> <dt id="section-17.10-3.5">Restrictions on usage:</dt> <dd style="margin-left: 1.5em" id="section-17.10-3.6"> <p id="section-17.10-3.6.1">N/A<a href="#section-17.10-3.6.1" class="pilcrow">¶</a></p> </dd> <dd class="break"></dd> <dt id="section-17.10-3.7">Author:</dt> <dd style="margin-left: 1.5em" id="section-17.10-3.8"> <p id="section-17.10-3.8.1">IETF MLS Working Group<a href="#section-17.10-3.8.1" class="pilcrow">¶</a></p> </dd> <dd class="break"></dd> <dt id="section-17.10-3.9">Change controller:</dt> <dd style="margin-left: 1.5em" id="section-17.10-3.10"> <p id="section-17.10-3.10.1">IETF<a href="#section-17.10-3.10.1" class="pilcrow">¶</a></p> </dd> <dd class="break"></dd> </dl> </section> </div> </section> </div> <section id="section-18"> <h2 id="name-references"> <a href="#section-18" class="section-number selfRef">18. </a><a href="#name-references" class="section-name selfRef">References</a> </h2> <section id="section-18.1"> <h3 id="name-normative-references"> <a href="#section-18.1" class="section-number selfRef">18.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a> </h3> <dl class="references"> <dt id="RFC2104">[RFC2104]</dt> <dd> <span class="refAuthor">Krawczyk, H.</span>, <span class="refAuthor">Bellare, M.</span>, and <span class="refAuthor">R. Canetti</span>, <span class="refTitle">"HMAC: Keyed-Hashing for Message Authentication"</span>, <span class="seriesInfo">RFC 2104</span>, <span class="seriesInfo">DOI 10.17487/RFC2104</span>, <time datetime="1997-02" class="refDate">February 1997</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2104">https://www.rfc-editor.org/info/rfc2104</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC2119">[RFC2119]</dt> <dd> <span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC8126">[RFC8126]</dt> <dd> <span class="refAuthor">Cotton, M.</span>, <span class="refAuthor">Leiba, B.</span>, and <span class="refAuthor">T. Narten</span>, <span class="refTitle">"Guidelines for Writing an IANA Considerations Section in RFCs"</span>, <span class="seriesInfo">BCP 26</span>, <span class="seriesInfo">RFC 8126</span>, <span class="seriesInfo">DOI 10.17487/RFC8126</span>, <time datetime="2017-06" class="refDate">June 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8126">https://www.rfc-editor.org/info/rfc8126</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC8174">[RFC8174]</dt> <dd> <span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC8446">[RFC8446]</dt> <dd> <span class="refAuthor">Rescorla, E.</span>, <span class="refTitle">"The Transport Layer Security (TLS) Protocol Version 1.3"</span>, <span class="seriesInfo">RFC 8446</span>, <span class="seriesInfo">DOI 10.17487/RFC8446</span>, <time datetime="2018-08" class="refDate">August 2018</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8446">https://www.rfc-editor.org/info/rfc8446</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC9180">[RFC9180]</dt> <dd> <span class="refAuthor">Barnes, R.</span>, <span class="refAuthor">Bhargavan, K.</span>, <span class="refAuthor">Lipp, B.</span>, and <span class="refAuthor">C. Wood</span>, <span class="refTitle">"Hybrid Public Key Encryption"</span>, <span class="seriesInfo">RFC 9180</span>, <span class="seriesInfo">DOI 10.17487/RFC9180</span>, <time datetime="2022-02" class="refDate">February 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9180">https://www.rfc-editor.org/info/rfc9180</a>></span>. </dd> <dd class="break"></dd> </dl> </section> <section id="section-18.2"> <h3 id="name-informative-references"> <a href="#section-18.2" class="section-number selfRef">18.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a> </h3> <dl class="references"> <dt id="ART">[ART]</dt> <dd> <span class="refAuthor">Cohn-Gordon, K.</span>, <span class="refAuthor">Cremers, C.</span>, <span class="refAuthor">Garratt, L.</span>, <span class="refAuthor">Millican, J.</span>, and <span class="refAuthor">K. Milner</span>, <span class="refTitle">"On Ends-to-Ends Encryption: Asynchronous Group Messaging with Strong Security Guarantees"</span>, <span class="refContent">Version 2.3</span>, <span class="seriesInfo">DOI 10.1145/3243734.3243747</span>, <time datetime="2020-03" class="refDate">March 2020</time>, <span><<a href="https://eprint.iacr.org/2017/666.pdf">https://eprint.iacr.org/2017/666.pdf</a>></span>. </dd> <dd class="break"></dd> <dt id="I-D.irtf-cfrg-aead-limits">[CFRG-AEAD-LIMITS]</dt> <dd> <span class="refAuthor">Günther, F.</span>, <span class="refAuthor">Thomson, M.</span>, and <span class="refAuthor">C. A. Wood</span>, <span class="refTitle">"Usage Limits on AEAD Algorithms"</span>, <span class="refContent">Work in Progress</span>, <span class="seriesInfo">Internet-Draft, draft-irtf-cfrg-aead-limits-07</span>, <time datetime="2023-05-31" class="refDate">31 May 2023</time>, <span><<a href="https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-aead-limits-07">https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-aead-limits-07</a>></span>. </dd> <dd class="break"></dd> <dt id="CLINIC">[CLINIC]</dt> <dd> <span class="refAuthor">Miller, B.</span>, <span class="refAuthor">Huang, L.</span>, <span class="refAuthor">Joseph, A.</span>, and <span class="refAuthor">J. Tygar</span>, <span class="refTitle">"I Know Why You Went to the Clinic: Risks and Realization of HTTPS Traffic Analysis"</span>, <span class="refContent">Privacy Enhancing Technologies, pp. 143-163</span>, <span class="seriesInfo">DOI 10.1007/978-3-319-08506-7_8</span>, <time datetime="2014" class="refDate">2014</time>, <span><<a href="https://doi.org/10.1007/978-3-319-08506-7_8">https://doi.org/10.1007/978-3-319-08506-7_8</a>></span>. </dd> <dd class="break"></dd> <dt id="CONIKS">[CONIKS]</dt> <dd> <span class="refAuthor">Melara, M. S.</span>, <span class="refAuthor">Blankstein, A.</span>, <span class="refAuthor">Bonneau, J.</span>, <span class="refAuthor">Felten, E. W.</span>, and <span class="refAuthor">M. J. Freedman</span>, <span class="refTitle">"CONIKS: Bringing Key Transparency to End Users"</span>, <span class="refContent">Proceedings of the 24th USENIX Security Symposium</span>, <span class="refContent">ISBN 978-1-939133-11-3</span>, <time datetime="2015-08" class="refDate">August 2015</time>, <span><<a href="https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-melara.pdf">https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-melara.pdf</a>></span>. </dd> <dd class="break"></dd> <dt id="DoubleRatchet">[DoubleRatchet]</dt> <dd> <span class="refAuthor">Cohn-Gordon, K.</span>, <span class="refAuthor">Cremers, C.</span>, <span class="refAuthor">Dowling, B.</span>, <span class="refAuthor">Garratt, L.</span>, and <span class="refAuthor">D. Stebila</span>, <span class="refTitle">"A Formal Security Analysis of the Signal Messaging Protocol"</span>, <span class="refContent">2017 IEEE European Symposium on Security and Privacy (EuroS&P)</span>, <span class="seriesInfo">DOI 10.1109/eurosp.2017.27</span>, <time datetime="2017-04" class="refDate">April 2017</time>, <span><<a href="https://doi.org/10.1109/eurosp.2017.27">https://doi.org/10.1109/eurosp.2017.27</a>></span>. </dd> <dd class="break"></dd> <dt id="HCJ16">[HCJ16]</dt> <dd> <span class="refAuthor">Husák, M.</span>, <span class="refAuthor">Čermák, M.</span>, <span class="refAuthor">Jirsík, T.</span>, and <span class="refAuthor">P. Čeleda</span>, <span class="refTitle">"HTTPS traffic analysis and client identification using passive SSL/TLS fingerprinting"</span>, <span class="refContent">EURASIP Journal on Information Security, Vol. 2016, Issue 1</span>, <span class="seriesInfo">DOI 10.1186/s13635-016-0030-7</span>, <time datetime="2016-02" class="refDate">February 2016</time>, <span><<a href="https://doi.org/10.1186/s13635-016-0030-7">https://doi.org/10.1186/s13635-016-0030-7</a>></span>. </dd> <dd class="break"></dd> <dt id="KT">[KT]</dt> <dd> <span class="refTitle">"Key Transparency Design Doc"</span>, <span class="refContent">commit fb0f87f</span>, <time datetime="2020-06" class="refDate">June 2020</time>, <span><<a href="https://github.com/google/keytransparency/blob/master/docs/design.md">https://github.com/google/keytransparency/blob/master/docs/design.md</a>></span>. </dd> <dd class="break"></dd> <dt id="I-D.ietf-mls-architecture">[MLS-ARCH]</dt> <dd> <span class="refAuthor">Beurdouche, B.</span>, <span class="refAuthor">Rescorla, E.</span>, <span class="refAuthor">Omara, E.</span>, <span class="refAuthor">Inguva, S.</span>, and <span class="refAuthor">A. Duric</span>, <span class="refTitle">"The Messaging Layer Security (MLS) Architecture"</span>, <span class="refContent">Work in Progress</span>, <span class="seriesInfo">Internet-Draft, draft-ietf-mls-architecture-10</span>, <time datetime="2022-12-16" class="refDate">16 December 2022</time>, <span><<a href="https://datatracker.ietf.org/doc/html/draft-ietf-mls-architecture-10">https://datatracker.ietf.org/doc/html/draft-ietf-mls-architecture-10</a>></span>. </dd> <dd class="break"></dd> <dt id="NAN">[NAN]</dt> <dd> <span class="refAuthor">Bellare, M.</span>, <span class="refAuthor">Ng, R.</span>, and <span class="refAuthor">B. Tackmann</span>, <span class="refTitle">"Nonces Are Noticed: AEAD Revisited"</span>, <span class="refContent">Advances in Cryptology - CRYPTO 2019, pp. 235-265</span>, <span class="seriesInfo">DOI 10.1007/978-3-030-26948-7_9</span>, <time datetime="2019-08" class="refDate">August 2019</time>, <span><<a href="https://doi.org/10.1007/978-3-030-26948-7_9">https://doi.org/10.1007/978-3-030-26948-7_9</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC5116">[RFC5116]</dt> <dd> <span class="refAuthor">McGrew, D.</span>, <span class="refTitle">"An Interface and Algorithms for Authenticated Encryption"</span>, <span class="seriesInfo">RFC 5116</span>, <span class="seriesInfo">DOI 10.17487/RFC5116</span>, <time datetime="2008-01" class="refDate">January 2008</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5116">https://www.rfc-editor.org/info/rfc5116</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC5905">[RFC5905]</dt> <dd> <span class="refAuthor">Mills, D.</span>, <span class="refAuthor">Martin, J., Ed.</span>, <span class="refAuthor">Burbank, J.</span>, and <span class="refAuthor">W. Kasch</span>, <span class="refTitle">"Network Time Protocol Version 4: Protocol and Algorithms Specification"</span>, <span class="seriesInfo">RFC 5905</span>, <span class="seriesInfo">DOI 10.17487/RFC5905</span>, <time datetime="2010-06" class="refDate">June 2010</time>, <span><<a href="https://www.rfc-editor.org/info/rfc5905">https://www.rfc-editor.org/info/rfc5905</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC6125">[RFC6125]</dt> <dd> <span class="refAuthor">Saint-Andre, P.</span> and <span class="refAuthor">J. Hodges</span>, <span class="refTitle">"Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)"</span>, <span class="seriesInfo">RFC 6125</span>, <span class="seriesInfo">DOI 10.17487/RFC6125</span>, <time datetime="2011-03" class="refDate">March 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6125">https://www.rfc-editor.org/info/rfc6125</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC7696">[RFC7696]</dt> <dd> <span class="refAuthor">Housley, R.</span>, <span class="refTitle">"Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms"</span>, <span class="seriesInfo">BCP 201</span>, <span class="seriesInfo">RFC 7696</span>, <span class="seriesInfo">DOI 10.17487/RFC7696</span>, <time datetime="2015-11" class="refDate">November 2015</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7696">https://www.rfc-editor.org/info/rfc7696</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC8032">[RFC8032]</dt> <dd> <span class="refAuthor">Josefsson, S.</span> and <span class="refAuthor">I. Liusvaara</span>, <span class="refTitle">"Edwards-Curve Digital Signature Algorithm (EdDSA)"</span>, <span class="seriesInfo">RFC 8032</span>, <span class="seriesInfo">DOI 10.17487/RFC8032</span>, <time datetime="2017-01" class="refDate">January 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8032">https://www.rfc-editor.org/info/rfc8032</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC8701">[RFC8701]</dt> <dd> <span class="refAuthor">Benjamin, D.</span>, <span class="refTitle">"Applying Generate Random Extensions And Sustain Extensibility (GREASE) to TLS Extensibility"</span>, <span class="seriesInfo">RFC 8701</span>, <span class="seriesInfo">DOI 10.17487/RFC8701</span>, <time datetime="2020-01" class="refDate">January 2020</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8701">https://www.rfc-editor.org/info/rfc8701</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC9000">[RFC9000]</dt> <dd> <span class="refAuthor">Iyengar, J., Ed.</span> and <span class="refAuthor">M. Thomson, Ed.</span>, <span class="refTitle">"QUIC: A UDP-Based Multiplexed and Secure Transport"</span>, <span class="seriesInfo">RFC 9000</span>, <span class="seriesInfo">DOI 10.17487/RFC9000</span>, <time datetime="2021-05" class="refDate">May 2021</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9000">https://www.rfc-editor.org/info/rfc9000</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC9001">[RFC9001]</dt> <dd> <span class="refAuthor">Thomson, M., Ed.</span> and <span class="refAuthor">S. Turner, Ed.</span>, <span class="refTitle">"Using TLS to Secure QUIC"</span>, <span class="seriesInfo">RFC 9001</span>, <span class="seriesInfo">DOI 10.17487/RFC9001</span>, <time datetime="2021-05" class="refDate">May 2021</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9001">https://www.rfc-editor.org/info/rfc9001</a>></span>. </dd> <dd class="break"></dd> <dt id="RFC9113">[RFC9113]</dt> <dd> <span class="refAuthor">Thomson, M., Ed.</span> and <span class="refAuthor">C. Benfield, Ed.</span>, <span class="refTitle">"HTTP/2"</span>, <span class="seriesInfo">RFC 9113</span>, <span class="seriesInfo">DOI 10.17487/RFC9113</span>, <time datetime="2022-06" class="refDate">June 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9113">https://www.rfc-editor.org/info/rfc9113</a>></span>. </dd> <dd class="break"></dd> <dt id="SHS">[SHS]</dt> <dd> <span class="refAuthor">National Institute of Standards and Technology (NIST)</span>, <span class="refTitle">"Secure Hash Standard (SHS)"</span>, <span class="seriesInfo">FIPS PUB 180-4</span>, <span class="seriesInfo">DOI 10.6028/NIST.FIPS.180-4</span>, <time datetime="2015-08" class="refDate">August 2015</time>, <span><<a href="https://doi.org/10.6028/NIST.FIPS.180-4">https://doi.org/10.6028/NIST.FIPS.180-4</a>></span>. </dd> <dd class="break"></dd> <dt id="Signal">[Signal]</dt> <dd> <span class="refAuthor">Perrin(ed), T.</span> and <span class="refAuthor">M. Marlinspike</span>, <span class="refTitle">"The Double Ratchet Algorithm"</span>, <span class="refContent">Revision 1</span>, <time datetime="2016-11" class="refDate">November 2016</time>, <span><<a href="https://www.signal.org/docs/specifications/doubleratchet/">https://www.signal.org/docs/specifications/doubleratchet/</a>></span>. </dd> <dd class="break"></dd> </dl> </section> </section> <div id="protocol-origins-of-example-trees"> <section id="appendix-A"> <h2 id="name-protocol-origins-of-example"> <a href="#appendix-A" class="section-number selfRef">Appendix A. </a><a href="#name-protocol-origins-of-example" class="section-name selfRef">Protocol Origins of Example Trees</a> </h2> <p id="appendix-A-1">Protocol operations in MLS give rise to specific forms of ratchet tree, typically affecting a whole direct path at once. In this section, we describe the protocol operations that could have given rise to the various example trees in this document.<a href="#appendix-A-1" class="pilcrow">¶</a></p> <p id="appendix-A-2">To construct the tree in <a href="#full-tree" class="auto internal xref">Figure 11</a>:<a href="#appendix-A-2" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-3.1">A creates a group with B, ..., G<a href="#appendix-A-3.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-3.2">F sends an empty Commit, setting X, Y, and W<a href="#appendix-A-3.2" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-3.3">G removes C and D, blanking V, U, and setting Y and W<a href="#appendix-A-3.3" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-3.4">B sends an empty Commit, setting T and W<a href="#appendix-A-3.4" class="pilcrow">¶</a> </li> </ul> <p id="appendix-A-4">To construct the tree in <a href="#resolution-tree" class="auto internal xref">Figure 10</a>:<a href="#appendix-A-4" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-5.1">A creates a group with B, ..., H, as well as some members outside this subtree<a href="#appendix-A-5.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-5.2">F sends an empty Commit, setting Y and its ancestors<a href="#appendix-A-5.2" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-5.3"> <p id="appendix-A-5.3.1">D removes B and C, with the following effects:<a href="#appendix-A-5.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-5.3.2.1">Blank the direct paths of B and C<a href="#appendix-A-5.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-5.3.2.2">Set X, the top node, and any further nodes in the direct path of D<a href="#appendix-A-5.3.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li class="normal" id="appendix-A-5.4">Someone outside this subtree removes G, blanking the direct path of G<a href="#appendix-A-5.4" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-5.5">A adds a new member at B with a partial Commit, adding B as unmerged at X<a href="#appendix-A-5.5" class="pilcrow">¶</a> </li> </ul> <p id="appendix-A-6">To construct the tree in <a href="#evolution-tree" class="auto internal xref">Figure 13</a>:<a href="#appendix-A-6" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-7.1">A creates a group with B, C, and D<a href="#appendix-A-7.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-7.2">B sends a full Commit, setting X and Y<a href="#appendix-A-7.2" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-7.3">D removes C, setting Z and Y<a href="#appendix-A-7.3" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-7.4"> <p id="appendix-A-7.4.1">B adds a new member at C with a full Commit<a href="#appendix-A-7.4.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-7.4.2.1">The Add proposal adds C as unmerged at Z and Y<a href="#appendix-A-7.4.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-7.4.2.2">The path in the Commit resets X and Y, clearing Y's unmerged leaves<a href="#appendix-A-7.4.2.2" class="pilcrow">¶</a> </li> </ul> </li> </ul> <p id="appendix-A-8">To construct the tree in <a href="#parent-hash-tree" class="auto internal xref">Figure 21</a>:<a href="#appendix-A-8" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-A-9.1">A creates a group with B, ..., G<a href="#appendix-A-9.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-9.2">A removes F in a full Commit, setting T, U, and W<a href="#appendix-A-9.2" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-9.3">E sends an empty Commit, setting Y and W<a href="#appendix-A-9.3" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-A-9.4">A adds a new member at F in a partial Commit, adding F as unmerged at Y and W<a href="#appendix-A-9.4" class="pilcrow">¶</a> </li> </ul> </section> </div> <div id="ph-evolution"> <section id="appendix-B"> <h2 id="name-evolution-of-parent-hashes"> <a href="#appendix-B" class="section-number selfRef">Appendix B. </a><a href="#name-evolution-of-parent-hashes" class="section-name selfRef">Evolution of Parent Hashes</a> </h2> <p id="appendix-B-1">To better understand how parent hashes are maintained, let's look in detail at how they evolve in a small group. Consider the following sequence of operations:<a href="#appendix-B-1" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="appendix-B-2"> <li id="appendix-B-2.1">A initializes a new group<a href="#appendix-B-2.1" class="pilcrow">¶</a> </li> <li id="appendix-B-2.2">A adds B to the group with a full Commit<a href="#appendix-B-2.2" class="pilcrow">¶</a> </li> <li id="appendix-B-2.3">B adds C and D to the group with a full Commit<a href="#appendix-B-2.3" class="pilcrow">¶</a> </li> <li id="appendix-B-2.4">C sends an empty Commit<a href="#appendix-B-2.4" class="pilcrow">¶</a> </li> </ol> <span id="name-building-a-four-member-tree"></span><figure id="figure-30"> <div id="appendix-B-3.1"> <div class="alignLeft art-svg artwork" id="appendix-B-3.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="144" text-anchor="middle" version="1.1" viewBox="0 0 432 144" width="432"> <path d="M 216,48 L 216,64" fill="none" stroke="black"></path> <path d="M 376,48 L 376,64" fill="none" stroke="black"></path> <path d="M 200,64 L 232,64" fill="none" stroke="black"></path> <path d="M 360,64 L 392,64" fill="none" stroke="black"></path> <path d="M 32,78 L 48,78" fill="none" stroke="black"></path> <path d="M 32,82 L 48,82" fill="none" stroke="black"></path> <path d="M 128,78 L 144,78" fill="none" stroke="black"></path> <path d="M 128,82 L 144,82" fill="none" stroke="black"></path> <path d="M 288,78 L 304,78" fill="none" stroke="black"></path> <path d="M 288,82 L 304,82" fill="none" stroke="black"></path> <path d="M 232,64 L 240,80" fill="none" stroke="black"></path> <path d="M 252,104 L 256,112" fill="none" stroke="black"></path> <path d="M 392,64 L 400,80" fill="none" stroke="black"></path> <path d="M 192,80 L 200,64" fill="none" stroke="black"></path> <path d="M 240,112 L 244,104" fill="none" stroke="black"></path> <path d="M 352,80 L 360,64" fill="none" stroke="black"></path> <polygon class="arrowhead" fill="black" points="312,80 300,74.4 300,85.6" transform="rotate(0,304,80)"></polygon> <polygon class="arrowhead" fill="black" points="152,80 140,74.4 140,85.6" transform="rotate(0,144,80)"></polygon> <polygon class="arrowhead" fill="black" points="56,80 44,74.4 44,85.6" transform="rotate(0,48,80)"></polygon> <g class="text"> <text x="216" y="36">Y</text> <text x="380" y="36">Y'</text> <text x="88" y="100">X</text> <text x="188" y="100">X'</text> <text x="256" y="100">_=Z</text> <text x="348" y="100">X'</text> <text x="412" y="100">Z'</text> <text x="80" y="116">/</text> <text x="96" y="116">\</text> <text x="176" y="116">/</text> <text x="192" y="116">\</text> <text x="336" y="116">/</text> <text x="352" y="116">\</text> <text x="400" y="116">/</text> <text x="416" y="116">\</text> <text x="8" y="132">A</text> <text x="72" y="132">A</text> <text x="104" y="132">B</text> <text x="168" y="132">A</text> <text x="200" y="132">B</text> <text x="232" y="132">C</text> <text x="264" y="132">D</text> <text x="328" y="132">A</text> <text x="360" y="132">B</text> <text x="392" y="132">C</text> <text x="424" y="132">D</text> </g> </svg><a href="#appendix-B-3.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-30" class="selfRef">Figure 30</a>: <a href="#name-building-a-four-member-tree" class="selfRef">Building a Four-Member Tree to Illustrate Parent Hashes</a> </figcaption></figure> <p id="appendix-B-4">Then the parent hashes associated to the nodes will be updated as follows (where we use the shorthand <code>ph</code> for parent hash, <code>th</code> for tree hash, and <code>osth</code> for original sibling tree hash):<a href="#appendix-B-4" class="pilcrow">¶</a></p> <ol start="1" type="1" class="normal type-1" id="appendix-B-5"> <li id="appendix-B-5.1"> <p id="appendix-B-5.1.1">A adds B: set X<a href="#appendix-B-5.1.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-B-5.1.2.1"> <code>A.parent_hash = ph(X) = H(X, ph="", osth=th(B))</code><a href="#appendix-B-5.1.2.1" class="pilcrow">¶</a> </li> </ul> </li> <li id="appendix-B-5.2"> <p id="appendix-B-5.2.1">B adds C, D: set B', X', and Y<a href="#appendix-B-5.2.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-B-5.2.2.1"> <code>X'.parent_hash = ph(Y) = H(Y, ph="", osth=th(Z))</code>, where <code>th(Z)</code> covers <code>(C, _, D)</code><a href="#appendix-B-5.2.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-B-5.2.2.2"> <code>B'.parent_hash = ph(X') = H(X', ph=X'.parent_hash, osth=th(A))</code><a href="#appendix-B-5.2.2.2" class="pilcrow">¶</a> </li> </ul> </li> <li id="appendix-B-5.3"> <p id="appendix-B-5.3.1">C sends empty Commit: set C', Z', Y'<a href="#appendix-B-5.3.1" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-B-5.3.2.1"> <code>Z'.parent_hash = ph(Y') = H(Y', ph="", osth=th(X'))</code>, where <code>th(X')</code> covers <code>(A, X', B')</code><a href="#appendix-B-5.3.2.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-B-5.3.2.2"> <code>C'.parent_hash = ph(Z') = H(Z', ph=Z'.parent_hash, osth=th(D))</code><a href="#appendix-B-5.3.2.2" class="pilcrow">¶</a> </li> </ul> </li> </ol> <p id="appendix-B-6">When a new member joins, they will receive a tree that has the following parent hash values and compute the indicated parent hash validity relationships:<a href="#appendix-B-6" class="pilcrow">¶</a></p> <table class="center" id="table-15"> <caption><a href="#table-15" class="selfRef">Table 15</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Node</th> <th class="text-left" rowspan="1" colspan="1">Parent Hash Value</th> <th class="text-left" rowspan="1" colspan="1">Valid?</th> </tr> </thead> <tbody> <tr> <td class="text-left" rowspan="1" colspan="1">A</td> <td class="text-left" rowspan="1" colspan="1">H(X, ph="", osth=th(B))</td> <td class="text-left" rowspan="1" colspan="1">No, B changed</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">B'</td> <td class="text-left" rowspan="1" colspan="1">H(X', ph=X'.parent_hash, osth=th(A))</td> <td class="text-left" rowspan="1" colspan="1">Yes</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">C'</td> <td class="text-left" rowspan="1" colspan="1">H(Z', ph=Z'.parent_hash, osth=th(D))</td> <td class="text-left" rowspan="1" colspan="1">Yes</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">D</td> <td class="text-left" rowspan="1" colspan="1">(none, never sent an UpdatePath)</td> <td class="text-left" rowspan="1" colspan="1">N/A</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">X'</td> <td class="text-left" rowspan="1" colspan="1">H(Y, ph="", osth=th(Z))</td> <td class="text-left" rowspan="1" colspan="1">No, Y and Z changed</td> </tr> <tr> <td class="text-left" rowspan="1" colspan="1">Z'</td> <td class="text-left" rowspan="1" colspan="1">H(Y', ph="", osth=th(X'))</td> <td class="text-left" rowspan="1" colspan="1">Yes</td> </tr> </tbody> </table> <p id="appendix-B-8">In other words, the joiner will find the following path-hash links in the tree:<a href="#appendix-B-8" class="pilcrow">¶</a></p> <span id="name-parent-hash-links-connect-a"></span><figure id="figure-31"> <div id="appendix-B-9.1"> <div class="alignLeft art-svg artwork" id="appendix-B-9.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="160" text-anchor="middle" version="1.1" viewBox="0 0 112 160" width="112"> <path d="M 56,48 L 56,64" fill="none" stroke="black"></path> <path d="M 56,64 L 72,64" fill="none" stroke="black"></path> <path d="M 72,64 L 80,80" fill="none" stroke="black"></path> <g class="text"> <text x="60" y="36">Y'</text> <text x="28" y="100">X'</text> <text x="92" y="100">Z'</text> <text x="32" y="116">\</text> <text x="80" y="116">/</text> <text x="8" y="132">A</text> <text x="44" y="132">B'</text> <text x="76" y="132">C'</text> <text x="104" y="132">D</text> </g> </svg><a href="#appendix-B-9.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-31" class="selfRef">Figure 31</a>: <a href="#name-parent-hash-links-connect-a" class="selfRef">Parent-hash links connect all non-empty parent nodes to leaves</a> </figcaption></figure> <p id="appendix-B-10">Since these chains collectively cover all non-blank parent nodes in the tree, the tree is parent-hash valid.<a href="#appendix-B-10" class="pilcrow">¶</a></p> <p id="appendix-B-11">Note that this tree, though valid, contains invalid parent-hash links. If a client were checking parent hashes top-down from Y', for example, they would find that X' has an invalid parent hash relative to Y', but that Z' has a valid parent hash. Likewise, if the client were checking bottom-up, they would find that the chain from B' ends in an invalid link from X' to Y'. These invalid links are the natural result of multiple clients having committed.<a href="#appendix-B-11" class="pilcrow">¶</a></p> <p id="appendix-B-12">Note also the way the tree hash and the parent hash interact. The parent hash of node C' includes the tree hash of node D. The parent hash of node Z' includes the tree hash of X', which covers nodes A and B' (including the parent hash of B'). Although the tree hash and the parent hash depend on each other, the dependency relationships are structured so that there is never a circular dependency.<a href="#appendix-B-12" class="pilcrow">¶</a></p> <p id="appendix-B-13">In the particular case where a new member first receives the tree for a group (e.g., in a ratchet tree GroupInfo extension <a href="#ratchet-tree-extension" class="auto internal xref">Section 12.4.3.3</a>), the parent hashes will be expressed in the tree representation, but the tree hash need not be. Instead, the new member will recompute the tree hashes for all the nodes in the tree, verifying that this matches the tree hash in the GroupInfo object. If the tree is valid, then the subtree hashes computed in this way will align with the inputs needed for parent hash validation (except where recomputation is needed to account for unmerged leaves).<a href="#appendix-B-13" class="pilcrow">¶</a></p> </section> </div> <div id="array-based-trees"> <section id="appendix-C"> <h2 id="name-array-based-trees"> <a href="#appendix-C" class="section-number selfRef">Appendix C. </a><a href="#name-array-based-trees" class="section-name selfRef">Array-Based Trees</a> </h2> <p id="appendix-C-1">One benefit of using complete balanced trees is that they admit a simple flat array representation. In this representation, leaf nodes are even-numbered nodes, with the <code>n</code>-th leaf at <code>2*n</code>. Intermediate nodes are held in odd-numbered nodes. For example, the tree with 8 leaves has the following structure:<a href="#appendix-C-1" class="pilcrow">¶</a></p> <span id="name-an-eight-member-tree-repres"></span><figure id="figure-32"> <div id="appendix-C-2.1"> <div class="alignLeft art-svg artwork" id="appendix-C-2.1.1"> <svg xmlns="http://www.w3.org/2000/svg" class="diagram" font-family="monospace" font-size="13px" height="288" text-anchor="middle" version="1.1" viewBox="0 0 400 288" width="400"> <path d="M 128,112 L 128,128" fill="none" stroke="black"></path> <path d="M 224,48 L 224,64" fill="none" stroke="black"></path> <path d="M 320,112 L 320,128" fill="none" stroke="black"></path> <path d="M 144,64 L 304,64" fill="none" stroke="black"></path> <path d="M 96,128 L 160,128" fill="none" stroke="black"></path> <path d="M 288,128 L 352,128" fill="none" stroke="black"></path> <path d="M 88,176 L 96,192" fill="none" stroke="black"></path> <path d="M 160,128 L 168,144" fill="none" stroke="black"></path> <path d="M 184,176 L 192,192" fill="none" stroke="black"></path> <path d="M 280,176 L 288,192" fill="none" stroke="black"></path> <path d="M 304,64 L 312,80" fill="none" stroke="black"></path> <path d="M 352,128 L 360,144" fill="none" stroke="black"></path> <path d="M 376,176 L 384,192" fill="none" stroke="black"></path> <path d="M 64,192 L 72,176" fill="none" stroke="black"></path> <path d="M 88,144 L 96,128" fill="none" stroke="black"></path> <path d="M 136,80 L 144,64" fill="none" stroke="black"></path> <path d="M 160,192 L 168,176" fill="none" stroke="black"></path> <path d="M 256,192 L 264,176" fill="none" stroke="black"></path> <path d="M 280,144 L 288,128" fill="none" stroke="black"></path> <path d="M 352,192 L 360,176" fill="none" stroke="black"></path> <g class="text"> <text x="224" y="36">X</text> <text x="128" y="100">X</text> <text x="320" y="100">X</text> <text x="80" y="164">X</text> <text x="176" y="164">X</text> <text x="272" y="164">X</text> <text x="368" y="164">X</text> <text x="56" y="212">X</text> <text x="104" y="212">X</text> <text x="152" y="212">X</text> <text x="200" y="212">X</text> <text x="248" y="212">X</text> <text x="296" y="212">X</text> <text x="344" y="212">X</text> <text x="392" y="212">X</text> <text x="24" y="244">Node:</text> <text x="56" y="244">0</text> <text x="80" y="244">1</text> <text x="104" y="244">2</text> <text x="128" y="244">3</text> <text x="152" y="244">4</text> <text x="176" y="244">5</text> <text x="200" y="244">6</text> <text x="224" y="244">7</text> <text x="248" y="244">8</text> <text x="272" y="244">9</text> <text x="292" y="244">10</text> <text x="316" y="244">11</text> <text x="340" y="244">12</text> <text x="364" y="244">13</text> <text x="388" y="244">14</text> <text x="24" y="276">Leaf:</text> <text x="56" y="276">0</text> <text x="104" y="276">1</text> <text x="152" y="276">2</text> <text x="200" y="276">3</text> <text x="248" y="276">4</text> <text x="296" y="276">5</text> <text x="344" y="276">6</text> <text x="392" y="276">7</text> </g> </svg><a href="#appendix-C-2.1.1" class="pilcrow">¶</a> </div> </div> <figcaption><a href="#figure-32" class="selfRef">Figure 32</a>: <a href="#name-an-eight-member-tree-repres" class="selfRef">An Eight-Member Tree Represented as an Array</a> </figcaption></figure> <p id="appendix-C-3">This allows us to compute relationships between tree nodes simply by manipulating indices, rather than having to maintain complicated structures in memory. The basic rule is that the high-order bits of parent and child nodes indices have the following relation (where <code>x</code> is an arbitrary bit string):<a href="#appendix-C-3" class="pilcrow">¶</a></p> <div class="lang-pseudocode sourcecode" id="appendix-C-4"> <pre> parent=01x => left=00x, right=10x </pre><a href="#appendix-C-4" class="pilcrow">¶</a> </div> <p id="appendix-C-5">Since node relationships are implicit, the algorithms for adding and removing nodes at the right edge of the tree are quite simple. If there are <code>N</code> nodes in the array:<a href="#appendix-C-5" class="pilcrow">¶</a></p> <ul class="normal"> <li class="normal" id="appendix-C-6.1">Add: Append <code>N + 1</code> blank values to the end of the array.<a href="#appendix-C-6.1" class="pilcrow">¶</a> </li> <li class="normal" id="appendix-C-6.2">Remove: Truncate the array to its first <code>(N-1) / 2</code> entries.<a href="#appendix-C-6.2" class="pilcrow">¶</a> </li> </ul> <p id="appendix-C-7">The following python code demonstrates the tree computations necessary to use an array-based tree for MLS.<a href="#appendix-C-7" class="pilcrow">¶</a></p> <div class="breakable lang-python sourcecode" id="appendix-C-8"> <pre> # The exponent of the largest power of 2 less than x. Equivalent to: # int(math.floor(math.log(x, 2))) def log2(x): if x == 0: return 0 k = 0 while (x >> k) > 0: k += 1 return k-1 # The level of a node in the tree. Leaves are level 0, their parents # are level 1, etc. If a node's children are at different levels, # then its level is the max level of its children plus one. def level(x): if x & 0x01 == 0: return 0 k = 0 while ((x >> k) & 0x01) == 1: k += 1 return k # The number of nodes needed to represent a tree with n leaves. def node_width(n): if n == 0: return 0 else: return 2*(n - 1) + 1 # The index of the root node of a tree with n leaves. def root(n): w = node_width(n) return (1 << log2(w)) - 1 # The left child of an intermediate node. def left(x): k = level(x) if k == 0: raise Exception('leaf node has no children') return x ^ (0x01 << (k - 1)) # The right child of an intermediate node. def right(x): k = level(x) if k == 0: raise Exception('leaf node has no children') return x ^ (0x03 << (k - 1)) # The parent of a node. def parent(x, n): if x == root(n): raise Exception('root node has no parent') k = level(x) b = (x >> (k + 1)) & 0x01 return (x | (1 << k)) ^ (b << (k + 1)) # The other child of the node's parent. def sibling(x, n): p = parent(x, n) if x < p: return right(p) else: return left(p) # The direct path of a node, ordered from leaf to root. def direct_path(x, n): r = root(n) if x == r: return [] d = [] while x != r: x = parent(x, n) d.append(x) return d # The copath of a node, ordered from leaf to root. def copath(x, n): if x == root(n): return [] d = direct_path(x, n) d.insert(0, x) d.pop() return [sibling(y, n) for y in d] # The common ancestor of two nodes is the lowest node that is in the # direct paths of both leaves. def common_ancestor_semantic(x, y, n): dx = set([x]) | set(direct_path(x, n)) dy = set([y]) | set(direct_path(y, n)) dxy = dx & dy if len(dxy) == 0: raise Exception('failed to find common ancestor') return min(dxy, key=level) # The common ancestor of two nodes is the lowest node that is in the # direct paths of both leaves. def common_ancestor_direct(x, y, _): # Handle cases where one is an ancestor of the other lx, ly = level(x)+1, level(y)+1 if (lx <= ly) and (x>>ly == y>>ly): return y elif (ly <= lx) and (x>>lx == y>>lx): return x # Handle other cases xn, yn = x, y k = 0 while xn != yn: xn, yn = xn >> 1, yn >> 1 k += 1 return (xn << k) + (1 << (k-1)) - 1 </pre><a href="#appendix-C-8" class="pilcrow">¶</a> </div> </section> </div> <div id="link-based-trees"> <section id="appendix-D"> <h2 id="name-link-based-trees"> <a href="#appendix-D" class="section-number selfRef">Appendix D. </a><a href="#name-link-based-trees" class="section-name selfRef">Link-Based Trees</a> </h2> <p id="appendix-D-1">An implementation may choose to store ratchet trees in a "link-based" representation, where each node stores references to its parents and/or children (as opposed to the array-based representation suggested above, where these relationships are computed from relationships between nodes' indices in the array). Such an implementation needs to update these links to maintain the balanced structure of the tree as the tree is extended to add new members or truncated when members are removed.<a href="#appendix-D-1" class="pilcrow">¶</a></p> <p id="appendix-D-2">The following code snippet shows how these algorithms could be implemented in Python.<a href="#appendix-D-2" class="pilcrow">¶</a></p> <div class="lang-python sourcecode" id="appendix-D-3"> <pre> class Node: def __init__(self, value, left=None, right=None): self.value = value # Value of the node self.left = left # Left child node self.right = right # Right child node @staticmethod def blank_subtree(depth): if depth == 1: return Node(None) L = Node.blank_subtree(depth-1) R = Node.blank_subtree(depth-1) return Node(None, left=L, right=R) def empty(self): L_empty = (self.left == None) or self.left.empty() R_empty = (self.right == None) or self.right.empty() return (self.value == None) and L_empty and R_empty class Tree: def __init__(self): self.depth = 0 # Depth of the tree self.root = None # Root node of the tree, initially empty # Add a blank subtree to the right def extend(self): if self.depth == 0: self.depth = 1 self.root = Node(None) L = self.root R = Node.blank_subtree(self.depth) self.root = Node(None, left=L, right=R) self.depth += 1 # Truncate the right subtree def truncate(self): if self.root == None: return if not self.root.right.empty(): raise Exception("Cannot truncate non-blank subtree") self.depth -= 1 self.root = self.root.left </pre><a href="#appendix-D-3" class="pilcrow">¶</a> </div> </section> </div> <div id="contributors"> <section id="appendix-E"> <h2 id="name-contributors"> <a href="#name-contributors" class="section-name selfRef">Contributors</a> </h2> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Joel Alwen</span></div> <div dir="auto" class="left"><span class="org">Amazon</span></div> <div class="email"> <span>Email:</span> <a href="mailto:alwenjo@amazon.com" class="email">alwenjo@amazon.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Karthikeyan Bhargavan</span></div> <div dir="auto" class="left"><span class="org">Inria</span></div> <div class="email"> <span>Email:</span> <a href="mailto:karthikeyan.bhargavan@inria.fr" class="email">karthikeyan.bhargavan@inria.fr</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Cas Cremers</span></div> <div dir="auto" class="left"><span class="org">CISPA</span></div> <div class="email"> <span>Email:</span> <a href="mailto:cremers@cispa.de" class="email">cremers@cispa.de</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Alan Duric</span></div> <div dir="auto" class="left"><span class="org">Wire</span></div> <div class="email"> <span>Email:</span> <a href="mailto:alan@wire.com" class="email">alan@wire.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Britta Hale</span></div> <div dir="auto" class="left"><span class="org">Naval Postgraduate School</span></div> <div class="email"> <span>Email:</span> <a href="mailto:britta.hale@nps.edu" class="email">britta.hale@nps.edu</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Srinivas Inguva</span></div> <div class="email"> <span>Email:</span> <a href="mailto:singuva@yahoo.com" class="email">singuva@yahoo.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Konrad Kohbrok</span></div> <div dir="auto" class="left"><span class="org">Phoenix R&D</span></div> <div class="email"> <span>Email:</span> <a href="mailto:konrad.kohbrok@datashrine.de" class="email">konrad.kohbrok@datashrine.de</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Albert Kwon</span></div> <div dir="auto" class="left"><span class="org">MIT</span></div> <div class="email"> <span>Email:</span> <a href="mailto:kwonal@mit.edu" class="email">kwonal@mit.edu</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Tom Leavy</span></div> <div dir="auto" class="left"><span class="org">Amazon</span></div> <div class="email"> <span>Email:</span> <a href="mailto:tomleavy@amazon.com" class="email">tomleavy@amazon.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Brendan McMillion</span></div> <div class="email"> <span>Email:</span> <a href="mailto:brendanmcmillion@gmail.com" class="email">brendanmcmillion@gmail.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Marta Mularczyk</span></div> <div dir="auto" class="left"><span class="org">Amazon</span></div> <div class="email"> <span>Email:</span> <a href="mailto:mulmarta@amazon.com" class="email">mulmarta@amazon.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Eric Rescorla</span></div> <div dir="auto" class="left"><span class="org">Mozilla</span></div> <div class="email"> <span>Email:</span> <a href="mailto:ekr@rtfm.com" class="email">ekr@rtfm.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Michael Rosenberg</span></div> <div dir="auto" class="left"><span class="org">Trail of Bits</span></div> <div class="email"> <span>Email:</span> <a href="mailto:michael.rosenberg@trailofbits.com" class="email">michael.rosenberg@trailofbits.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Théophile Wallez</span></div> <div dir="auto" class="left"><span class="org">Inria</span></div> <div class="email"> <span>Email:</span> <a href="mailto:theophile.wallez@inria.fr" class="email">theophile.wallez@inria.fr</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Thyla van der Merwe</span></div> <div dir="auto" class="left"><span class="org">Royal Holloway, University of London</span></div> <div class="email"> <span>Email:</span> <a href="mailto:tjvdmerwe@gmail.com" class="email">tjvdmerwe@gmail.com</a> </div> </address> </section> </div> <div id="authors-addresses"> <section id="appendix-F"> <h2 id="name-authors-addresses"> <a href="#name-authors-addresses" class="section-name selfRef">Authors' Addresses</a> </h2> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Richard Barnes</span></div> <div dir="auto" class="left"><span class="org">Cisco</span></div> <div class="email"> <span>Email:</span> <a href="mailto:rlb@ipv.sx" class="email">rlb@ipv.sx</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Benjamin Beurdouche</span></div> <div dir="auto" class="left"><span class="org">Inria & Mozilla</span></div> <div class="email"> <span>Email:</span> <a href="mailto:ietf@beurdouche.com" class="email">ietf@beurdouche.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Raphael Robert</span></div> <div dir="auto" class="left"><span class="org">Phoenix R&D</span></div> <div class="email"> <span>Email:</span> <a href="mailto:ietf@raphaelrobert.com" class="email">ietf@raphaelrobert.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Jon Millican</span></div> <div dir="auto" class="left"><span class="org">Meta Platforms</span></div> <div class="email"> <span>Email:</span> <a href="mailto:jmillican@meta.com" class="email">jmillican@meta.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Emad Omara</span></div> <div class="email"> <span>Email:</span> <a href="mailto:emad.omara@gmail.com" class="email">emad.omara@gmail.com</a> </div> </address> <address class="vcard"> <div dir="auto" class="left"><span class="fn nameRole">Katriel Cohn-Gordon</span></div> <div dir="auto" class="left"><span class="org">University of Oxford</span></div> <div class="email"> <span>Email:</span> <a href="mailto:me@katriel.co.uk" class="email">me@katriel.co.uk</a> </div> </address> </section> </div> <script>const toc = document.getElementById("toc"); toc.querySelector("h2").addEventListener("click", e => { toc.classList.toggle("active"); }); toc.querySelector("nav").addEventListener("click", e => { toc.classList.remove("active"); }); </script> </body> </html>