Re: [TLS] A small detail in HMAC key generation for Finished message

Hubert Kario <hkario@redhat.com> Mon, 04 January 2016 17:59 UTC

Return-Path: <hkario@redhat.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2F3351A903F for <tls@ietfa.amsl.com>; Mon, 4 Jan 2016 09:59:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.911
X-Spam-Level:
X-Spam-Status: No, score=-6.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 SfI3gZOwbyeT for <tls@ietfa.amsl.com>; Mon, 4 Jan 2016 09:59:10 -0800 (PST)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA9A41A903E for <tls@ietf.org>; Mon, 4 Jan 2016 09:59:09 -0800 (PST)
Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id ABA58C0A516B; Mon, 4 Jan 2016 17:59:09 +0000 (UTC)
Received: from pintsize.usersys.redhat.com (dhcp-0-127.brq.redhat.com [10.34.0.127]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u04Hx87U027042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jan 2016 12:59:09 -0500
From: Hubert Kario <hkario@redhat.com>
To: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 04 Jan 2016 18:58:44 +0100
Message-ID: <4038107.aFUxodDpT4@pintsize.usersys.redhat.com>
User-Agent: KMail/4.14.10 (Linux/4.2.8-200.fc22.x86_64; KDE/4.14.14; x86_64; ; )
In-Reply-To: <CABcZeBNac32MDfkSE7BbScHNTZOyr2k+oO+7r23VabPz=o+0BQ@mail.gmail.com>
References: <DM2PR0301MB06550A43EC188A16E8C8464DA8E60@DM2PR0301MB0655.namprd03.prod.outlook.com> <1559494.V2ctEmMh08@pintsize.usersys.redhat.com> <CABcZeBNac32MDfkSE7BbScHNTZOyr2k+oO+7r23VabPz=o+0BQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart38213661.DcMFxHUZQk"; micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/yp_PRclvgzM1urfKXqctlGcAaOE>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] A small detail in HMAC key generation for Finished message
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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, 04 Jan 2016 17:59:11 -0000

On Monday 04 January 2016 09:44:57 Eric Rescorla wrote:
> On Mon, Jan 4, 2016 at 9:22 AM, Hubert Kario <hkario@redhat.com> 
wrote:
> > On Thursday 24 December 2015 01:04:59 Christian Huitema wrote:
> > > On Wednesday, December 23, 2015 3:05 PM, Eric Rescorla wrote:
> > > >> Similarly, in the HKDF-Expand-Label, do we assume a final null
> > > >> byte
> > > >> for the "label"?>
> > > > 
> > > > No. I wonder if we should instead add the '\0' explicitly in the
> > > > 4.8.1 for maximal clarity.
> > > 
> > > Either that, or just remove the trailing 00 from the binary
> > > description.
> > 
> > the 0-byte is a C-ism that looks like a wart to me
> > 
> > neither of the previous TLS versions used null-terminated C-style
> > strings so why TLS1.3 should? Especially in just one place
> 
> The idea is to make this prefix-free. I added it as an explicit byte
> but would
> be ok with a different separator as long as we banned it from the
> context strings.

Calling it explicitly a separator would be less confusing.

Advising implementers to check other values passed in for it and 
aborting if detected would be even better
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic