Re: [TLS] Question regarding TLS 1.3 session resumption

"Martin Thomson" <mt@lowentropy.net> Mon, 06 May 2019 03:32 UTC

Return-Path: <mt@lowentropy.net>
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 420E11200B5 for <tls@ietfa.amsl.com>; Sun, 5 May 2019 20:32:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=m/i1BEHT; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=4ojMr92S
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 bbUDQnqpFkIx for <tls@ietfa.amsl.com>; Sun, 5 May 2019 20:31:58 -0700 (PDT)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B71A8120086 for <tls@ietf.org>; Sun, 5 May 2019 20:31:58 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 104852204E for <tls@ietf.org>; Sun, 5 May 2019 23:31:58 -0400 (EDT)
Received: from imap2 ([10.202.2.52]) by compute1.internal (MEProxy); Sun, 05 May 2019 23:31:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm2; bh=j1WFE0gW+LU3ZnwgQbG9cKt+L/D7Et8 c+rKBB+AAoh8=; b=m/i1BEHTnR87+0/jKzXZkwgR6ae/Llmk8YbkiyeMg7IRwTK FdkxqvEPoZcWmi4miy/pmrk9t4N+3dwFRx7WmQnZVNQ2LpkPCaW6qYnWjSGowydN ysU2zvCRaq5lYl1JrIlI/zaC2vckWeZUpQtZxXUcR8Vc1YVN9g6EPnJQ5MZbkVb5 1W3iqsM1M5jO4MEgmG/ZlZTdcz6c/CRQ5VxW6DbJt2WRdlLrXGRrxSI/LLBFzPzu 4G3+mBnz7zegqStUtyrKfDgEHufvqelIDzy6ECHHtZW+etX6NJRHR/wJKJ0eBbph 9idDjuceNU/2TN97cT8yWabSdUhww5hlW8OJyRg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=j1WFE0 gW+LU3ZnwgQbG9cKt+L/D7Et8c+rKBB+AAoh8=; b=4ojMr92SsrhkCVXGy6ZXO4 gNlIlFzsEOE10oD6Et05+uSpchPjLuks+Au706crzUliP7rDtPWx4c8s9dcpcM39 zL2uaKMbSdBRZ90s5/m7zsPG/lxjQ6bd3PNJO7Q1fvLe9eayiDGlw2rcmZx4pDE+ /0gVgzpnVhDaSkWy/eq+JJ2J0+mbM6x2Uh9cc4KYszVmmgIN//OQfG1Z9SIqhiSO D37rcilT8lBrVbRPD1wLYnJie9JZdHXGsLSZs8hIWWTmPTac9EaSKuYvClW5F7GU EJjBmFLWQParzv5z3TqqfS1Zg40Eqwybd86R/mlzAdMxi5kzTA9mXS/fSWCYpicQ ==
X-ME-Sender: <xms:rarPXFZDxAImTBL34DK2sHe6UcWNhjuAAHZqt_YNmgd5pDtfHDEh8g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrjeeigdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesthdtre dtreertdenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehlohif vghnthhrohhphidrnhgvtheqnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofi gvnhhtrhhophihrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:rarPXEkAyuuiR8qo2qB-E7NJF_eAYszg8GOTLQB7hlnrlVpJIwZ9tw> <xmx:rarPXDh3CvyUgDc4U5UKXnFGqrj0w1s4UbwrwNhEHfB98p2QR-YUyw> <xmx:rarPXOSYqZEhkH83KJYbqHnK68TNPp0NRDQOHl5P9ySsWtN4P4hVBw> <xmx:rqrPXLibj87LQWlcULzBfswHjfigzwV7dAuL1Oj0_AuBR6v7gsLYVw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9E85C7C6D9; Sun, 5 May 2019 23:31:57 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.6-449-gfb3fc5a-fmstable-20190430v1
Mime-Version: 1.0
Message-Id: <3d44bd29-05de-47e2-bc18-4624eca069eb@www.fastmail.com>
In-Reply-To: <00d601d50333$49253bd0$db6fb370$@gmail.com>
References: <00d601d50333$49253bd0$db6fb370$@gmail.com>
Date: Sun, 05 May 2019 23:31:57 -0400
From: Martin Thomson <mt@lowentropy.net>
To: tls@ietf.org
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Roe4vWnRrCPCzsEEBCWk883FAa0>
Subject: Re: [TLS] Question regarding TLS 1.3 session resumption
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: Mon, 06 May 2019 03:32:00 -0000

Ilari answered your question, but this jumped out:

On Sun, May 5, 2019, at 21:11, geyer.lukas@gmail.com wrote:
> [...] both sides calculate,
>     PSK = [...]
> and the server sends back to the client the PSK (unencrypted [...])

The PSK never gets sent.  As you say, both sides can calculate the same value.

> My question is what key is encrypting the session ticket (is it a 
> symmetric key that is generated by the webserver/SSL library for each 
> session? 

If you want a bad design choice, NSS uses RSA encryption using a key from one of its certificates to encrypt a symmetric key that we use with CBC.  The symmetric key is used for all tickets once it is recovered, so the asymmetric encryption/decryption costs are paid just once when the system runs.

The ways in which this design is bad are lengthy enough that I won't bother to list them.  A better scheme would use a straight symmetric key with an AEAD, but there are historical deployment reasons for that design.