Re: [MLS] MLSPlaintext packets aren't authenticated using symmetric key schedule

Cornelissen Eric <> Wed, 19 August 2020 08:17 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AFA093A1117 for <>; Wed, 19 Aug 2020 01:17:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.086
X-Spam-Status: No, score=-2.086 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id KuDUOrpOvAzJ for <>; Wed, 19 Aug 2020 01:17:53 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 2F3CE3A111B for <>; Wed, 19 Aug 2020 01:17:50 -0700 (PDT)
Received: from (localhost.localdomain []) by localhost (Email Security Appliance) with SMTP id 59248271636_F3CE029B; Wed, 19 Aug 2020 08:17:45 +0000 (GMT)
Received: from ( []) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (Client CN "", Issuer " RootCA" (not verified)) by (Sophos Email Appliance) with ESMTPS id C632F271653_F3CE028F; Wed, 19 Aug 2020 08:17:44 +0000 (GMT)
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 19 Aug 2020 11:17:44 +0300
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 19 Aug 2020 11:17:44 +0300
Received: from ([fe80::4047:1ae:cfdf:c1a8]) by ([fe80::4047:1ae:cfdf:c1a8%18]) with mapi id 15.01.1979.003; Wed, 19 Aug 2020 11:17:44 +0300
From: Cornelissen Eric <>
To: Richard Barnes <>, Raphael Robert <>
CC: Joel Alwen <>, Messaging Layer Security WG <>
Thread-Topic: [MLS] MLSPlaintext packets aren't authenticated using symmetric key schedule
Thread-Index: AQHWdXrucaCL3fuq50uSJkTFSJfo5ak/Fzvd
Date: Wed, 19 Aug 2020 08:17:44 +0000
Message-ID: <>
References: <> <>, <>
In-Reply-To: <>
Accept-Language: en-US, fi-FI
Content-Language: en-US
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_19861857231648008e6c280815c86546aaltofi_"
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h=from:to:cc:subject:date:message-id:references:in-reply-to:content-type:mime-version; s=its18; bh=lo7lt9YBAMXPJgV7KO54bgid16f8tnc3l0d8hGESm58=; b=e4WRnUoqdCyBCK3S+3dLhrEP4yb+0Fl0l09zqhXwEaFqW0RfqTqEtg0e0bfIswFFItGz6iDMEdnU1z6cwfc6WXHXeJmlp+HWggpJ/VrCl24prQ+0yftt4Wg+EAdm7DkdmWNO6+hjqUoLIfrGZkAgNoINXphWfxjH+FA7CL//Qr/SoHP4eu6Ulr1H0hY1D7+ejFxDqCsHEjCmNGyUDNHik6uW7NOOQxR4WvFYk418vVMO68+jrpJuGycjTXa95WULxzcCelwmr/HmbwEuCVxHditu3KE0agIXxa2Pk5TRLjmR9f7N7GZBt7PjTtIWvwLq2/jf8GSOU49Fc6YYSTeDfw==
Archived-At: <>
Subject: Re: [MLS] MLSPlaintext packets aren't authenticated using symmetric key schedule
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Messaging Layer Security <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 19 Aug 2020 08:17:56 -0000

I was wondering what the implications are of using the key advertised in an update Proposal's KeyPackage for signing, instead of the long-term key pair, just like new_member external proposals<>ls>. I'm confident it prevents the original weakness pointed out by Joël, but I'm unsure as to whether or not it introduces any new problems.

Then again, I would be very much in favor of including something group-binding in handshake messages as it would prevent some replay attacks (*) that I have been considering for a while.



(*): Replays from adversarially controlled groups where the attacker managed to have the group id, epoch, and tree structure to match those of a target group.

From: Richard Barnes <>
Sent: Tuesday, August 18, 2020 6:26 PM
To: Raphael Robert
Cc: Joel Alwen; Messaging Layer Security WG
Subject: Re: [MLS] MLSPlaintext packets aren't authenticated using symmetric key schedule

Thanks for pointing this out, Joël.  I agree that the attacks you're describing should work as things are currently specified.  And they're salient, especially the "replace Alice in the group" one.

