Re: [MLS] Message Protection

"Katriel Cohn-Gordon" <me@katriel.co.uk> Thu, 28 June 2018 15:12 UTC

Return-Path: <me@katriel.co.uk>
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 6FD67130DC8 for <mls@ietfa.amsl.com>; Thu, 28 Jun 2018 08:12:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.679
X-Spam-Level:
X-Spam-Status: No, score=-1.679 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=katriel.co.uk header.b=bMOxrULB; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=hUT6Dvij
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 yz_BtrHTYxsn for <mls@ietfa.amsl.com>; Thu, 28 Jun 2018 08:12:01 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3C357130FF9 for <mls@ietf.org>; Thu, 28 Jun 2018 08:12:01 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 79ABF21D26; Thu, 28 Jun 2018 11:12:00 -0400 (EDT)
Received: from web3 ([10.202.2.213]) by compute6.internal (MEProxy); Thu, 28 Jun 2018 11:12:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=katriel.co.uk; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=gArDLShQBKKxqS LGOClye3NTwCzjEY2llGYXd180VwQ=; b=bMOxrULBMl8DgB8/M+SuO4aSv9ksam hprrZ0quheYpkHzDA7uwyihUQDIcJiLjmUGK4GIjpHUJZ13figj0vwxZTqwCKMn1 xniOTtoAfO2TL9SaQF+sJ0WrPskX1s8KTxU3PcIKf+wLeV0KO7EFPaxVIf6Fl+Sa XjUSTXRoyf5y8=
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:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=gArDLShQB KKxqSLGOClye3NTwCzjEY2llGYXd180VwQ=; b=hUT6Dvijc1/LqO+bYiK3P2FVp /DRcmJhoZw1DLd3mVBLiqBfypbyQ/C++3bGRTUzmKy90wN1ZKxDMOGTntv8CdvdD pyQRay+h2FOhMQS3xxs+1OAaTwT66iW4MgDtTAAB9IPRjGJC6dOtPFcWsdddpPSl GL9iiqjhER5d0c1blCFxRuWz2pV3ay7s99kWOzvfg+ccLqTx6qN+V6EuBtN2bwwh HsRIrcmS4cLwrrZfMHID2NPIqpisZsbHZvyfz2exAPWzJlz0KR6W5vh3xV/QtWaD 75oAJhfZ0veNfPYaTg+wTdU3i8DMV7P2RVdEW/pstwgAyXcFtB9OsWYKrMKKQ==
X-ME-Proxy: <xmx:v_o0W4XoVfOQyps6Qjs8-s5iIxjtKuuy4_7un3mih-eVGFPLvy311g> <xmx:v_o0W8x0YK9OKzr6wlg4fU0vygiFHOMdf1gjHRoIsTURjC9NiNL5pQ> <xmx:wPo0W-NL6xD27TAcrwOm88UMfvPXZm0LXPjsjT5d3X_eYTU5pZ8UEQ> <xmx:wPo0W16_Z1OCNkST39Blzs5UQcNypF48APogE4AdH2AL60YkNVCOTg> <xmx:wPo0W3PaWkXyOm9GWDpw9m3tY526R8zjOd2vp2ajv7IKGF9TYOCXKQ> <xmx:wPo0W9rfuuGfb6LE5TGXDEyhJcDttfa90PjhTGj-GaLENpYCiio9tw>
X-ME-Sender: <xms:v_o0W6BIUT7x-UJZ25be1sVQoEkyyScgZADnSgDrqAluJKi2KatEFw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id AF5049E4B0; Thu, 28 Jun 2018 11:11:59 -0400 (EDT)
Message-Id: <1530198719.3129780.1423592624.575CB8EA@webmail.messagingengine.com>
From: Katriel Cohn-Gordon <me@katriel.co.uk>
Cc: mls@ietf.org, scratch@virgilsecurity.com
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-0d8ea36c
In-Reply-To: <640CFF9E-5231-4188-888A-CAB4376393F6@vigilsec.com>
Date: Thu, 28 Jun 2018 16:11:59 +0100
References: <CAL02cgREuhjySYZXmhaE3RuF3fZ5iwCgyW2ChtgwPYhDgdaYUQ@mail.gmail.com> <11392542-5C22-4033-99F6-009F066F48DD@vigilsec.com> <CABkgnnVZMNhrSE0mL7-yehuoR-uE-Kj3zZC9nqRY4zHE2gmVPg@mail.gmail.com> <640CFF9E-5231-4188-888A-CAB4376393F6@vigilsec.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/mls/8td_4TbZSw2c6QucF1ocjXd5YcI>
Subject: Re: [MLS] Message Protection
X-BeenThere: mls@ietf.org
X-Mailman-Version: 2.1.26
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: Thu, 28 Jun 2018 15:12:04 -0000

