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

Xuelei Fan <xuelei.fan@vimino.com> Fri, 27 November 2015 13:20 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 374F81A038D for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 05:20:27 -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 gv0E0XiFLqPI for <tls@ietfa.amsl.com>; Fri, 27 Nov 2015 05:20:25 -0800 (PST)
Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (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 677FB1A038C for <tls@ietf.org>; Fri, 27 Nov 2015 05:20:25 -0800 (PST)
Received: by obbww6 with SMTP id ww6so82549493obb.0 for <tls@ietf.org>; Fri, 27 Nov 2015 05:20:24 -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=KVhazP1L/D35UwuEf/Ir4fw8ANBmyz09RAPoo7U6N/Q=; b=y/aEGVYuMwLTJH2S3oAN0W9nNuA+Yy8Bvrdk/p7yLHJNqosGe+z8FPIkZExdwWPrIJ i29FILMJbjG4GIgEqtFlRBAIl9O6HBMW9ddMcyRy36JJW05xupLlIntrEfNefGS4Gosd CMgDfLf9+pQ617zmGgHaaFFZHqenMEMrEdCH3Soy7sD3SjCMy3zZPs4qbEyDlz1+HCye Fe9NgZx0lgKwfwJdIrXAWfoT2omgZLI1l9MeejoGoMv2H80oeFDc6/o41khUrSedprYR ltsCqLTZzK4mp+XreOXEnXFZi8pDHbw9nxAkWcooARA7K3CBQbvtKH1DJMZlRJPEMEzv IoLg==
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=KVhazP1L/D35UwuEf/Ir4fw8ANBmyz09RAPoo7U6N/Q=; b=LB4ntqu9c4Dc3uFTXvVrC0ac8w6bDhzYAuti0eHeymkqvu3hL1zQCccmbPvLbzdu/o TZGaWjOd8+zPtFTaXi+S1V4gk/l3WsQ8RcDQlsu/uBktSjpDRw0cZVZEX2yRC5TS6mQd I8KmzMKSI6Ha6NzMEpFH+YBLhnyMq6I8eFJYT5McG0fGhJRIUvrtbnT502BY+bm5UE3H vmDeBTo3t3f/8NetzcK9JOSGRWbMyRq3jK0UjGKbTrp+Q5z6g5LaYs9FhDgNR/KyrEPq 6tevdNoL5HsU0Il6Au2mTHIeI+4QUMwqwFId62RjI5Md9Z0mClM5js6FU4Ui8nj28CH+ 677Q==
X-Gm-Message-State: ALoCoQmd5LRqGQzWds7BdnQu2gtvHj7H/E9i7+AMZ5zYE91sbj/d273QvjAc2frZu1Jg/ysN7uka
MIME-Version: 1.0
X-Received: by 10.182.142.170 with SMTP id rx10mr32825890obb.34.1448630424699; Fri, 27 Nov 2015 05:20:24 -0800 (PST)
Received: by 10.76.171.103 with HTTP; Fri, 27 Nov 2015 05:20:24 -0800 (PST)
X-Originating-IP: [148.87.19.214]
In-Reply-To: <1786049.OYDTVEIchY@pintsize.usersys.redhat.com>
References: <CAAgBOhuOPB=jxO=WWHmy_y7ARY5qfdK2x4xC9t-Z-vn0UU5Paw@mail.gmail.com> <5330051.tMbHWVtgER@pintsize.usersys.redhat.com> <CAAgBOhs_bPRrV8FZ0=aw-Snt8cJpjT8TYqH4a22Ub5Lp_Es4MA@mail.gmail.com> <1786049.OYDTVEIchY@pintsize.usersys.redhat.com>
Date: Fri, 27 Nov 2015 21:20:24 +0800
Message-ID: <CAAgBOhuOSrxHfvfCHiLHSjfDxGihXh2=-f1PMmSjLhNytTppug@mail.gmail.com>
From: Xuelei Fan <xuelei.fan@vimino.com>
To: Hubert Kario <hkario@redhat.com>
Content-Type: multipart/alternative; boundary="001a11c338b2e01bbd0525858d5f"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/sV9uUURI8pDe41CuNpWgeHEsk6A>
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 13:20:27 -0000

>
> > > 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 means that the code needs to keep references to two arrays at the
> same time and either create a hash table for lookups in key shares or
> iterate over key shares for every try - this makes code and logic more
> complex, not less
>
I did not get the idea, can the complex above be avoided if keeping both?
Does one preference order just get ignored?

If the orders are not consistent, if I can choose from two options:
continue or alter, I would choose the continue option.  Alert message is
expensive in practice.

Anyway, minor question, not a big concern to me.

Thanks & Regards,
Xuelei