Re: [TLS] WGLC for draft-ietf-tls-hybrid-design

Ilari Liusvaara <ilariliusvaara@welho.com> Mon, 02 May 2022 09:59 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8CE9BC1594A8 for <tls@ietfa.amsl.com>; Mon, 2 May 2022 02:59:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.899
X-Spam-Level:
X-Spam-Status: No, score=-6.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WyyP41HF2l4c for <tls@ietfa.amsl.com>; Mon, 2 May 2022 02:59:03 -0700 (PDT)
Received: from welho-filter3.welho.com (welho-filter3b.welho.com [83.102.41.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8ADC0C1594AB for <TLS@ietf.org>; Mon, 2 May 2022 02:59:02 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter3.welho.com (Postfix) with ESMTP id B132213FE3 for <TLS@ietf.org>; Mon, 2 May 2022 12:58:59 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp1.welho.com ([IPv6:::ffff:83.102.41.84]) by localhost (welho-filter3.welho.com [::ffff:83.102.41.25]) (amavisd-new, port 10024) with ESMTP id QYRYjE4Kvhzo for <TLS@ietf.org>; Mon, 2 May 2022 12:58:59 +0300 (EEST)
Received: from LK-Perkele-VII2 (87-92-216-160.rev.dnainternet.fi [87.92.216.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp1.welho.com (Postfix) with ESMTPSA id 37E3C7A for <TLS@ietf.org>; Mon, 2 May 2022 12:58:58 +0300 (EEST)
Date: Mon, 02 May 2022 12:58:58 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: "TLS@ietf.org" <TLS@ietf.org>
Message-ID: <Ym+rYlVcrxXe35mh@LK-Perkele-VII2.locald>
References: <27E9945C-6A0A-46DD-89F0-22BE59188216@heapingbits.net> <e43fc649-3fc6-333b-c44d-55de0627c710@cs.tcd.ie> <Ymz7yncQAnzmp/eL@LK-Perkele-VII2.locald> <38de10e6-ab3c-6ea1-44b7-57057c97e7aa@cs.tcd.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <38de10e6-ab3c-6ea1-44b7-57057c97e7aa@cs.tcd.ie>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/5NmkfA1NU3iHc7g1U36slAg1swE>
Subject: Re: [TLS] WGLC for draft-ietf-tls-hybrid-design
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.34
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: Mon, 02 May 2022 09:59:07 -0000

On Sat, Apr 30, 2022 at 04:48:59PM +0100, Stephen Farrell wrote:
> 
> On 30/04/2022 10:05, Ilari Liusvaara wrote:
> > On Sat, Apr 30, 2022 at 01:24:58AM +0100, Stephen Farrell wrote:
> > > 
> > > On 27/04/2022 16:27, Christopher Wood wrote:
> > > > This email commences a two week WGLC for draft-ietf-tls-hybrid-design, located here:
> > > > 
> > > >      https://datatracker.ietf.org/doc/draft-ietf-tls-hybrid-design/
> > > 
> > 
> > However, I did come up with compression method:
> > 
> > 1) Sub-shares in CH may be be just replaced by a group id (two octets).
> >     The replacements can be deduced from length of the whole share.
> > 2) First sub-share copies from first octets of share for the designated
> >     group.
> > 3) Second sub-share copies from last octets of share for the designated
> >     group.
> > 
> > This can be decoded regardless of if the sever knows what the referenced
> > groups are. The compression can also never run into loop, as recursive
> > references are not allowed.
> > 
> > 
> > So for example, if one wants to send x25519, p256, x25519+saber and
> > p256+saber, one can do that as:
> > 
> > - x25519: <x25519 share> (32+4 octets)
> > - p256: <p256 share> (65+4 octets)
> > - x25519+saber: <x25519 id><saber share> (2+992+4 octets)
> > - p256+saber: <p256 id><x25519+saber id> (2+2+4 octets)
> > 
> > Total overhead is 22 octets. 16 for 4 groups, and 6 for the compression
> > itself.
> 
> So yes that could work. We'd need to think through how
> it'd interact with the ECH scheme were both to end up
> standardised.

The ECH scheme copies entiere extensions whereas this works inside
the key_share extension, so I do not see any nontrivial interactions.
Furthermore the extension involved (key_share) REALLY SHOULD NOT
differ between inner and outer hello.


(The same analysis that says that key_share should not differ between
inner and outer hellos also trips my hinky detection on interaction
between ECH and PSK. And those interactions look much too complicated
for me to analyze.)


> > > - I'm also HRR-confused - if we don't yet know the
> > > details of the range of possible PQ KEM algs we want to
> > > allow here, how do we know that we almost always continue
> > > to avoid HRR in practice and thus benefit from a mixture of
> > > classic and PQ algs? (It's also a bit odd that HRR,
> > > much as I dislike it, doesn't get a mention here;-) I
> > > think the problem is that we don't want HRR to push a
> > > client back to only "classic" groups, if the client but
> > > not the server is worried about PQ stuff while both
> > > prioritise interop.
> > 
> > Well, avoiding HRR impiles that client is willing to bloat its client
> > hello even for servers that do not support PQ. And for such clients,
> > using PQ at all requires servers to priorize it (send HRR even if
> > acceptable share is present).
> 
> I don't understand the above sorry;-)
> 
> ISTM one would need to analyse/guess what'll happen with
> this scheme and HRR before being done. Maybe someone's
> done that but if so, I'm surprised there's no mention in
> the draft.

Well, three scenarios:


1) PQ without HRR:

Client hello (large): Hybrid key share, classical key share.
Server hello: Hybrid key share.


2) PQ with HRR:

Client hello (small): Hybrid supported, classical key share.
Server hello: Restart handshake, hybrid.
Client hello (large): Hybrid key share, classical supported.
Server hello: Hybrid key share.

(The "Hybrid supported, classical key share." turning into "Hybrid
key share, classical supported." is due to standard TLS rules on
HRR.)


3) Failure to use PQ even if supported by both sides:

Client hello (small): Hybrid supported, classical key share.
Server hello: Classical key share.

 
> > 
> > > - section 4: if this cannot support all NIST finalists
> > > due to length limits then we're again being premature
> > > esp. if NIST are supposed to be picking winners soon.
> > > We'd look pretty dim if we didn't support a NIST winner
> > > for this without saying why.
> > 
> > Just yeet McEliece. Its keys are just too large for it to be practical
> > in TLS, even if the keys did not bust hard limits.
> > 
> > After removing McEliece from consideration, all the finalists and
> > alternates can trivially be supported (albeit FrodoKEM busts some
> > soft limits).
> 
> Nonetheless, this is another respect in which the draft
> text has to remain incomplete because we're IMO progressing
> it too soon.

I disagree. None of this stuff will change. The reason why current
approach can not accomodiate McEliece is that McEliece public keys are
just plain too big. And that McEliece is the only finalist/alternate
where that is the case has been known since 3rd round annoucement on
July 22, 2020.


Furthemore, any approach that can accomodiate McEliece is highly risky
due to fundamential modifications to TLS required. The problematic part
is actually inside TLS 1.x invariants.



I personally consider McEliece harmful. Due to:
1) Causing reputational problems for whole PQC.
2) Encouraging unsafe designs to try to acomodiate its huge keysizes.




-Ilari