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

Hubert Kario <hkario@redhat.com> Fri, 27 November 2015 12:12 UTC

Return-Path: <hkario@redhat.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 A27491B3369 for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 04:12:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.486
X-Spam-Level:
X-Spam-Status: No, score=-7.486 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.585, SPF_HELO_PASS=-0.001] autolearn=ham
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 F-UhWMmlITnF for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 04:12:42 -0800 (PST)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D9CA51B3368 for <tls@ietf.org>; Fri, 27 Nov 2015 04:12:42 -0800 (PST)
Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 6F65768E0C; Fri, 27 Nov 2015 12:12:42 +0000 (UTC)
Received: from pintsize.usersys.redhat.com (ovpn-112-54.ams2.redhat.com [10.36.112.54]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tARCCbjp027079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Nov 2015 07:12:41 -0500
From: Hubert Kario <hkario@redhat.com>
To: tls@ietf.org
Date: Fri, 27 Nov 2015 13:12:35 +0100
Message-ID: <5330051.tMbHWVtgER@pintsize.usersys.redhat.com>
User-Agent: KMail/4.14.10 (Linux/4.2.6-200.fc22.x86_64; KDE/4.14.14; x86_64; ; )
In-Reply-To: <CAAgBOhvYjxHW2LqR84FsKxhibqt8k9UqSr6J=UA-Bjq+TSgP9A@mail.gmail.com>
References: <CAAgBOhuOPB=jxO=WWHmy_y7ARY5qfdK2x4xC9t-Z-vn0UU5Paw@mail.gmail.com> <201511262139.32824.davemgarrett@gmail.com> <CAAgBOhvYjxHW2LqR84FsKxhibqt8k9UqSr6J=UA-Bjq+TSgP9A@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1669306.B4Ul1fYFoV"; micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/dSGBVuBGTH0nGP-tjfP2VRbXHDw>
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:12:44 -0000

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?

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 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.


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
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic