[MLS] High-level Questions and Clarifications

Michael Rosenberg <micro@fastmail.com> Wed, 23 January 2019 06:22 UTC

Return-Path: <micro@fastmail.com>
X-Original-To: mls@ietfa.amsl.com
Delivered-To: mls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BBD7E12D4EF for <mls@ietfa.amsl.com>; Tue, 22 Jan 2019 22:22:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmail.com header.b=DOOChqNk; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=XzQdbS4S
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9xBqRgoKvbDd for <mls@ietfa.amsl.com>; Tue, 22 Jan 2019 22:22:26 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A27D7127133 for <mls@ietf.org>; Tue, 22 Jan 2019 22:22:26 -0800 (PST)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B005722101; Wed, 23 Jan 2019 01:22:25 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 23 Jan 2019 01:22:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:content-type:content-transfer-encoding:mime-version:date :subject:message-id:to; s=fm1; bh=JSj4Sh8Bwrcu5/LlFiVVEy7WXpPxbC K6yvO1lnj7Hic=; b=DOOChqNkuuZ6PPtF0JUxE7eUVg01186UrlSRL/2beM8+2d xs8dfER2YqGp/1Do1yJ02xIvwm4PA8vgd/T8Wlq5qd8n3NduCcyeTLHP4WHg0TQS KW8jZo08TkoeVLqK2pSmKUqMpm3om6GjI4ICs5evUnCBGz2DD/p/GQFwKgDRzpAD 9mWuy6uGSl0x6+bmS1Zi7ixg9aBbk7PZABzQmOClTQVyojWlGTfTFKsgY7D+CM9z BkupGdGydCJrFaVcbDcNlLB6yewGoADKcPomzKoRXdiUM96eHqde+n46leweseND PaqvfTlgE5EgX5CRwXgJv7hmcVIr6swCKnoO4dQA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=JSj4Sh 8Bwrcu5/LlFiVVEy7WXpPxbCK6yvO1lnj7Hic=; b=XzQdbS4S+9vhFf0LoqPLck +4UQ3fBoj99TTH3lbphbvQIWSbfoWjhlqZ9hWPNgBaycQbwSFsANR3Y/DydJfIPz hIQ6zT1Jr8/EgjkASga/Ua3ZmLvbDArnlLWtpCaWPL4U9mA6eIAQjsfIHKwyowq3 Fj44dVCmKVKEC2odkMMMcNPeHLnlLIWo0HsQwpefEUPez1tbb3PvEWeEJbXAIvwf wF6aJUiuCTOhscmB9XZvHdTDBfzkw1mb/vXra4SdsfkTz0qlVRgrm9wnzduaioLe NJJOjPYlN3TLElIEOiLKZ9biyBg424IqbqsDJWWjozOYq4eJbIvMxqO7dtC9envg ==
X-ME-Sender: <xms:IQhIXChsYMwY1gFTOWSJN4YspImEVs-mNs6Hw7Pa2oLFeO54Il3CYA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheelgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpefhtgfgggffuffkvffosehtqhhmtdhhtddvnecuhfhrohhmpefoih gthhgrvghlucftohhsvghnsggvrhhguceomhhitghrohesfhgrshhtmhgrihhlrdgtohhm qeenucfkphepleeirdeggedrvdekrddufeeknecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmihgtrhhosehfrghsthhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:IQhIXJCcreOpu_BchWstatoqSy256t3Dp_MmW6MWSs229j-nD5k-xw> <xmx:IQhIXHv_nVQVw8aCSryIl6e_f1r5uwnDavORPkSq0MfdpanLcUh4iw> <xmx:IQhIXGaSDFKxzSrEF8GCDO5eXDVtDjXIfs_JU3p0bC9rtzxgkIFQMA> <xmx:IQhIXCfD3xIb1LrGtoW212KNGziNt46DOd4bMuN8EZAMvmErO1SUEA>
Received: from [100.64.7.182] (unknown [96.44.28.138]) by mail.messagingengine.com (Postfix) with ESMTPA id D5F391030D; Wed, 23 Jan 2019 01:22:24 -0500 (EST)
From: Michael Rosenberg <micro@fastmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Date: Wed, 23 Jan 2019 01:22:17 -0500
Message-Id: <E68E6521-047B-4E30-9971-9D132D093D9D@fastmail.com>
To: mls@ietf.org
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/tRjedUqTQ9qTrd_ZWK69hwxdRmc>
Subject: [MLS] High-level Questions and Clarifications
X-BeenThere: mls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Messaging Layer Security <mls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mls>, <mailto:mls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mls/>
List-Post: <mailto:mls@ietf.org>
List-Help: <mailto:mls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mls>, <mailto:mls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Jan 2019 07:52:36 -0000

