Re: [TLS] Extensions "supported_groups" and "key_share" in TLS 1.3

Xuelei Fan <xuelei.fan@vimino.com> Fri, 27 November 2015 12:33 UTC

Return-Path: <xuelei.fan@vimino.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F0C8E1B33D1 for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 04:33:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
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 JCSvo8AkVZXb for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 04:33:47 -0800 (PST)
Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 743B71B33D0 for <tls@ietf.org>; Fri, 27 Nov 2015 04:33:47 -0800 (PST)
Received: by oige206 with SMTP id e206so61009123oig.2 for <tls@ietf.org>; Fri, 27 Nov 2015 04:33:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vimino-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W4vKrBA1lw5pCSMo+9IatAlYSW6f4sTQjUjTbjy/yh0=; b=fLUK/K1uP5OiUZYhWMMPC6D5WzDwIgAOBihe9vCd+uVoidHdnSL8g7Jqf6qn+Mzvgk AGjaFPhrq0hZQzODKWLl7VWw3Pt291MqPFqjdq9VxiYbkbfqoPyMZoox+8AQvnt5lhrU TLze7dyhcKgY41M3rj4AFx6Q4dPs3LXdiNOCLUZotRaXute7Z0eLsw4fvZoLkr5fpp8u QXaabPAjwtyfJnFn5skWRrPK8Xn6AK/tRG3x8AMOwk+RHdJxhXarNf57QgnGb/EMRZnD tpmBE243EP6RIxEZfY3VfuM8Gtiihzq1PjWgp+RXLQqasyh38NnjoME6aielbqh/Mp0Q moFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=W4vKrBA1lw5pCSMo+9IatAlYSW6f4sTQjUjTbjy/yh0=; b=ZaptEp7tsIKDxTOJWqXDdGIw8DEnCma/Ct/8GX7fJ1pe3PSKTwLjz/9xNiCMWr8OOE tMcApKhjNHypLaoEyu4YmqqmjOyJaKQIYKl1+WINOytDjDr6nAl3TT7wLkG2bO3GIZJ1 KJJotpuaFX80y2KLf397ft8EDc5EIGISzQPnSnuCkyyaGV2rWCvGTjhXXLxhdqAg7dNt +7K4J5WxnVzM+km808KJZ+jyoJ94Y23439DYKz7aPEimtaimWqt0q2nnT7Uuumjvkzw6 HBSHHKPgkjG5rapeJcx3llFp7Lhoe5SIx9RpyKmbsiNjsDyOekIsWLGneMhl+ycyzM3+ UV4A==
X-Gm-Message-State: ALoCoQlkYM42fEaWPnAqXdFSejQLKBkITR0xKwkb2bflUEFHIcnkEyqVpd4OV2OzdUVa61zNZWyc
MIME-Version: 1.0
X-Received: by 10.202.215.195 with SMTP id o186mr18929413oig.87.1448627626857; Fri, 27 Nov 2015 04:33:46 -0800 (PST)
Received: by 10.76.171.103 with HTTP; Fri, 27 Nov 2015 04:33:46 -0800 (PST)
X-Originating-IP: [148.87.19.214]
In-Reply-To: <5330051.tMbHWVtgER@pintsize.usersys.redhat.com>
References: <CAAgBOhuOPB=jxO=WWHmy_y7ARY5qfdK2x4xC9t-Z-vn0UU5Paw@mail.gmail.com> <201511262139.32824.davemgarrett@gmail.com> <CAAgBOhvYjxHW2LqR84FsKxhibqt8k9UqSr6J=UA-Bjq+TSgP9A@mail.gmail.com> <5330051.tMbHWVtgER@pintsize.usersys.redhat.com>
Date: Fri, 27 Nov 2015 20:33:46 +0800
Message-ID: <CAAgBOhs_bPRrV8FZ0=aw-Snt8cJpjT8TYqH4a22Ub5Lp_Es4MA@mail.gmail.com>
From: Xuelei Fan <xuelei.fan@vimino.com>
To: Hubert Kario <hkario@redhat.com>
Content-Type: multipart/alternative; boundary="001a113d53101c6c4c052584e78b"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/mGbwFmOXsb5Qxfixh4RZCoxhceM>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Extensions "supported_groups" and "key_share" in TLS 1.3
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Nov 2015 12:33:49 -0000

On Fri, Nov 27, 2015 at 8:12 PM, Hubert Kario <hkario@redhat.com> wrote:

> On Friday 27 November 2015 10:50:40 Xuelei Fan wrote:
> > > On Thursday, November 26, 2015 09:12:14 pm Xuelei Fan wrote:
> > > > Can key_share offers two shares for the same group?
> > >
> > > It's currently worded "Clients MUST NOT offer multiple KeyShareEntry
> > > values for the same parameters", which is a little ambiguous, but I
> > > interpret this as one share per group. I don't know why you'd need
> > > to offer more than one, anyway.
> > >
> > Need no more than one.  Then, it may be more simple that key_share
> > does
> > not define the preference order. The preference order is covered by
> > supported_groups.
>
> What would then be the expected behaviour of the server if the first
> group in the supported_groups does not have a associated key share?
>
> Try the next  group in the supported_groups until find an associated key
share.



> that is, I advertise support for secp384r1, secp256r1 or ffdhe2048, but
> I provide only secp256r1 key share as it's the one that's most widely
> supported
>
> Should the server ask me to provide a secp384r1 key share or should it
> just proceed with secp256r1?
>
> I think, it would be better to proceed with secp256r1.



> I think that specifying *both* in preference order, and recommending the
> servers to first inspect key shares and then supported_groups (if no
> intersect between what server supports and what key shares client
> provided) would end up with more predictable behaviour and cleaner code.
>
> But if the orders are not consistent, the logic get annoyed.  It's a good
practice to keep the order consistent, but it would be better if the
preference order is unique and specified in one place.


>
> That being said, we probably should say that clients MUST advertise
> support for all groups for which they send key shares and servers MUST
> abort connection with something like illegal_parameter if that happens
>
This adds additional checking on both client and server.  Personally, I
would prefer to use one preference order in order to avoid any order
conflict.

Thanks & Regards,
Xuelei