Re: [TLS] Issue #964: Shortened HKDF labels

Benjamin Kaduk <bkaduk@akamai.com> Mon, 24 April 2017 21:13 UTC

Return-Path: <bkaduk@akamai.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 83DF6127241 for <tls@ietfa.amsl.com>; Mon, 24 Apr 2017 14:13:36 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=akamai.com
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 EWaFByJVxIA2 for <tls@ietfa.amsl.com>; Mon, 24 Apr 2017 14:13:35 -0700 (PDT)
Received: from prod-mail-xrelay08.akamai.com (prod-mail-xrelay08.akamai.com [96.6.114.112]) by ietfa.amsl.com (Postfix) with ESMTP id D866213153A for <tls@ietf.org>; Mon, 24 Apr 2017 14:13:34 -0700 (PDT)
Received: from prod-mail-xrelay08.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 5522B20000E; Mon, 24 Apr 2017 21:13:34 +0000 (GMT)
Received: from prod-mail-relay08.akamai.com (prod-mail-relay08.akamai.com [172.27.22.71]) by prod-mail-xrelay08.akamai.com (Postfix) with ESMTP id 3F32F200008; Mon, 24 Apr 2017 21:13:34 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1493068414; bh=LW1znL5saWQbmlwkLxndBZyvc79eKEbH1zJQXP9lXWM=; l=2575; h=To:References:From:Date:In-Reply-To:From; b=IWwi79XSKAWDbLc1bo0H4O3KvmDBR/KiDpGs7B3asI+b7DkxytuR+Giu0j1A2cnVn X9nsN1bJYWP5eYtm1zrIv3LW3jbR4vNKjy8RqAYv9Rb5Al3djV5tvRI/WgsHsqi1O/ vge09hN5G8nKhG9c07CR/Usth9ouylHZrr+DRNC8=
Received: from [172.19.17.86] (bos-lpczi.kendall.corp.akamai.com [172.19.17.86]) by prod-mail-relay08.akamai.com (Postfix) with ESMTP id E7E7C98082; Mon, 24 Apr 2017 21:13:33 +0000 (GMT)
To: Dave Garrett <davemgarrett@gmail.com>, tls@ietf.org
References: <CABcZeBP_0d+14_3SQ3sk+knytxpo4yxq5eYwGn++GC8H9BpUfw@mail.gmail.com> <20170424161619.GA18783@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBMriYeFZO5OJnBZvDbhw57V0F5_SBXwvcq8FAXTASa9Bw@mail.gmail.com> <201704241657.30874.davemgarrett@gmail.com>
From: Benjamin Kaduk <bkaduk@akamai.com>
Message-ID: <3166bcf2-65b1-9409-bf63-8e78e00a1a0b@akamai.com>
Date: Mon, 24 Apr 2017 16:13:33 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <201704241657.30874.davemgarrett@gmail.com>
Content-Type: multipart/alternative; boundary="------------E9BD3BB551F4B4A5AB7AA6C4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/kGFwBH1SkySjr9QlX8XFHmx86aw>
Subject: Re: [TLS] Issue #964: Shortened HKDF labels
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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, 24 Apr 2017 21:13:36 -0000

On 04/24/2017 03:57 PM, Dave Garrett wrote:
>> If people feel like we should have some "TLS" prefix, I think "TLS " would
>> be enough, giving us 1 bytes.
> (assuming you mean 14 bytes here)
>
> If I remember correctly, in some discussion quite a while back, we decided we wanted to bake the version number into the labels. This could be done more compactly by adding a ProtocolVersion value (2 bytes) to the HkdfLabel struct. 


I would prefer to keep both "TLS" and the version number involved.  I
generally don't mind having a non-ASCII encoding for the version number,
but then we have to pay attention to avoid putting a NULL byte in it by
accident.

-Ben

> "TLS" could be stuck in there as a static 3 byte opaque string, with no length or space. (yeah, the combined plaintext will go "TLSclient hs traffic", but nobody needs to care)