@@ -137,6 +137,12 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
137137[RFC2119] [RFC8174] when, and only when, they appear in all capitals, as
138138shown here.
139139
140+ Unless stated otherwise, every base64 encoded value this document,
141+ including MLS wire-format messages, KeyPackages, `group_id` values, and
142+ wrapped keys, is encoded using base64url (the URL- and filename-safe
143+ alphabet defined in [RFC4648], Section 5) with padding omitted. A
144+ decoder MUST accept such a value whether or not padding is present.
145+
140146This document uses terminology from [OCM] and [RFC9420]. Additional
141147definitions :
142148
@@ -402,8 +408,8 @@ Response:
402408 " keyPackages " : [
403409 {
404410 " mediaType " : " message/mls" ,
405- " encoding " : " base64 " ,
406- " content " : " <base64 -encoded MLS KeyPackage>"
411+ " encoding " : " base64url " ,
412+ " content " : " <base64url -encoded MLS KeyPackage>"
407413 }
408414 ]
409415}
@@ -671,7 +677,7 @@ that requirement: `providerId` is REQUIRED only for notification types
671677that refer to a Share, and the MLS notification types omit it. All
672678MLS-specific parameters are carried inside the `notification` object
673679that [OCM] provides for type-specific parameters. The `mlsGroupId`
674- field carries the base64 -encoded MLS `group_id` as advisory routing
680+ field carries the base64url -encoded MLS `group_id` as advisory routing
675681information, used to dispatch the message to the right group state
676682without parsing the MLS message; the authoritative `group_id` is the one
677683inside the MLS message itself, and a mismatch between the two MUST be
@@ -704,9 +710,9 @@ added user.
704710{
705711 " notificationType " : " MLS_WELCOME" ,
706712 " notification " : {
707- " mlsGroupId " : " <base64 MLS group ID>" ,
713+ " mlsGroupId " : " <base64url MLS group ID>" ,
708714 " userId " : " bob@othercloud.example.org" ,
709- " content " : " <base64 MLS Welcome wire format>"
715+ " content " : " <base64url MLS Welcome wire format>"
710716 }
711717}
712718~~~
@@ -744,8 +750,8 @@ act on it.
744750{
745751 " notificationType " : " MLS_PROPOSAL" ,
746752 " notification " : {
747- " mlsGroupId " : " <base64 MLS group ID>" ,
748- " content " : " <base64 MLS PublicMessage carrying the Proposal>"
753+ " mlsGroupId " : " <base64url MLS group ID>" ,
754+ " content " : " <base64url MLS PublicMessage carrying the Proposal>"
749755 }
750756}
751757~~~
@@ -772,9 +778,9 @@ data, per [RFC9420] Section 15.2.
772778{
773779 " notificationType " : " MLS_COMMIT" ,
774780 " notification " : {
775- " mlsGroupId " : " <base64 MLS group ID>" ,
776- " proposals " : ["<base64 MLS PublicMessage carrying a Proposal>"],
777- " content " : " <base64 MLS PublicMessage carrying the Commit>"
781+ " mlsGroupId " : " <base64url MLS group ID>" ,
782+ " proposals " : ["<base64url MLS PublicMessage carrying a Proposal>"],
783+ " content " : " <base64url MLS PublicMessage carrying the Commit>"
778784 }
779785}
780786~~~
@@ -818,8 +824,8 @@ epoch ([RFC9420] Section 15).
818824{
819825 " notificationType " : " MLS_APPLICATION" ,
820826 " notification " : {
821- " mlsGroupId " : " <base64 MLS group ID>" ,
822- " content " : " <base64 MLS PrivateMessage wire format>"
827+ " mlsGroupId " : " <base64url MLS group ID>" ,
828+ " content " : " <base64url MLS PrivateMessage wire format>"
823829 }
824830}
825831~~~
@@ -859,13 +865,13 @@ by the KeyPackage endpoint.
859865{
860866 " notificationType " : " MLS_REJOIN" ,
861867 " notification " : {
862- " mlsGroupId " : " <base64 MLS group ID>" ,
868+ " mlsGroupId " : " <base64url MLS group ID>" ,
863869 " keyPackages " : [
864870 {
865871 " userId " : " bob@othercloud.example.org" ,
866872 " mediaType " : " message/mls" ,
867- " encoding " : " base64 " ,
868- " content " : " <base64 -encoded MLS KeyPackage>"
873+ " encoding " : " base64url " ,
874+ " content " : " <base64url -encoded MLS KeyPackage>"
869875 }
870876 ]
871877 }
@@ -1169,7 +1175,7 @@ array, and MAY also carry a `credentials` array ({{credential-update}}):
11691175 {
11701176 " resourceId " : " 3a02538b-aa54-42f2-8853-a38996e211b1" ,
11711177 " groupId " : " research-group@receiver.example.org" ,
1172- " wrappedKey " : " <base64 nonce || wrapped_file_key || tag>"
1178+ " wrappedKey " : " <base64url nonce || wrapped_file_key || tag>"
11731179 }
11741180 ]
11751181}
@@ -1916,6 +1922,10 @@ Work in Progress, Internet-Draft.
19161922Requirement Levels](https://datatracker.ietf.org/doc/html/rfc2119)",
19171923March 1997.
19181924
1925+ [RFC4648] Josefsson, S. "[The Base16, Base32, and Base64 Data
1926+ Encodings](https://datatracker.ietf.org/doc/html/rfc4648)", October
1927+ 2006.
1928+
19191929[RFC7517] Jones, M., "[JSON Web Key
19201930(JWK)](https://datatracker.ietf.org/doc/html/rfc7517)", May 2015.
19211931
0 commit comments