Re: [TLS] Why is resumption_context hashed?

Eric Rescorla <> Fri, 15 July 2016 11:59 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2FFA012D511 for <>; Fri, 15 Jul 2016 04:59:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id m784iqQOk_-v for <>; Fri, 15 Jul 2016 04:59:53 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4002:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6AAEC12B058 for <>; Fri, 15 Jul 2016 04:59:53 -0700 (PDT)
Received: by with SMTP id l125so99430402ywb.2 for <>; Fri, 15 Jul 2016 04:59:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tZ2CMwlNHFKRtHQbnZnvy/aVBSgV5LV29pDNROci26I=; b=YC48GF5F8pESEg2LjGdszve4ma4D6tZ8DjSjdCEnXmdCoDk0dVZjqvdkIGwMzi6evW gKDw2AaAu07mh/oj8wEsTuMS2xXyP7deHWQoVU+xwYHPjJSlQ5+OBQSbu5HGAKMBpaEr +hXsv3ODh5I3ZIazoSSF+n5HCHewcbQX1QwEmoGCPQDc+xyzP5TK19a4HjNnLARXeNyC hVEDJxKnzHUY20HdW9eBMvxTxzs9mkzT4SAgwXkXSIrEdAXuIOwseA83EP2ZciOAYn/i EDbJWKppO2cTE0Y6awh6JUo/KObITHcuMG2BNZd9i6A6Fp/BwSWmDp6TCgMuAowJF7OT H7iw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tZ2CMwlNHFKRtHQbnZnvy/aVBSgV5LV29pDNROci26I=; b=fGMTzWn2qBJlFhDygJUWTj2q9XbvCv8ApJpec2B8KyyLZ/EmZcqAJf36Y5RfZCJKRn vB+Kd3TAdZbnjZfXbItLg5CkijRv6f9lmozdX9jTn/SlhQLdkNAIaAdHjQRbbH8DQNkC 90D2thEh1N81+2KhXJsh9B5ZZxXUIVJagUvVoHMOIYkl1yG5v5Tvj8IQMs0k2HP+Ug8D 2IGtLIqfri6vn2iMlvYaXcOJW1cQbt2bE7fhbD/3Qj4bMTo25C94XLaA5YeNXSwoyXRO jPeMRHRffTIdLF3T3x2CjKGXAmge+2FEKiOjPBAJ1M+Vxd1T4uNmWAn+xe0VtD8RVK/O Eb7g==
X-Gm-Message-State: ALyK8tKmFUv/Tfv3Lt/SPZgSxpp82tEwImnX6CQiyR/Kfr5Heju+XGpNkSqc5ia8Cfvy+CaSG19e6hBdbSNeXA==
X-Received: by with SMTP id e126mr12878825ybf.74.1468583992717; Fri, 15 Jul 2016 04:59:52 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Fri, 15 Jul 2016 04:59:13 -0700 (PDT)
In-Reply-To: <>
References: <>
From: Eric Rescorla <>
Date: Fri, 15 Jul 2016 12:59:13 +0100
Message-ID: <>
To: David Benjamin <>
Content-Type: multipart/alternative; boundary="94eb2c14710a35a7330537ab5b67"
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] Why is resumption_context hashed?
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 15 Jul 2016 11:59:55 -0000

On Fri, Jul 15, 2016 at 11:39 AM, David Benjamin <>

> Every time resumption_context is used, it's fed into the PRF hash.
> Handshake Context gets hashed since that actually expands to the full
> concatenation and we want to be able to maintain a rolling hash.
> But resumption_context is always a short value and is already the size of
> the PRF hash. (If not resuming, it is the zero key, which is sized
> appropriately. If resuming, it is the size of the PRF hash of the original
> connection. But we require that resumptions use the same PRF, so that too
> will be the right size.)
> Was there some other reason we needed to hash it, or is a guarantee of
> constant size sufficient to use it directly? If it still needs to be
> hashed, it seems we ought to redefine resumption_context to be
> Hash(HKDF-Expand-Label(...)) instead, mostly as a hint to implementors that
> one may as well store the final value in the ticket.

I didn't have a good reason. It was just giving me the heebie jeebies
(technical term) to append something that wasn't hashed to something that


> David
> _______________________________________________
> TLS mailing list