Hey all, I'm just getting involved with MLS and everyone has been super helpful with onboarding and reviewing stuff, and I'm really grateful for it. I've been trying to do a close reading of protocol spec and these are the last of the questions that didn't fall under a previous PR or Github issue. Some of these questions, if nontrivial, might be better if split out into threads of their own. And of course, feel free to answer whichever subset of these questions you wish. Also, I hope to use what I do understand so far to begin building out a new Rust implementation of the protocol soon.

The following page numbers are from the PDF version of protocol draft #3.

Page 8
======
The sample exchange depicted here shows Add being sent before Welcome. But section 7.2 seems to indicate that Welcome messages have to come first. Does the order matter? I though it did, since Welcome messages are necessary to set the new participant up with the current GroupState so everyone's on the same page after the subsequent Add.

Pages 11,15
===========
The wording "A Diffie-Hellman finite-field group or elliptic curve" that appears twice feels awkward (specifically, I think it should say "finite-field multiplicative group") but more importantly, it's unclear if implementations MUST, SHOULD or, MAY use these mathematical objects for DHE. Further, [clicks in chinstrap on tinfoil hat] could this reasonably be loosened to allow for ciphersuites with quantum-resistant DH-like algorithms such as SIDH?

Page 12
=======
This may not be a well-founded concern, but it might be desirable that the Hash that's used iteratively to derive node secrets on the ratchet tree be keyed (or salted) with tree-specific information. One could imagine if participant D had poor enough entropy and an attacker had done a good amount of precomputation of Hash, the attacker could derive D from Hash(D). Then the attacker could go and do the same thing in another group with another participant with poor entropy without having to do any more precomputation.

Page 20
=======
Which AEAD and DH algorithms are supposed to be used for sending a node's secret to a leaf in the resolution of the copath? Suppose A and B are siblings and that they have different ciphersuite preferences. How does B compute the shared secret AB in order to encrypt new entropy for A?

Another related general question: There are cases when only a single party fails an operation, and it's not immediately clear what the procedure is to handle these. For example, a DirectPath in an Update operation could be filled with all correct ECIESCiphertexts except one, whose contents is random garbage. Then only a Participant with knowledge of the corresponding node secret would be able to tell that there was an invalid ciphertext in the bunch. The rest would be unable to see this, and furthermore, it's unclear how the affected Participant would even prove that it was invalid without having to reveal the node secret to the rest of the Group. How should the protocol handle this?

Page 21
=======
Derive-Secret is a function of HkdfLabel, which in turn contains a GroupState. But the serialization format of the GroupState is not specified anywhere. Am I missing something? This probably should not be implementation-defined, since it is fundamental to agreeing on internal state.

Page 26
=======
Why is cipher_suite in Welcome? Each init key corresponds to a unique cipher suite, so the sender and recipient already know the cipher suite they need to use.

Page 27
=======
What happens when you get two Welcomes? Could you arbitrarily send a Welcome to a person and DoS them from the group by forcing them to update their state to something wrong?

Page 35
=======
How exactly are the message signatures calculated? Does it mean the 16-byte tag at the end of the AES-GCM ciphertext? How does this generalize for AEADs with non-detachable signatures like AES-CCM (which is a mac-then-encrypt construction)?