Also agree with Raphael is correct that Commit is not affected by this, since someone who is not a member won't be able to generate the right confirmation value.  However, I don't think this is actually the right design to adopt for a general solution to this problem.  Confirmation verifies group membership *after* processing the handshake message; the point here is that we should also have a membership check *before* processing handshake messages.  In particular, I would propose that we do need something additional on Commit messages as well as Proposals.

Thinking about solutions here, a couple of options come to mind:

1. Use MLSCiphertext, but with an integrity-only encapsulation
2. Incorporate in the signature something that is only known to the group (e.g., confirmation_key or MAC(confirmation_key; confirmed_transcript_hash || Proposal/Commit))

Option (1) has the appeal that you would only ever send MLSCiphertext, though switching between encrypted/not could be problematic.  Option (2) seems a lot more appealing: It doesn't add any overhead, since the group-secret value doesn't need to be sent.  And we already switch between the signature context that is added for group members vs. external.  In fact, I think option (2) would just amount to a one-line change to include an extra, secret value in the context at the top of the MLSPlaintextTBS struct.

mls-protocol/ at master · mlswg/mls-protocol · GitHub<>
MLS protocol. Contribute to mlswg/mls-protocol development by creating an account on GitHub.

The only thing that seems odd about (2) is overloading signature verification in that way, i.e., using the ability to generate a signature over a secret thing to prove you know the secret thing.  That doesn't seem obviously flawed to me, but worth thinking about.

Does that make sense to folks?


On Tue, Aug 18, 2020 at 10:55 AM Raphael Robert <<>> wrote:
Hi Joel,

For context: this would only apply when applications use cleartext MLSPlaintext for HS messages. The recommendation is still to encrypt them and send them around as MLSCiphertext.
That being said, we said we would like to support scenarios where HS messages are not necessarily encrypted.

Question: would this attack work with Commit messages? I’m thinking that they would be rejected because the attacker cannot compute the confirmation_tag.

As you mention in the PS, the easy target would be Proposal messages.

I’d be interested to see what exactly you would propose as a mitigation mechanism.


> On 18 Aug 2020, at 16:36, Joel Alwen <<>> wrote:
> Hey everyone,
> Something thats been bugging Marta Mularczyk and Daniel Jost and me for a bit
> now is that handshake messages sent out as MLSPlaintext packets are only
> authenticated using signatures, but not using the group's key schedule. For
> non-members that makes sense but for group members that's weaker than need be.
> Suppose Alice is in a group using signing key pair (spk, ssk). I corrupt her to
> learn ssk. Now I loose access to her device again. Later she generates a fresh
> key package with her same spk but a new HPKE key for her leaf. She sends out and
> update proposal for her new key package and someone commits to the update.
> Expected result: she (and the group at large) has achieved PCS again.
> Actual result: using her stolen ssk I can still forge a new proposal's (sent as
> MLSPlaintext packets) coming from Alice. Some things I could do with this power:
> - I can generate a new key package kp for Alice using her spk and some HPKE key
> she doesn't know. Then I forge an update proposal for Alice with kp. If it gets
> committed I've effectively kicked her out of the group.
> - I could forge Add's and Remove's coming from Alice, so I could trick the
> group into thinking Alice is trying to Add my account to the group or remove
> some other group member.
> Lemme know if I've missed something here in that scenario...
> If I didn't miss anything and the attacks really work as advertised then IMO
> this is kinda weak sauce and worth avoiding if possible. So to that end, how
> about we modify MLS such that MLSPlaintext packets coming from group members
> must also be authenticated using something from the application key schedule.
> Now the above attacks fail. As soon as Alice's update is gets committed I no
> longer know the group's key schedule and so can't forged packet from Alice. More
> generally, this brings the PCS guarantees when using MLSPlaintexts frameing in
> line with what we're getting from MLSCiphertext packets.
> Any thoughts?
> - Joël
> PS. For concreteness, we could probably extend the current mechanism for getting
> concistancy (the confirmation_tag) to also provide symmetric key authentication.
> E.g. include most of the MLSPlaintext content into whats being tagged by
> confirmation_tag. That would cover the case of a commit packet and doesn't even
> grow the size of MLSPlaintext packets over the current design.
> For a proposal packet we could also have a confirmation_tag but this one is
> computed using the *current* epoch's confirmation_key and confirmed_transcript_hash.
> _______________________________________________
> MLS mailing list

MLS mailing list<>