Re: [MLS] High-level Questions and Clarifications
Michael Rosenberg <micro@fastmail.com> Wed, 23 January 2019 20:32 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 6A468130EF9 for <mls@ietfa.amsl.com>; Wed, 23 Jan 2019 12:32:44 -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=NKhmxxjB; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=tPWAzllo
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 MT_BniW70Jml for <mls@ietfa.amsl.com>; Wed, 23 Jan 2019 12:32:42 -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 E072A130EF7 for <mls@ietf.org>; Wed, 23 Jan 2019 12:32:41 -0800 (PST)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id DC5F0231B2; Wed, 23 Jan 2019 15:32:40 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 23 Jan 2019 15:32:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=X ggnhc+w42oG6WAImxaMtbriXGRvHcl2qnEdFG2M134=; b=NKhmxxjBnEqj1Ywx6 7Fb3fXGtODr9Qp92JaYn6+Y3ckat58RD9/OULQ69w5975m+SActah6AOwSlIISaZ eCpkYG86IU4hZqbNfq6UyYNW8EfmjFJAVe+7FHFsi+uG0PBk9Ok01SbWQ9Ow0FBS ZOb6G5gR1ViwEsYXUWPpNR0MJgkO2OZf2v9HsZTZmnGksfrP939mQhIMMLWZa3MI OZAgGZXq2aWap1nFYLMDJjvnG2Pi/jPvzyk7ZHfjU4iTth1NC5H6U7UDmv9zgLcf 9/xU7goyKtiMyvaU2CqgqV//IJFwbDDOb2zACqSecWFvjeNt/jiQmI8jcJzbXLfc Qt3ug==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Xggnhc+w42oG6WAImxaMtbriXGRvHcl2qnEdFG2M1 34=; b=tPWAzlloZw55uUXv23UFD90PHwSHJaP8SdfHC3H5w4onPGsmh5l0cLcRJ nFNx+qJadwK77mvVdEMI5XTrPWqAGRfzx5hB4V/QsTNGv6HAPFn0/ZpfauHXU2f/ x9e+wOBv8Xwm54GRJqVJcCyy2+ym24qpQtNMq2+nZkUwVYvlwAXbbkNaw3AtFY6T e3p27GTMRos4+St4+Hv7Snpc2c48+StoPRV/Xp8CpLxmEnn9BjPYr0R5P/swNCD9 xAEz2yrsv0bdv1Na2a4vuWDGFUL060jAlvgtY+H/LCvo66MJ6W0PUPrE0dGwo0XO /JzDMp4pxHC+EhCwdT7MxWpNJ+UuQ==
X-ME-Sender: <xms:aM9IXO5YEUBH7dsyGWU7a6YWls1T1ctJG7mWJGIiy8SqZ8obNJuFUw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledriedtgddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtvdenucfhrhhomh epofhitghhrggvlhcutfhoshgvnhgsvghrghcuoehmihgtrhhosehfrghsthhmrghilhdr tghomheqnecuffhomhgrihhnpehirggtrhdrohhrghenucfkphepieejrdduleegrdduge drvdehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgtrhhosehfrghsthhmrghilhdr tghomhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:aM9IXFBuxnH9Og6TUpmjBQncHgbNn7fBVxEB_6CGSwKYnXELyjdYVw> <xmx:aM9IXMcxVc4aGH_p4uFGwtc-9UgTA4IyPMYYrI2xivFx1penMpZHkg> <xmx:aM9IXMJDrDCCJCf73y4i9roR1BqFu1PUnAlzivdDNWIMq9Uju7qskw> <xmx:aM9IXAga0tVWM6nNx8EudD0h90C3cIqPHHDS7nKzm-LlnPms8TqUAQ>
Received: from [67.194.14.25] (unknown [67.194.14.25]) by mail.messagingengine.com (Postfix) with ESMTPA id BFDA3E4744; Wed, 23 Jan 2019 15:32:39 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
From: Michael Rosenberg <micro@fastmail.com>
In-Reply-To: <CAL02cgS2S14W4Wbgn+bgEdsyLBcnCrAALGS9Lp5Aze3pcMp+hA@mail.gmail.com>
Date: Wed, 23 Jan 2019 15:32:39 -0500
Cc: Messaging Layer Security WG <mls@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FA393EFC-6B59-41AA-A9A4-4CCBB2F0B733@fastmail.com>
References: <E68E6521-047B-4E30-9971-9D132D093D9D@fastmail.com> <CAL02cgS2S14W4Wbgn+bgEdsyLBcnCrAALGS9Lp5Aze3pcMp+hA@mail.gmail.com>
To: Richard Barnes <rlb@ipv.sx>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/3GY9i0r8D-3Jdx4arIcke5Cw9jM>
Subject: Re: [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 20:32:44 -0000
Many thanks for the quick response. This clears up a few things. I have some inline responses and follow-ups. > On Jan 23, 2019, at 11:27 AM, Richard Barnes <rlb@ipv.sx> wrote: > >> 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? > > We could probably just replace these with "DH group" in general. Post-quantum is no longer tinfoil hat territory. I think a few WG participants have been thinking about what it would look like to plug in PQ primitives. But I think "DH group" would still cover things like CSIDH (but *not* SIDH IIUC). > > The real question is whether we can get move from DH to a general KEM construction, which would allow us even more choice in PQ primitives. I think the primitive we're looking for might be a "2 part key agreement protocol with perfect forward secrecy" but I can't find much literature on this after a cursory check. Besides DH, ECDH, CSIDH, and SIDH there are some pairing-based constructions (https://eprint.iacr.org/2006/199.pdf has a review of a few such schemes). >> 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. > > Poor entropy could be a concern, but TBH, I'm not sure how much we can do about it. We could, for example, require the leaf secret fold in some value that likely has better entropy, e.g., new_leaf = KDF(salt=prior_leaf, ikm=prior_epoch_secret). But from the perspective of the rest of the group, that's indistinguishable from the leaf holder just picking a random value. Right, but even picking a static salt for each Group could at least cover the case of precomputation attacks against node public keys, no? >> 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? > > There is one ciphersuite for the whole group, which is communicated to new members in Welcome.cipher_suite. I wouldn't be surprised if this were unclear, though, so suggestions for how to clarify would be welcome. Oh, this changes a lot. I didn't realize that. I'll try to understand how this actually works and make a PR at some point. >> 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. > > The GroupState struct is defined in Section 5.7 (page 18). Since we're using the TLS struct syntax, the definition of a struct defines its serialization. Gotcha. This was confusing for me. The architecture spec explicitly states that MLS does not have a canonical wire encoding, but I now see that that is different from having an internal serialization format. I might submit a PR that makes this clearer, because the spec currently only says that the TLS syntax is used, and nothing more. >> 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. > > As above, the new joiner needs to know the ciphersuite for the group. But also, each UserInitKey can contain init keys for multiple ciphersuites, so the recipient of the Welcome needs to know which one to use to decrypt. I'm still confused. What happens if I specify some Welcome.cipher_suite and then pick the user_init_key_id such that the UserInitKey.cipher_suites_[user_init_key_id] does not agree with the Welcome.cipher_suite? Isn't this a conflict? >> 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? > > In general, this seems like it's a layer up from what this document is specifying. For example, it's perfectly plausible that you could receive two welcomes with the same group_id and just initialize two different sessions that work just fine. That said, we should be clear that that's the case -- if applications want group IDs to be unique, they need to enforce that. > > We don't have any mechanism right now for authenticating the information in a Welcome. You would basically need a way to authenticate a GroupState object as a valid state of the group. Suggestions welcome. > > Of course, if we can't authenticate the information in a Welcome, we should describe the risks in the Security Considerations. Suggestions also welcome here :) Fair enough. It seems state synchronization is going to be one of the biggest hurdles to overcome. Unfortunately I don't have much experience in designing distributed systems. >> 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)? > > No, it's a signature, not a MAC. As I understand it, the sender: > > - Constructs a MLSSignatureContent struct with the (plaintext) content and the various indicators of the key being used > - Serializes that struct > - Signs the serialized struct with its identity key (corresponding to its entry in the group's roster) > > That text is due to Benjamin Beurdouche; he might have further corrections. Ah, I forgot that the identity key exists. It doesn't appear that any signature algorithm is specified anywhere. I suppose that's for some time in the future, though. The OPEN ISSUE in 10.2 makes a good case for waiting to see which guarantees we want to support. -Michael
- [MLS] High-level Questions and Clarifications Michael Rosenberg
- Re: [MLS] High-level Questions and Clarifications Richard Barnes
- Re: [MLS] High-level Questions and Clarifications Michael Rosenberg