Re: [MLS] AEAD data in messages

Jon Callas <> Tue, 13 August 2019 22:03 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DE6E01208C2 for <>; Tue, 13 Aug 2019 15:03:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 Rk3CfdaK4Lpg for <>; Tue, 13 Aug 2019 15:03:37 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 601511208E6 for <>; Tue, 13 Aug 2019 15:03:37 -0700 (PDT)
Received: by with SMTP id gn20so576798plb.2 for <>; Tue, 13 Aug 2019 15:03:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=QY/06HHj1MnLVpwdyyICxSlwuOCXSyvDH28p1KmSdTY=; b=HcIu3fARartHMMpWQoMN58NjeiCaSxJAJuJ/QNawmpEO6Nn6oiHfiJed1SWI3xox8i PXVo6eCEkH5VjdZqKLhwfIqQmc/lDUH/6Qg/OpGakiEQxdExJVLteodHdmZ/6GvxMRbL 4ggyvc7ihOiz1VxCaUGt4+h0nnUf1zSS91xC+9yqqvhciezsx9H6Cyx1NcGtu7LQMD0S Rfsoe0GKZzePsgIV6Wsvk+gL2V4efx7ZOpZ2QO2kG3dPot3Fxu6uC+Cg6gkLsMsiT07a 4OcuR7Up+LUFfRaoMrpJrCTCOzT66IzXYLYn+JrKMKijRCmOxeF7myeLqjfkCuNc8Ara nmpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=QY/06HHj1MnLVpwdyyICxSlwuOCXSyvDH28p1KmSdTY=; b=OJ82dQOIi6ivzufaXzYEoDxlXyqxEHheISQXnthMvgMqJLFu2oV0Re/n+CbSBp+mdY h/rtIElWQlabhxV0vtQaoRrdw2yOuwkeWZesoLzxqfxEMjea/PaIJmEt5cIVryOrJ5KD Y/i1pheK9nUtvjLAqfHnGroicYzgyc+3HXkgE/bn2JpA48vvp+Tp88VMZrryzydPHFLq 0F1eFM5udafr4luYaMBSuhffMswfGaocQiLF9OfYzzPz9wlPQ5M9ZEzEMCTCTkbnYKnN nmtlkXcAg7LzrJeXd042xEu7TpFHIxSEz9MASbErONUF542NzAN46QWvaZrTcbHXTk/b vOkg==
X-Gm-Message-State: APjAAAUwNj8JPzF4ijkz19WbhXYOS6SQWrIdJVCx8suTvPVrcbAErzX6 l7yBjN0pr4D6gm4gohSSPOLR4A==
X-Google-Smtp-Source: APXvYqy+miq2vyzxf17tFkN7R6N2KA1JOMBHabkfHSUFz1z5fD20edG/tLyKaCdASDPB/N9OGF2BPw==
X-Received: by 2002:a17:902:20ec:: with SMTP id v41mr19108264plg.117.1565733816712; Tue, 13 Aug 2019 15:03:36 -0700 (PDT)
Received: from [] ( []) by with ESMTPSA id m7sm3833124pfb.99.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Aug 2019 15:03:35 -0700 (PDT)
From: Jon Callas <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_1AFFAA80-6D4F-40B8-AB52-06575D622D67"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Tue, 13 Aug 2019 15:03:34 -0700
In-Reply-To: <>
Cc: Jon Callas <>,, Benjamin Beurdouche <>
To: Peter Slatala <>
References: <>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <>
Subject: Re: [MLS] AEAD data in messages
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: Tue, 13 Aug 2019 22:03:40 -0000

> On Aug 12, 2019, at 4:15 PM, Peter Slatala <> wrote:
> Hello!
> I was wondering if you considered allowing additional plaintext but authenticated data in MLS messages.

I have a small raised eyebrow about this. Similar to rlb's comment, it's not hard.

My primary concern is that any AAD in the message is ripe for putting in things that are side-channel or traffic analysis leaks. I have a secondary concern that if one uses this to talk to the delivery service, it's unauthenticated from the service's viewpoint, and consequently creates an opportunity for an attacker to fuzz the delivery service. Moreover that attacker could be a legitimate user of the service.

I note that you said, "Delivery service is often TLS encrypted so client-server connection should be secure" in follow-on discussion, but that's in my opinion a reason *not* to have this feature. That's either a layering violation or you could achieve the same effect by just sending an unauthenticated message to the service that is protected by TLS. By putting a server message in the AAD of an AEAD message, 

> While I can't think of immediate, compelling use cases right now,

That strikes me as a reason *not* to do it, but again, along with rlb, I'm willing to look at a proposal. Note that my concerns here suggest things you should address in that proposal.

> I am wondering if such extensibility wouldn't be desired. For example, in encrypted video calls, resolution, framerate, or audio volume can be put in plaintext so that the selective forwarding unit can decide which streams to forward to the group members (and the recipient also uses this data)..

Here's a sample attack. In this, Alice and Bob are communicating over the service and Harry the Hacker has compromised the router nearest Alice and thus can see or modify all messages. Harry modifies one of Alice's messages, changing the volume field to maximum volume. The server acts on the changed volume, but Bob drops the message, because the MAC fails. If the message gets retransmitted, Harry doesn't change the volume. Alice and Bob likely see the volume of the call going to max for no readily understandable reason. As you note, using TLS is a quick mitigation.

Another attack uses Gary the Griefer instead of Harry. Gary is an authenticated used of the service and is in a session with Alice and Bob. Gary does exactly what Harry did above -- send a message that the server will act on, setting the volume to max -- but knows that this message will dropped by Alice and Bob.

I believe that if someone wants to send a command to the service, then it shouldn't be piggybacked inside the normal messages, but that there needs to be a separate edge-to-service key and command set.

> Here are some use-cases for MLS that I can think of:
> * sending a 'sending device identifier' in case if delivery service can't differentiate different user devices from each other. 

This is a traffic-analysis data leak.

> * sending 'message type' that server can act upon. For example, delivery report sent by the recipient to the sender, which also acts as an ACK to the server that the message was persisted.

Again, this should be done under the aegis of an edge-to-service key.

> * authenticating message id (but make it visible to server to avoid redelivery),

That's also an information leak.

> * other use cases that I can't think of right now.

I have one more that's perhaps at least mildly paranoid and perhaps not entirely fair.

* sending information needed for "exceptional access" such as the GCHQ Ghost User proposal. This could put in trap/trace data, copies of the messages encrypted to access keys, etc. 

That's not fair because if we presume government-compelled software mods, they could mandate a lot of things. However, this provides a mechanism that could enable a single gimmicked client to undermine the security of the whole system transparently. This would really be true of the plaintext AAD was typically ignored by the client. Preventing this is thorny, because it would require defining what the syntax of the AAD is, and mandating some dramatic failure if unknown AAD is present.

Despite this, I'd love to see a proposal. It could be useful. It could also be a major flaw, and this is why I would like to see a real use case as well as mitigations against abuse in the proposal.