Re: [TLS] ECH: Reuse HPKE context across HRR

Stephen Farrell <stephen.farrell@cs.tcd.ie> Tue, 10 November 2020 22:34 UTC

Return-Path: <stephen.farrell@cs.tcd.ie>
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 6CA543A118F for <tls@ietfa.amsl.com>; Tue, 10 Nov 2020 14:34:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cs.tcd.ie
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 KoDw9jExFaY2 for <tls@ietfa.amsl.com>; Tue, 10 Nov 2020 14:34:34 -0800 (PST)
Received: from mercury.scss.tcd.ie (mercury.scss.tcd.ie [134.226.56.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5193B3A118E for <tls@ietf.org>; Tue, 10 Nov 2020 14:34:34 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mercury.scss.tcd.ie (Postfix) with ESMTP id 411F9BE51; Tue, 10 Nov 2020 22:34:32 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from mercury.scss.tcd.ie ([127.0.0.1]) by localhost (mercury.scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xpkHACq4dX61; Tue, 10 Nov 2020 22:34:30 +0000 (GMT)
Received: from [10.244.2.119] (95-45-153-252-dynamic.agg2.phb.bdt-fng.eircom.net [95.45.153.252]) by mercury.scss.tcd.ie (Postfix) with ESMTPSA id 14306BE53; Tue, 10 Nov 2020 22:34:30 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.tcd.ie; s=mail; t=1605047670; bh=+bq4ha2qHExBYL+fnMR/FaVMKy86BcLwiaVgmQfZsMQ=; h=Subject:To:References:From:Date:In-Reply-To:From; b=Biu0uc2Iie/x0qMqLGLm/qqx75eclL/p9OctSlOKienxzhfifMXxNrQ1LdrNBGKKk 4tnJGtygDDoFrDcbh9FjIpyzD8KLMOnCRUh3k99NSUklpiQChsyUAvSKVFJwZoXgs8 b5i2yKY1Nl6qcxZlibD3z6R82xBOsK7ojrYlUPTY=
To: Christopher Patton <cpatton=40cloudflare.com@dmarc.ietf.org>, tls@ietf.org
References: <CAG2Zi20JWODfYqNZMZ2bm0F5DbET+i+swMw1L-j5jk28Kk8Myg@mail.gmail.com>
From: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Message-ID: <72814eb9-02c6-6d7b-7364-8b6663cc19c4@cs.tcd.ie>
Date: Tue, 10 Nov 2020 22:34:28 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2
MIME-Version: 1.0
In-Reply-To: <CAG2Zi20JWODfYqNZMZ2bm0F5DbET+i+swMw1L-j5jk28Kk8Myg@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8vvdlk37TjrLxVlLUVFpSKMhv7bowgT5c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/RE7ErC-Y-RJMHiCq_NSDoLuY4bc>
Subject: Re: [TLS] ECH: Reuse HPKE context across HRR
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 10 Nov 2020 22:34:36 -0000

Hiya,

On 10/11/2020 22:27, Christopher Patton wrote:
> Hi list,
> 
> In case the server sends a HelloRetryRequest (HRR) the client generates a
> fresh ECH extension, including generating a fresh HPKE context and
> corresponding encapsulated key. The following PR changes the spec so that
> the HPKE context generated for the first ECH extension is reused to compute
> the second:
> https://github.com/tlswg/draft-ietf-tls-esni/pull/352
> 
> This design has at least two advantages:
> 
>     1. Currently the spec requires the HPKE context to export a PSK, which
>     in turn is used to generate the second HPKE context. This means that the
>     client (resp. the server) has to implement both SetupS() (resp. SetupR())
>     and SetupPSKS() (resp. SetupPSKR()). Advancing the HPKE sequence number
>     before encrypting the second ClientHelloInner appears to serve the same
>     purpose as the PSK (see {{flow-hrr-hijack}}.) The advantage of the new
>     design is that the client (resp. the server) doesn't have to implement
>     SetupPSKS() (resp. SetupPSKR()).
>     2. Instead of two decapsulation operations --- one for the first CH and
>     another for the second --- the server does just one decapsulation. Not only
>     is this slightly more economical, it avoids edge cases that arise when
>     decapsulation is offloaded to an RPC server. This allows us to simplify the
>     server-side HRR logic considerably.
> 
> We're wondering if anyone can think of any disadvantages to this design.
> Feedback on the PR is greatly appreciated!

I've not gotten to that code yet but the above seems
sensible.

Cheers,
S.

> 
> Best,
> Chris P.
> 
> 
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>