-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathrfc9750-draft.xml
3148 lines (2949 loc) · 167 KB
/
rfc9750-draft.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rfc [
<!ENTITY nbsp " ">
<!ENTITY zwsp "​">
<!ENTITY nbhy "‑">
<!ENTITY wj "⁠">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" submissionType="IETF" docName="draft-ietf-mls-architecture-15" number="9750" category="info" tocInclude="true" sortRefs="true" symRefs="true" version="3" consensus="true" updates="" obsoletes="" xml:lang="en">
<front>
<title abbrev="MLS Architecture">The Messaging Layer Security (MLS) Architecture</title>
<seriesInfo name="RFC" value="9750"/>
<author initials="B." surname="Beurdouche" fullname="Benjamin Beurdouche">
<organization>Inria & Mozilla</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="E." surname="Rescorla" fullname="Eric Rescorla">
<organization>Windy Hill Systems, LLC</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="E." surname="Omara" fullname="Emad Omara">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="S." surname="Inguva" fullname="Srinivas Inguva">
<organization/>
<address>
<email>[email protected]</email>
</address>
</author>
<author initials="A." surname="Duric" fullname="Alan Duric">
<organization>Wire</organization>
<address>
<email>[email protected]</email>
</address>
</author>
<date year="2025" month="February"/>
<area>SEC</area>
<workgroup>mls</workgroup>
<!-- [rfced] Please insert any keywords (beyond those that appear in the
title) for use on <https://www.rfc-editor.org/search>. -->
<abstract>
<t>The Messaging Layer Security (MLS) protocol (RFC 9420)
provides a Group Key Agreement protocol for messaging applications.
MLS is meant to protect against eavesdropping, tampering, and message
forgery and to provide Forward Secrecy (FS) and Post-Compromise Security
(PCS).
<!-- [rfced] Abstract: We do not see "Group Key Agreement protocol"
in the text of any published RFC. Should this term be lowercased or perhaps explained in the body of the document?
Original:
The Messaging Layer Security (MLS) protocol (I-D.ietf-mls-protocol)
provides a Group Key Agreement protocol for messaging applications. -->
</t>
<t>This document describes the architecture for using MLS in a general
secure group messaging infrastructure and defines the security goals
for MLS. It provides guidance on building a group messaging system
and discusses security and privacy trade-offs offered by multiple
security mechanisms that are part of the MLS protocol (e.g., frequency
of public encryption key rotation). The document also provides
guidance for parts of the infrastructure that are not standardized by
MLS and are instead left to the application.</t>
<t>While the recommendations of this document are not mandatory to follow in order
to interoperate at the protocol level, they affect the overall security
guarantees that are achieved by a messaging application. This is especially true
in the case of active adversaries that are able to compromise clients, the
delivery service, or the authentication service.</t>
</abstract>
</front>
<middle>
<section anchor="introduction">
<name>Introduction</name>
<t>End-to-end security is used in the vast majority of instant messaging systems
and is also deployed in systems for other purposes such as calling and conferencing.
In this context, "end-to-end" captures
the notion that users of the system enjoy some level of security -- with the
precise level depending on the system design -- even in the face of malicious
actions by the operator of the messaging system.</t>
<t>Messaging Layer Security (MLS) specifies an architecture (this document) and a
protocol <xref target="RFC9420"/> for providing end-to-end security in this
setting. MLS is not intended as a full instant messaging protocol but rather is
intended to be embedded in concrete protocols, such as the Extensible Messaging and Presence Protocol (XMPP) <xref target="RFC6120"/>.
Implementations of the MLS protocol will interoperate at the cryptographic
level, though they may have incompatibilities in terms of how protected messages
are delivered, contents of protected messages, and identity/authentication
infrastructures.
The MLS protocol has been designed to provide the same security guarantees to
all users, for all group sizes, including groups of only two clients.</t>
</section>
<section anchor="general-setting">
<name>General Setting</name>
<section anchor="protocol-overview">
<name>Protocol Overview</name>
<t>MLS provides a way for <em>clients</em> to form <em>groups</em> within which they can
communicate securely. For example, a set of users might use clients on their
phones or laptops to join a group and communicate with each other. A group may
be as small as two clients (e.g., for simple person-to-person messaging) or as
large as hundreds of thousands. A client that is part of a group is a <em>member</em>
of that group. As groups change membership and group or member properties, they
advance from one <em>epoch</em> to another and the cryptographic state of the group
evolves.</t>
<t>The group is represented as a tree, which represents the members as the leaves
of a tree. It is used to efficiently encrypt to subsets of the members. Each
member has a state called a <em>LeafNode</em> object holding the client's identity,
credentials, and capabilities.</t>
<t>Various messages are used in the evolution from epoch to epoch.
A <em>Proposal</em> message proposes
a change to be made in the next epoch, such as adding or removing a member.
A <em>Commit</em> message initiates a new epoch by instructing members of the group to
implement a collection of proposals. Proposals and Commits are collectively
called <em>Handshake messages</em>.
A <em>KeyPackage</em> provides keys that can be used to add the client to a group,
including its LeafNode, and <em>Signature Key</em>.
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.</t>
<t>Of course most (but not all) applications use MLS to send encrypted group messages.
An <em>application message</em> is an MLS message with an arbitrary application payload.</t>
<t>Finally, a <em>PublicMessage</em> contains an integrity-protected MLS Handshake message,
while a <em>PrivateMessage</em> contains a confidential, integrity-protected Handshake
or application message.</t>
<t>For a more detailed explanation of these terms, please consult the MLS protocol
specification <xref target="RFC9420"/>.</t>
</section>
<section anchor="abstract-services">
<name>Abstract Services</name>
<t>MLS is designed to operate within the context of a messaging service, which
may be a single service provider, a federated system, or some kind of
peer-to-peer system. The service needs to provide two services that
facilitate client communication using MLS:</t>
<ul spacing="normal">
<li>
<t>An Authentication Service (AS) which is responsible for
attesting to bindings between application-meaningful identifiers and the
public key material used for authentication in the MLS protocol. The
AS must also be able to generate credentials that encode these
bindings and validate credentials provided by MLS clients.
<!-- [rfced] Sections 2.2 and subsequent: After the initial
definition of "AS" in Section 2.2, we see alternating use of
"AS" and "Authentication Service". Would you like to use the
abbreviation in running text after the initial definition?
We have the same question for
* "DS" and "Delivery Service"
* "FS" and "Forward Secrecy"
* "PCS" and "Post-Compromise Security"
It seems that each of these terms is used often enough that the
abbreviations could be used after the terms are first defined.
A few examples (for "DS" and "AS"; "Delivery Services, which is
responsible ..." has been corrected):
* A Delivery Service (DS) which can receive and distribute messages
between group members. In the case of group messaging, the
delivery service may also be responsible for acting as a
"broadcaster" where the sender sends a single message which is
then forwarded to each recipient in the group by the DS.
...
It is important to note that the Authentication Service can be
completely abstract in the case of a Service Provider which allows
MLS clients to generate, distribute, and validate credentials
themselves. As with the AS, the Delivery Service can be completely
abstract if users are able to distribute credentials and messages
without relying on a central Delivery Service (as in a peer-to-peer
system). Note, though, that in such scenarios, clients will need to
implement logic that assures the delivery properties required of the
DS (see Section 5.2).
...
She sends both of these messages to the Delivery Services, which is
responsible for sending them to the appropriate people. Note that
the security of MLS does not depend on the DS forwarding the Welcome
message only to Bob, as it is encrypted for him; it is simply not
necessary for other group members to receive it.
...
The Authentication Service design is left to the infrastructure
designers. In most designs, a compromised AS is a serious matter, as
the AS can serve incorrect or attacker-provided identities to
clients. -->
</t>
</li>
<li>
<t>A Delivery Service (DS) which can receive and distribute
messages between group members. In the case of group messaging, the delivery
service may also be responsible for acting as a "broadcaster" where the sender
sends a single message which is then forwarded to each recipient in the group
by the DS. The DS is also responsible for storing and delivering initial
public key material required by MLS clients in order to proceed with the group
secret key establishment that is part of the MLS protocol.</t>
</li>
</ul>
<!-- [rfced] Sections 2.2 and subsequent: We found the use of
"which" in this document confusing at times. Please review and let us know how we may update the document.
We found the following confusing:
* An Authentication Service (AS) which is responsible for attesting
to bindings between application-meaningful identifiers and the
public key material used for authentication in the MLS protocol.
The AS must also be able to generate credentials that encode these
bindings and validate credentials provided by MLS clients.
* A Delivery Service (DS) which can receive and distribute messages
between group members. In the case of group messaging, the
delivery service may also be responsible for acting as a
"broadcaster" where the sender sends a single message which is
then forwarded to each recipient in the group by the DS. The DS
is also responsible for storing and delivering initial public key
material required by MLS clients in order to proceed with the
group secret key establishment that is part of the MLS protocol.
...
Alice, Bob, and Charlie authenticate to the DS and store some initial
keying material which can be used to send encrypted messages to them
for the first time.
...
The simplest pattern is for a client to just send a Commit which
contains one or more Proposals, for instance Alice could send a
Commit with the Proposal Add(Bob) embedded to add Bob to the group.
...
In the centralized setting, DoS protection can typically be performed
by using tickets or cookies which identify users to a service for a
certain number of connections.
...
Each encrypted MLS message carries a "generation" number which is a
per-sender incrementing counter.
...
In this section, we consider the case where the signature keys are
not compromised, which can occur if the attacker has access to part
of the memory containing the group secrets but not to the signature
keys which might be stored in a secure enclave.
...
This in turn induces a signature key rotation which
could provide the attacker with part or the full value of the private
key depending on the architecture of the service provider. -->
<t>For presentation purposes, this document treats the AS and DS as conventional
network services. However, MLS does not require a specific implementation
for the AS or DS. These services may reside on the same server or different
servers, they may be distributed between server and client components, and they
may even involve some action by users. For example:</t>
<ul spacing="normal">
<li>
<t>Several secure messaging services today provide a centralized DS and rely on
manual comparison of clients' public keys as the AS.</t>
</li>
<li>
<t>MLS clients connected to a peer-to-peer network could instantiate a
decentralized DS by transmitting MLS messages over that network.</t>
</li>
<li>
<t>In an MLS group using a Public Key Infrastructure (PKI) for authentication,
the AS would comprise the certificate issuance and validation processes,
both of which involve logic inside MLS clients as well as various
existing PKI roles (e.g., Certification Authorities).</t>
</li>
</ul>
<t>It is important to note that the Authentication Service can be
completely abstract in the case of a Service Provider that allows MLS
clients to generate, distribute, and validate credentials themselves.
As with the AS, the Delivery Service can be completely abstract if
users are able to distribute credentials and messages without relying
on a central Delivery Service (as in a peer-to-peer system). Note,
though, that in such scenarios, clients will need to implement logic
that assures the delivery properties required of the DS (see
<xref target="delivery-guarantees"/>).</t>
<t><xref target="fig-mls-overview"/> shows the relationship of these concepts,
with three clients and one group, and clients 2 and 3 being
part of the group and client 1 not being part of any group.</t>
<figure anchor="fig-mls-overview">
<name>A Simplified Messaging System</name>
<artset>
<artwork type="svg"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="256" width="456" viewBox="0 0 456 256" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
<path d="M 8,32 L 8,80" fill="none" stroke="black"/>
<path d="M 80,144 L 80,176" fill="none" stroke="black"/>
<path d="M 144,32 L 144,80" fill="none" stroke="black"/>
<path d="M 168,144 L 168,176" fill="none" stroke="black"/>
<path d="M 184,32 L 184,80" fill="none" stroke="black"/>
<path d="M 208,144 L 208,176" fill="none" stroke="black"/>
<path d="M 248,80 L 248,144" fill="none" stroke="black"/>
<path d="M 296,144 L 296,176" fill="none" stroke="black"/>
<path d="M 304,32 L 304,80" fill="none" stroke="black"/>
<path d="M 336,144 L 336,176" fill="none" stroke="black"/>
<path d="M 424,144 L 424,176" fill="none" stroke="black"/>
<path d="M 8,32 L 144,32" fill="none" stroke="black"/>
<path d="M 184,32 L 304,32" fill="none" stroke="black"/>
<path d="M 8,80 L 144,80" fill="none" stroke="black"/>
<path d="M 184,80 L 304,80" fill="none" stroke="black"/>
<path d="M 80,144 L 168,144" fill="none" stroke="black"/>
<path d="M 208,144 L 296,144" fill="none" stroke="black"/>
<path d="M 336,144 L 424,144" fill="none" stroke="black"/>
<path d="M 80,176 L 168,176" fill="none" stroke="black"/>
<path d="M 208,176 L 296,176" fill="none" stroke="black"/>
<path d="M 336,176 L 424,176" fill="none" stroke="black"/>
<path d="M 304,80 L 336,144" fill="none" stroke="black"/>
<path d="M 152,144 L 184,80" fill="none" stroke="black"/>
<g class="text">
<text x="76" y="52">Authentication</text>
<text x="244" y="52">Delivery</text>
<text x="56" y="68">Service</text>
<text x="108" y="68">(AS)</text>
<text x="224" y="68">Service</text>
<text x="276" y="68">(DS)</text>
<text x="432" y="100">Group</text>
<text x="212" y="116">........</text>
<text x="284" y="116">........</text>
<text x="388" y="116">................</text>
<text x="184" y="132">.</text>
<text x="448" y="132">.</text>
<text x="184" y="148">.</text>
<text x="448" y="148">.</text>
<text x="116" y="164">Client</text>
<text x="152" y="164">1</text>
<text x="184" y="164">.</text>
<text x="244" y="164">Client</text>
<text x="280" y="164">2</text>
<text x="372" y="164">Client</text>
<text x="408" y="164">3</text>
<text x="448" y="164">.</text>
<text x="184" y="180">.</text>
<text x="448" y="180">.</text>
<text x="184" y="196">.</text>
<text x="236" y="196">Member</text>
<text x="272" y="196">1</text>
<text x="364" y="196">Member</text>
<text x="400" y="196">2</text>
<text x="448" y="196">.</text>
<text x="184" y="212">.</text>
<text x="448" y="212">.</text>
<text x="316" y="228">..................................</text>
</g>
</svg>
</artwork>
<artwork type="ascii-art"><![CDATA[
+----------------+ +--------------+
| Authentication | | Delivery |
| Service (AS) | | Service (DS) |
+----------------+ +-------+------+
/ | \ Group
/ ........|........\................
/ . | \ .
+--------+-+ . +----+-----+ +----------+ .
| Client 1 | . | Client 2 | | Client 3 | .
+----------+ . +----------+ +----------+ .
. Member 1 Member 2 .
. .
..................................
]]></artwork>
</artset>
</figure>
</section>
</section>
<section anchor="overview-of-operation">
<name>Overview of Operation</name>
<t><xref target="fig-group-formation-example"/> shows the formation of an example
group consisting of Alice, Bob, and Charlie, with Alice
driving the creation of the group.</t>
<figure anchor="fig-group-formation-example">
<name>Group Formation Example</name>
<artset>
<artwork type="svg"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="464" width="592" viewBox="0 0 592 464" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
<path d="M 528,64 L 528,144" fill="none" stroke="black"/>
<path d="M 528,176 L 528,208" fill="none" stroke="black"/>
<path d="M 528,240 L 528,320" fill="none" stroke="black"/>
<path d="M 528,352 L 528,448" fill="none" stroke="black"/>
<path d="M 128,64 L 392,64" fill="none" stroke="black"/>
<path d="M 8,80 L 304,80" fill="none" stroke="black"/>
<path d="M 208,96 L 392,96" fill="none" stroke="black"/>
<path d="M 88,112 L 304,112" fill="none" stroke="black"/>
<path d="M 288,128 L 392,128" fill="none" stroke="black"/>
<path d="M 168,144 L 304,144" fill="none" stroke="black"/>
<path d="M 200,176 L 480,176" fill="none" stroke="black"/>
<path d="M 280,192 L 480,192" fill="none" stroke="black"/>
<path d="M 360,208 L 480,208" fill="none" stroke="black"/>
<path d="M 264,240 L 480,240" fill="none" stroke="black"/>
<path d="M 8,256 L 256,256" fill="none" stroke="black"/>
<path d="M 144,272 L 480,272" fill="none" stroke="black"/>
<path d="M 104,288 L 480,288" fill="none" stroke="black"/>
<path d="M 88,304 L 344,304" fill="none" stroke="black"/>
<path d="M 88,320 L 368,320" fill="none" stroke="black"/>
<path d="M 296,352 L 480,352" fill="none" stroke="black"/>
<path d="M 8,368 L 224,368" fill="none" stroke="black"/>
<path d="M 176,384 L 480,384" fill="none" stroke="black"/>
<path d="M 152,400 L 480,400" fill="none" stroke="black"/>
<path d="M 88,416 L 312,416" fill="none" stroke="black"/>
<path d="M 176,432 L 312,432" fill="none" stroke="black"/>
<path d="M 176,448 L 336,448" fill="none" stroke="black"/>
<polygon class="arrowhead" points="488,400 476,394.4 476,405.6" fill="black" transform="rotate(0,480,400)"/>
<polygon class="arrowhead" points="488,384 476,378.4 476,389.6" fill="black" transform="rotate(0,480,384)"/>
<polygon class="arrowhead" points="488,352 476,346.4 476,357.6" fill="black" transform="rotate(0,480,352)"/>
<polygon class="arrowhead" points="488,288 476,282.4 476,293.6" fill="black" transform="rotate(0,480,288)"/>
<polygon class="arrowhead" points="488,272 476,266.4 476,277.6" fill="black" transform="rotate(0,480,272)"/>
<polygon class="arrowhead" points="488,240 476,234.4 476,245.6" fill="black" transform="rotate(0,480,240)"/>
<polygon class="arrowhead" points="488,208 476,202.4 476,213.6" fill="black" transform="rotate(0,480,208)"/>
<polygon class="arrowhead" points="488,192 476,186.4 476,197.6" fill="black" transform="rotate(0,480,192)"/>
<polygon class="arrowhead" points="488,176 476,170.4 476,181.6" fill="black" transform="rotate(0,480,176)"/>
<polygon class="arrowhead" points="400,128 388,122.4 388,133.6" fill="black" transform="rotate(0,392,128)"/>
<polygon class="arrowhead" points="400,96 388,90.4 388,101.6" fill="black" transform="rotate(0,392,96)"/>
<polygon class="arrowhead" points="400,64 388,58.4 388,69.6" fill="black" transform="rotate(0,392,64)"/>
<polygon class="arrowhead" points="184,448 172,442.4 172,453.6" fill="black" transform="rotate(180,176,448)"/>
<polygon class="arrowhead" points="184,432 172,426.4 172,437.6" fill="black" transform="rotate(180,176,432)"/>
<polygon class="arrowhead" points="176,144 164,138.4 164,149.6" fill="black" transform="rotate(180,168,144)"/>
<polygon class="arrowhead" points="96,416 84,410.4 84,421.6" fill="black" transform="rotate(180,88,416)"/>
<polygon class="arrowhead" points="96,320 84,314.4 84,325.6" fill="black" transform="rotate(180,88,320)"/>
<polygon class="arrowhead" points="96,304 84,298.4 84,309.6" fill="black" transform="rotate(180,88,304)"/>
<polygon class="arrowhead" points="96,112 84,106.4 84,117.6" fill="black" transform="rotate(180,88,112)"/>
<polygon class="arrowhead" points="16,368 4,362.4 4,373.6" fill="black" transform="rotate(180,8,368)"/>
<polygon class="arrowhead" points="16,256 4,250.4 4,261.6" fill="black" transform="rotate(180,8,256)"/>
<polygon class="arrowhead" points="16,80 4,74.4 4,85.6" fill="black" transform="rotate(180,8,80)"/>
<g class="text">
<text x="24" y="36">Alice</text>
<text x="96" y="36">Bob</text>
<text x="192" y="36">Charlie</text>
<text x="396" y="36">AS</text>
<text x="476" y="36">DS</text>
<text x="28" y="68">Create</text>
<text x="88" y="68">account</text>
<text x="356" y="84">Credential</text>
<text x="108" y="100">Create</text>
<text x="168" y="100">account</text>
<text x="556" y="100">Step</text>
<text x="584" y="100">1</text>
<text x="356" y="116">Credential</text>
<text x="188" y="132">Create</text>
<text x="248" y="132">account</text>
<text x="356" y="148">Credential</text>
<text x="32" y="180">Initial</text>
<text x="92" y="180">Keying</text>
<text x="156" y="180">Material</text>
<text x="112" y="196">Initial</text>
<text x="172" y="196">Keying</text>
<text x="236" y="196">Material</text>
<text x="556" y="196">Step</text>
<text x="584" y="196">2</text>
<text x="192" y="212">Initial</text>
<text x="252" y="212">Keying</text>
<text x="316" y="212">Material</text>
<text x="16" y="244">Get</text>
<text x="48" y="244">Bob</text>
<text x="96" y="244">Initial</text>
<text x="156" y="244">Keying</text>
<text x="220" y="244">Material</text>
<text x="280" y="260">Bob</text>
<text x="328" y="260">Initial</text>
<text x="388" y="260">Keying</text>
<text x="452" y="260">Material</text>
<text x="16" y="276">Add</text>
<text x="48" y="276">Bob</text>
<text x="76" y="276">to</text>
<text x="112" y="276">Group</text>
<text x="556" y="276">Step</text>
<text x="584" y="276">3</text>
<text x="32" y="292">Welcome</text>
<text x="84" y="292">(Bob)</text>
<text x="368" y="308">Add</text>
<text x="400" y="308">Bob</text>
<text x="428" y="308">to</text>
<text x="464" y="308">Group</text>
<text x="408" y="324">Welcome</text>
<text x="464" y="324">(Bob)</text>
<text x="16" y="356">Get</text>
<text x="64" y="356">Charlie</text>
<text x="128" y="356">Initial</text>
<text x="188" y="356">Keying</text>
<text x="252" y="356">Material</text>
<text x="264" y="372">Charlie</text>
<text x="328" y="372">Initial</text>
<text x="388" y="372">Keying</text>
<text x="452" y="372">Material</text>
<text x="16" y="388">Add</text>
<text x="64" y="388">Charlie</text>
<text x="108" y="388">to</text>
<text x="144" y="388">Group</text>
<text x="32" y="404">Welcome</text>
<text x="104" y="404">(Charlie)</text>
<text x="556" y="404">Step</text>
<text x="584" y="404">4</text>
<text x="336" y="420">Add</text>
<text x="384" y="420">Charlie</text>
<text x="428" y="420">to</text>
<text x="464" y="420">Group</text>
<text x="336" y="436">Add</text>
<text x="384" y="436">Charlie</text>
<text x="428" y="436">to</text>
<text x="464" y="436">Group</text>
<text x="376" y="452">Welcome</text>
<text x="448" y="452">(Charlie)</text>
</g>
</svg>
</artwork>
<artwork type="ascii-art"><![CDATA[
Alice Bob Charlie AS DS
Create account ---------------------------------> |
<------------------------------------- Credential |
Create account -----------------------> | Step 1
<--------------------------- Credential |
Create account -------------> |
<----------------- Credential |
Initial Keying Material -----------------------------------> |
Initial Keying Material -------------------------> | Step 2
Initial Keying Material ---------------> |
Get Bob Initial Keying Material ---------------------------> |
<------------------------------- Bob Initial Keying Material |
Add Bob to Group ------------------------------------------> | Step 3
Welcome (Bob) ---------------------------------------------> |
<-------------------------------- Add Bob to Group |
<----------------------------------- Welcome (Bob) |
Get Charlie Initial Keying Material -----------------------> |
<--------------------------- Charlie Initial Keying Material |
Add Charlie to Group --------------------------------------> |
Welcome (Charlie) -----------------------------------------> | Step 4
<---------------------------- Add Charlie to Group |
<----------------- Add Charlie to Group |
<-------------------- Welcome (Charlie) |
]]></artwork>
</artset>
</figure>
<t>This process proceeds as follows.</t>
<section anchor="step-1-account-creation">
<name>Step 1: Account Creation</name>
<t>Alice, Bob, and Charlie create accounts with a service provider and obtain
credentials from the AS. This is a one-time setup phase.</t>
</section>
<section anchor="step-2-initial-keying-material">
<name>Step 2: Initial Keying Material</name>
<t>Alice, Bob, and Charlie authenticate to the DS and store some initial
keying material which can be used to send encrypted messages to them
for the first time. This keying material is authenticated with their
long-term credentials. Although in principle this keying material
can be reused for multiple senders, in order to provide forward secrecy
it is better for this material to be regularly refreshed so that each
sender can use a new key.</t>
</section>
<section anchor="step-3-adding-bob-to-the-group">
<name>Step 3: Adding Bob to the Group</name>
<t>When Alice wants to create a group including Bob, she first uses the DS to look
up his initial keying material. She then generates two messages:</t>
<ul spacing="normal">
<li>
<t>A message to the entire group (which at this point is just her and Bob)
that adds Bob to the group.</t>
</li>
<li>
<t>A <em>Welcome</em> message just to Bob encrypted with his initial keying material that
includes the secret keying information necessary to join the group.</t>
</li>
</ul>
<t>She sends both of these messages to the Delivery Service, which is responsible
for sending them to the appropriate people. Note that the security of MLS
does not depend on the DS forwarding the Welcome message only to Bob, as it
is encrypted for him; it is simply not necessary for other group members
to receive it.</t>
</section>
<section anchor="step-4-adding-charlie-to-the-group">
<name>Step 4: Adding Charlie to the Group</name>
<t>If Alice then wants to add Charlie to the group, she follows a similar procedure
as with Bob: She first uses the DS to look
up his initial keying material and then generates two messages:</t>
<ul spacing="normal">
<li>
<t>A message to the entire group (consisting of her, Bob, and Charlie) adding
Charlie to the group.</t>
</li>
<li>
<t>A <em>Welcome</em> message just to Charlie encrypted with his initial keying material that
includes the secret keying information necessary to join the group.</t>
</li>
</ul>
<t>At the completion of this process, we have a group with Alice, Bob, and Charlie,
which means that they share a single encryption key that can be used to
send messages or to key other protocols.
<!-- [rfced] Section 3.4: "or to key other protocols" reads oddly.
Are some words missing, or does the text indicate that other
protocols are keyed? In other words, is "key" used as a verb here?
Original:
At the completion of this process, we have a group with Alice, Bob,
and Charlie, which means that they share a single encryption key
which can be used to send messages or to key other protocols. -->
</t>
</section>
<section anchor="other-group-operations">
<name>Other Group Operations</name>
<t>Once the group has been created, clients can perform other actions,
such as:</t>
<ul spacing="normal">
<li>
<t>sending a message to everyone in the group</t>
</li>
<li>
<t>receiving a message from someone in the group</t>
</li>
<li>
<t>adding one or more clients to an existing group</t>
</li>
<li>
<t>removing one or more members from an existing group</t>
</li>
<li>
<t>updating their own key material</t>
</li>
<li>
<t>leaving a group (by asking to be removed)</t>
</li>
</ul>
<t>Importantly, MLS does not itself enforce any access control on group
operations. For instance, any member of the group can send a message
to add a new member or to evict an existing member.
This is in contrast to some designs in which there is a single group
controller who can modify the group. MLS-using applications are
responsible for setting their own access control policies. For instance,
if only the group administrator is allowed to change group members,
then it is the responsibility of the application to inform members
of this policy and who the administrator is.</t>
</section>
<section anchor="proposals-and-commits">
<name>Proposals and Commits</name>
<t>The general pattern for any change in the group state (e.g., to add or remove
a user) is that it consists of two messages:</t>
<dl>
<dt>Proposal:</dt>
<dd>
<t>This message describes the change to be made (e.g., add Bob to the group)
but does not effect a change.</t>
</dd>
<dt>Commit:</dt>
<dd>
<t>This message changes the group state to include the changes described in
a set of proposals.</t>
</dd>
</dl>
<t>The simplest pattern is for a client to just send a Commit which contains one or
more Proposals; for instance, Alice could send a Commit with the Proposal
Add(Bob) embedded to add Bob to the group. However, there are situations in
which one client might send a proposal and another might send the commit. For
instance, Bob might wish to remove himself from the group and send a Remove
Proposal to do so (see <xref section="12.1.3" sectionFormat="of" target="RFC9420"/>). Because Bob cannot send
the Commit, an existing member must do so. Commits can apply to multiple valid
Proposals, in which case all the listed changes are applied.</t>
<t>It is also possible for a Commit to apply to an empty set of Proposals,
in which case it just updates the cryptographic state of the group
without changing its membership.</t>
</section>
<section anchor="group-members">
<name>Users, Clients, and Groups</name>
<t>While it's natural to think of a messaging system as consisting of groups of
users, possibly using different devices, in MLS the basic unit of operation is
not the user but rather the "client". Formally, a client is a set of
cryptographic objects composed of public values such as a name (an identity), a
public encryption key, and a public signature key. As usual, a user demonstrates
ownership of the client by demonstrating knowledge of the associated secret
values.</t>
<t>In some messaging systems, clients belonging to the same user must all share the
same signature key pair, but MLS does not assume this; instead, a user may have
multiple clients with the same identity and different keys. In this case, each
client will have its own cryptographic state, and it is up to the application to
determine how to present this situation to users. For instance, it may render
messages to and from a given user identically regardless of which client they
are associated with, or it may choose to distinguish them.</t>
<t>When a client is part of a Group, it is called a Member. A group in MLS is
defined as the set of clients that have knowledge of the shared group secret
established in the group key establishment phase. Note that until a client has
been added to the group and contributed to the group secret in a manner
verifiable by other members of the group, other members cannot assume that the
client is a member of the group; for instance, the newly added member might not
have received the Welcome message or might not have been able to decrypt it for some reason.</t>
</section>
</section>
<section anchor="authentication-service">
<name>Authentication Service</name>
<t>The Authentication Service (AS) has to provide three services:</t>
<ol spacing="normal" type="1"><li>
<t>Issue credentials to clients that attest to bindings between identities and
signature key pairs.</t>
</li>
<li>
<t>Enable a client to verify that a credential presented by another client is
valid with respect to a reference identifier.</t>
</li>
<li>
<t>Enable a group member to verify that a credential represents the same client
as another credential.</t>
</li>
</ol>
<t>A member with a valid credential authenticates its MLS messages by signing them
with the private key corresponding to the public key bound by its credential.</t>
<t>The AS is considered an abstract layer by the MLS specification; part of this
service could be, for instance, running on the members' devices, while another
part is a separate entity entirely. The following examples illustrate the
breadth of this concept:</t>
<ul spacing="normal">
<li>
<t>A PKI could be used as an AS <xref target="RFC5280"/>. The issuance function would be
provided by the certificate authorities in the PKI, and the verification
function would correspond to certificate verification by clients.</t>
</li>
<li>
<t>Several current messaging applications rely on users verifying each other's
key fingerprints for authentication. In this scenario, the issuance function
is simply the generation of a key pair (i.e., a credential is just an
identifier and public key, with no information to assist in verification).
The verification function is the application function that enables users
to verify keys.</t>
</li>
<li>
<t>In a system based on end-user Key Transparency (KT) <xref target="CONIKS"/> <xref target="I-D.ietf-keytrans-architecture"/>, the
issuance function would correspond to the insertion of a key in a KT log under
a user's identity. The verification function would correspond to verifying a
key's inclusion in the log for a claimed identity, together with the KT log's
mechanisms for a user to monitor and control which keys are associated with
their identity.</t>
</li>
</ul>
<t>By the nature of its roles in MLS authentication, the AS is invested with a
large amount of trust and the compromise of the AS could
allow an adversary to, among other things, impersonate group members. We discuss
security considerations regarding the compromise of the different AS
functions in detail in <xref target="as-compromise"/>.</t>
<t>The association between members' identities and their signature keys is fairly
flexible in MLS. As noted above, there is no requirement that all clients
belonging to a given user have the same signature key (in fact, having duplicate
signature keys in a group is forbidden). A member can
also rotate the signature key they use within a group. These mechanisms allow
clients to use different signature keys in different contexts and at different
points in time, providing unlinkability and post-compromise security benefits.
Some security trade-offs related to this flexibility are discussed in the
security considerations.
<!-- [rfced] Section 4: Should "the security considerations" be
"Section 8" or some other section?
Original:
Some
security trade-offs related to this flexibility are discussed in the
security considerations. -->
</t>
<t>In many applications, there are multiple MLS clients that represent a single
entity -- for example, a human user with a mobile and desktop version of an
application. Often, the same set of clients is represented in exactly the same
list of groups. In applications where this is the intended situation, other
clients can check that a user is consistently represented by the same set of
clients. This would make it more difficult for a malicious AS to issue fake
credentials for a particular user because clients would expect the credential to
appear in all groups of which the user is a member. If a client credential does
not appear in all groups after some relatively short period of time, clients
have an indication that the credential might have been created without the
user's knowledge. Due to the asynchronous nature of MLS, however, there may be
transient inconsistencies in a user's client set, so correlating users' clients
across groups is more of a detection mechanism than a prevention mechanism.</t>
</section>
<section anchor="delivery-service">
<name>Delivery Service</name>
<t>The Delivery Service (DS) plays two major roles in MLS:</t>
<ul spacing="normal">
<li>
<t>As a directory service providing the initial keying material for
clients to use. This allows a client to establish a shared key and send
encrypted messages to other clients even if they're offline.</t>
</li>
<li>
<t>Routing MLS messages among clients.</t>
</li>
</ul>
<t>While MLS depends on correct behavior by the Authentication Service in
order to provide endpoint authentication and hence confidentiality of
the group key, these properties do not depend on correct behavior by
the DS; even a malicious DS cannot add itself to groups or recover
the group key. However, depending precisely on how MLS is used, the DS may
be able to determine group membership or prevent changes to the
group from taking place (e.g., by blocking group change messages).</t>
<section anchor="key-storage-and-retrieval">
<name>Key Storage and Retrieval</name>
<t>Upon joining the system, each client stores its initial cryptographic key
material with the Delivery Service. This key material, called a KeyPackage,
advertises the functional abilities of the client such as supported protocol
versions, supported extensions, and the following cryptographic information:</t>
<ul spacing="normal">
<li>
<t>A credential from the Authentication Service attesting to the binding between
the identity and the client's signature key.</t>
</li>
<li>
<t>The client's asymmetric encryption public key.</t>
</li>
</ul>
<t>All the parameters in the KeyPackage are signed with the signature
private key corresponding to the credential.
As noted in <xref target="group-members"/>, users may own multiple clients, each
with their own keying material. Each KeyPackage is specific to an MLS version
and ciphersuite, but a client may want to offer support for multiple protocol
versions and ciphersuites. As such, there may be multiple KeyPackages stored by
each user for a mix of protocol versions, ciphersuites, and end-user devices.</t>
<t>When a client wishes to establish a group or add clients to a group, it first
contacts the Delivery Service to request KeyPackages for each other client,
authenticates the KeyPackages using the signature keys, includes the KeyPackages
in Add Proposals, and encrypts the information needed to join the group
(the <em>GroupInfo</em> object) with an ephemeral key; it then separately encrypts the
ephemeral key with the <tt>init_key</tt> from each KeyPackage.
When a client requests a KeyPackage in order to add a user to a group, the
Delivery Service should provide the minimum number of KeyPackages necessary to
satisfy the request. For example, if the request specifies the MLS version, the
DS might provide one KeyPackage per supported ciphersuite, even if it has
multiple such KeyPackages to enable the corresponding client to be added to
multiple groups before needing to upload more fresh KeyPackages.
<!-- [rfced] Section 5.1: The only published RFC to date that
mentions "init_key" is Normative Reference RFC 9420. May we cite it
here for ease of the reader?
This question also applies to "epoch_authenticator" and any other
parameters mentioned in this document and defined in RFC 9420.
Alternatively, we could add this sentence to the end of the
Introduction section:
It is expected that readers are familiar with the terms used in
[RFC9420].
Original:
When a client wishes to establish a group or add clients to a group,
it first contacts the Delivery Service to request KeyPackages for
each other client, authenticates the KeyPackages using the signature
keys, includes the KeyPackages in Add Proposals, encrypts the
information needed to join the group (the _GroupInfo_ object) with an
ephemeral key, then separately encrypts the ephemeral key with the
init_key from each KeyPackage.
Suggested:
When a client wishes to establish a group or add clients to a group,
it first contacts the Delivery Service to request KeyPackages for
each other client, authenticates the KeyPackages using the signature
keys, includes the KeyPackages in Add Proposals, and encrypts the
information needed to join the group (the _GroupInfo_ object) with an
ephemeral key; it then separately encrypts the ephemeral key with
the init_key [RFC9420] from each KeyPackage. -->
</t>
<t>In order to avoid replay attacks and provide forward secrecy for messages sent
using the initial keying material, KeyPackages are intended to be used only
once. The Delivery Service is responsible for ensuring that each KeyPackage is
only used to add its client to a single group, with the possible exception of a
"last resort" KeyPackage that is specially designated by the client to be used
multiple times. Clients are responsible for providing new KeyPackages as
necessary in order to minimize the chance that the "last resort" KeyPackage will
be used.</t>
<t indent="3"><strong>RECOMMENDATION:</strong> Ensure that "last resort" KeyPackages don't get used by
provisioning enough standard KeyPackages.</t>
<t indent="3"><strong>RECOMMENDATION:</strong> Rotate "last resort" KeyPackages as soon as possible
after being used or if they have been stored for a prolonged period of time.
Overall, avoid reusing "last resort" KeyPackages as much as possible.</t>
<t indent="3"><strong>RECOMMENDATION:</strong> Ensure that the client for which a "last resort" KeyPackage
has been used is updating leaf keys as early as possible.</t>
<!-- [rfced] Sections 5.1 and subsequent: Do you think other documents may want to refer to specific recommendations in this document? We wonder whether it would be helpful to number the recommendations (e.g., Recommendation 1, or Req 1).
In addition, as <strong> is used for RECOMMENDATION, may we change this to Recommendation? The use of capitalization seems unnecessary since it's already bold.
-->
<t>Overall, it needs to be noted that key packages need to be updated when
signature keys are changed.</t>
</section>
<section anchor="delivery-guarantees">
<name>Delivery of Messages</name>
<t>The main responsibility of the Delivery Service is to ensure delivery of
messages. Some MLS messages need only be delivered to specific clients (e.g., a
Welcome message initializing a new member's state), while others need to be
delivered to all the members of a group. The Delivery Service may enable the
latter delivery pattern via unicast channels (sometimes known as "client
fanout"), broadcast channels ("server fanout"), or a mix of both.</t>
<t>For the most part, MLS does not require the Delivery Service to deliver messages
in any particular order. Applications can set policies that control their
tolerance for out-of-order messages (see <xref target="operational-requirements"/>), and
messages that arrive significantly out of order can be dropped without otherwise
affecting the protocol. There are two exceptions to this. First, Proposal
messages should all arrive before the Commit that references them. Second,
because an MLS group has a linear history of epochs, the members of the group
must agree on the order in which changes are applied. Concretely, the group
must agree on a single MLS Commit message that ends each epoch and begins the
next one.</t>
<t>In practice, there's a realistic risk of two members generating Commit messages
at the same time, based on the same epoch, and both attempting to send them to
the group at the same time. The extent to which this is a problem, and the
appropriate solution, depend on the design of the Delivery Service. Per the CAP
theorem <xref target="CAPBR"/>, there are two general classes of distributed systems that the
Delivery Service might fall into:</t>
<ul spacing="normal">
<li>
<t>Consistent and Partition-tolerant, or Strongly Consistent, systems, which can provide
a globally consistent view of data but have the inconvenience of clients needing
to handle rejected messages.</t>
</li>
<li>
<t>Available and Partition-tolerant, or Eventually Consistent, systems, which continue
working despite network issues but may return different views of data to
different users.</t>
</li>
</ul>
<t>Strategies for sequencing messages in strongly and eventually consistent systems
are described in the next two subsections. Most Delivery Services will use the
Strongly Consistent paradigm, but this remains a choice that can be handled in
coordination with the client and advertised in the KeyPackages.</t>
<t>However, note that a malicious Delivery Service could also reorder messages or
provide an inconsistent view to different users. The "generation" counter in
MLS messages provides per-sender loss detection and ordering that cannot be
manipulated by the DS, but this does not provide complete protection against
partitioning. A DS can cause a partition in the group by partitioning key
exchange messages; this can be detected only by out-of-band comparison (e.g.,
confirming that all clients have the same <tt>epoch_authenticator</tt> value). A
mechanism for more robust protections is discussed in
<xref target="I-D.ietf-mls-extensions"/>.</t>
<t>Other forms of Delivery Service misbehavior are still possible that are not easy
to detect. For instance, a Delivery Service can simply refuse to relay messages
to and from a given client. Without some sort of side information, other clients
cannot generally detect this form of Denial-of-Service (DoS) attack.</t>
<section anchor="strongly-consistent">
<name>Strongly Consistent</name>
<t>With this approach, the Delivery Service ensures that some types of incoming
messages have a linear order and all members agree on that order. The Delivery
Service is trusted to break ties when two members send a Commit message at the
same time.</t>
<t>As an example, there could be an "ordering server" Delivery Service that
broadcasts all messages received to all users and ensures that all clients see
messages in the same order. This would allow clients to only apply the first
valid Commit for an epoch and ignore subsequent Commits. Clients that send a Commit
would then wait to apply it until it is broadcast back to them by the Delivery
Service, assuming that they do not receive another Commit first.
<!-- [rfced] Sections 5.2.1 and 8.1.4: As it appears that "ones" in
these sentences refers to Commits, we changed "ones" to "Commits".
If this is incorrect, please clarify the text.
Original:
This would allow clients
to only apply the first valid Commit for an epoch and ignore
subsequent ones.
...
As discussed in Section 5, the Delivery Service is trusted to select
the single Commit message that is applied in each epoch from among
the ones sent by group members.
Currently:
This would allow clients
to only apply the first valid Commit for an epoch and ignore
subsequent Commits.
...
As discussed in Section 5, the Delivery Service is trusted to select
the single Commit message that is applied in each epoch from among
the Commits sent by group members. -->
</t>
<t>Alternatively, the Delivery Service can rely on the <tt>epoch</tt> and <tt>content_type</tt>
fields of an MLSMessage to provide an order only to handshake messages, and
possibly even filter or reject redundant Commit messages proactively to prevent
them from being broadcast. There is some risk associated with filtering; this
is discussed further in <xref target="invalid-commits"/>.</t>
</section>
<section anchor="eventually-consistent">
<name>Eventually Consistent</name>
<t>With this approach, the Delivery Service is built in a way that may be
significantly more available or performant than a strongly consistent system,
but offers weaker consistency guarantees. Messages may arrive to different
clients in different orders and with varying amounts of latency, which means
clients are responsible for reconciliation.
<!-- [rfced] Section 5.2.2: Does "offers" refer to the Delivery
Service or the way?
Original:
With this approach, the Delivery Service is built in a way that may
be significantly more available or performant than a strongly
consistent system, but offers weaker consistency guarantees.
Perhaps (the Delivery Service):
With this approach, the Delivery Service is built in a way that may
be significantly more available or performant than a strongly