[TLS] Labels in HKDF-Expand-Label

Martin Thomson <martin.thomson@gmail.com> Wed, 23 November 2016 05:25 UTC

Return-Path: <martin.thomson@gmail.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 28377129554 for <tls@ietfa.amsl.com>; Tue, 22 Nov 2016 21:25:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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=gmail.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 gfwdGlaNPZdD for <tls@ietfa.amsl.com>; Tue, 22 Nov 2016 21:25:49 -0800 (PST)
Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CAE2412952F for <tls@ietf.org>; Tue, 22 Nov 2016 21:25:48 -0800 (PST)
Received: by mail-qk0-x231.google.com with SMTP id n21so3020575qka.3 for <tls@ietf.org>; Tue, 22 Nov 2016 21:25:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=O+wPkomAzuysas9j/Ycz01EaC92NIgJjFACTE2ZlS4Y=; b=qqoA0A+PweA6oQTMtlxDuTpq6rl8cMMIhTQMKLNV8kQU6DDUuQ5n0GWKPJq0UgvSJ9 gSeG/DTQye31Gs11becH6xCObSs4UizKuxzh/sC1srIkefUOoenESVzXdGvd4yMOClt9 xdZ02t79Wo/yumQKWqHiEKnq28Qq3PfbmQv3g5zy5J2Hql2dNVH9Ea1lnmMqpWZ5EBEr V72YLo2Q/7rGr5WeSucoMOf+ngYXz1dVNX2AiXZN1lZH6mzu0JfhLqCl1kOfZz1WDmDj IsE5qihCScGS3yVVExmN7v4HBPzG6IdD9OaOh1Ak877coGEkw+eTphYUgCy3s+vLff8v i5pw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O+wPkomAzuysas9j/Ycz01EaC92NIgJjFACTE2ZlS4Y=; b=Vim6HHBgO9XoJh2uBi3m8Cf+hFAC1gMTGp4qK4b4yebW6T279T2BnzUJE9dR04A1v3 PUtItXRFLFm70eRIaZ2+Shqw/80K/QkmIkJZMc4pIz+YlTckdlY5vZ4Kva7K3CZi4GrO DpTujSxbwGlLp1jErit2kgoS/e7S5my9ROn5O/ANCGiysal+uPJZosCW/AXOEFEhx+uV c1wZ3FC31PR1htICDNyAYLfaE0IxkFIP4uCNfwcIlJ20gWoGhVTgoqJEtiqYKUj+kYsU hgAaxvv4OK8CBJy+r0STtt0cafw2srrYk26CkUV+ATrd2BkDTuBKUctXhKY8sARGMXGX 7Wiw==
X-Gm-Message-State: AKaTC00iElmROWbiv/cULN0E4a6R7iLvZFLfTZBcgP1c5nU6vkvsqYM4iO3z2zcttAigeclbZuCwVVHTKFG2CQ==
X-Received: by 10.55.158.199 with SMTP id h190mr1300136qke.202.1479878747903; Tue, 22 Nov 2016 21:25:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.140.85.101 with HTTP; Tue, 22 Nov 2016 21:25:47 -0800 (PST)
From: Martin Thomson <martin.thomson@gmail.com>
Date: Wed, 23 Nov 2016 16:25:47 +1100
Message-ID: <CABkgnnU6LzjO9ChZjzj2ArKCpHYfH5px8HinDMv=uXHBx0akzw@mail.gmail.com>
To: "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/dPaZ1ILbEasER6DynFYx9MslHVI>
Subject: [TLS] Labels in HKDF-Expand-Label
X-BeenThere: tls@ietf.org
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." <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: Wed, 23 Nov 2016 05:25:50 -0000

The grammar for the label permits the label to be 9 octets long.
That's the exact length of the prefix.

That means that it is valid to use an exporter with an empty label
string.  That seems dangerous.  I propose that we require at least one
octet:

https://github.com/tlswg/tls13-spec/pull/774