I've been chatting with Alexey at Virgil Security, who has started work on a PR [1] to add this form of key separation.

I think we all liked this design; shall we figure out exactly how it works? I like the idea of symmetric key chains so that each message has a separate encryption key, as in Signal; that requires N and PN counters in the header to figure out which key to use, which I guess should go into the authenticated data.

Note that this means that each message key is used once, which helps guard against nonce reuse.

best,
Katriel

  [1] https://github.com/ekr/mls-protocol/compare/master...Scratch-net:master

On Thu, 28 Jun 2018, at 3:38 PM, Russ Housley wrote:
> Martin:
> 
> Each sender using a separate key seems pretty easy.  The key can be 
> derived using the sender's position in the key or any other unique 
> identifier that comes natural in the messaging protocol.
> 
> Russ
> 
> 
> > On Jun 27, 2018, at 6:12 PM, Martin Thomson <martin.thomson@gmail.com> wrote:
> > 
> > I was thinking that the nonce generation aspect would be worth looking
> > into as well.  If you crib from the TLS design, maybe you could have
> > per-participant keys so that each can be independently responsible for
> > ensuring nonce-uniqueness.  Then they can use counters to avoid nonce
> > reuse if they so choose.  Otherwise, I was tempted to suggest AES-SIV
> > or another nonce-reuse-resistant scheme, but there are fewer of those
> > available than straight up AEADs.
> > On Thu, Jun 28, 2018 at 7:36 AM Russ Housley <housley@vigilsec.com> wrote:
> >> 
> >> 
> >> 
> >>> On Jun 26, 2018, at 8:38 PM, Richard Barnes <rlb@ipv.sx> wrote:
> >>> 
> >>> Hey all,
> >>> 
> >>> One of the things we kind of waved our hands about in the charter and current protocol draft is message protection.  That is, the idea of specifying a concrete syntax for using the keys we negotiate using MLS to actually protect content.
> >>> 
> >>> This is a simpler problem than key exchange (since you've already established a group key), but it still has some nuances that matter to the overall security story, so it seems worth writing some things down:
> >>> 
> >>> - Content encapsulation (e.g., what nonces / AAD you use with AEAD)
> >>> - Key schedule, i.e., how message keys are derived from the group key
> >>> - ACK / NACK / replay
> >>> - Transcript integrity (?)
> >>> - Expiration times (?)
> >>> 
> >>> What's missing here?
> >> 
> >> If the tree produces a key and an identifier for that key, then the protocol is straightforward.
> >> 
> >> The key identifier could be derived from the key itself so that anyone that knows the key also knows the identifier.
> >> 
> >>        prk = HKDF-Extract('mls-key-id' | tree-identifier, key)
> >> 
> >>        keyid = HKDF-Expand(prk, '', sizeof(keyid))
> >> 
> >> Russ
> >> 
> >> _______________________________________________
> >> MLS mailing list
> >> MLS@ietf.org
> >> https://www.ietf.org/mailman/listinfo/mls
> 
> _______________________________________________
> MLS mailing list
> MLS@ietf.org
> https://www.ietf.org/mailman/listinfo/mls