Re: [TLS] draft-ietf-tls-tls13-21 posted

Martin Thomson <martin.thomson@gmail.com> Thu, 06 July 2017 04:11 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 E56D8126DCA for <tls@ietfa.amsl.com>; Wed, 5 Jul 2017 21:11:51 -0700 (PDT)
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 Ijv-WoXDRBo0 for <tls@ietfa.amsl.com>; Wed, 5 Jul 2017 21:11:50 -0700 (PDT)
Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (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 CE2421243FE for <tls@ietf.org>; Wed, 5 Jul 2017 21:11:49 -0700 (PDT)
Received: by mail-lf0-x230.google.com with SMTP id b207so4189187lfg.2 for <tls@ietf.org>; Wed, 05 Jul 2017 21:11:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wvPSE+g2Z3+Y3F2nQzluyRY4cIpR2CThribs/+VE5JM=; b=o6IsHjZocRS56xKEqN5+6c+K70H1B1z570qtHgrScN9tR4SLC1Ie9fqWJ9lPMt5pXJ W9cZyXJUX/5DxWNN/bYTclu2q12yCxtY7TghSZ1t0HPhk/jj9AnWKWhnNGtsnSuKxMbr kcoA734bM0jwCacjuWqJMRBmBjEor4qdXQ47mdCPvKZosxGggXlzRSPlM5F2HG+MtpsB jRNIsLdgpLKTg9f6bBhlX77Ei+24qEyKTSf5vqVzcqCPL3IQaXbh779T+MQ0J7v6UGot 39S7Y8zZ7r09Did8bfvCgWS1IJJTzcJNhptDnXYXtgdzVuPZ+pAK6oxQDDFf4OCjjwA3 jkgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wvPSE+g2Z3+Y3F2nQzluyRY4cIpR2CThribs/+VE5JM=; b=ePo+G59svYhZn7KLSwJbxqDJ+Dn5sDWww0VlRzajkzTD3TmoFhTrysjJJQ99LRyOCQ OA4yAUp35u51xPFUYLHA9bIwfR6SirYdxxxRWKlgUDGgqTw62JraTC4BmvhSLR0kghfw YmOPG9Beh2XiacJhZIBon2riyV7ZWFrLhqAO6s3psE7vxNpS201iIFyU/SowMCTSOTkd GbsEksGrlO0LCZq74XB5SCnfgGnpDG+EFe7vi+YozOxpDK31Y3095ygKwIkgbA9BP/W6 7BhyXvgqMZU+ZrFqIWZlRj+XiUaAbQGDH8N60oridn7PZ0wsU3vWlyhPI5H0bJvvJBkR IZ6A==
X-Gm-Message-State: AIVw113YViPY/3LQGYkfJ5Dj7MU6h/L1kKWvJESZ8+TpOPLEAdMcxHeQ MRQ0S0hEGdGxdXkvwtb7jkxFFGEnbojI
X-Received: by 10.46.87.76 with SMTP id r12mr1411552ljd.128.1499314308124; Wed, 05 Jul 2017 21:11:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.69.84 with HTTP; Wed, 5 Jul 2017 21:11:47 -0700 (PDT)
In-Reply-To: <20170706.130627.753481879086572434.kazu@iij.ad.jp>
References: <CABcZeBMgYNAfjD6_mDCQ4OmvifEXXP6R_FzA6o5BCRPm78kj0Q@mail.gmail.com> <20170706.111918.990342802355467009.kazu@iij.ad.jp> <CABkgnnUpUXWTcYgjr7Wd5T9KZ=c+cpEUfrm9V_Vtwgi-RVgGGw@mail.gmail.com> <20170706.130627.753481879086572434.kazu@iij.ad.jp>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 06 Jul 2017 14:11:47 +1000
Message-ID: <CABkgnnXXTVdvb+073VBvH7wXWYzpercrdBiHa8550Cpf_brGMw@mail.gmail.com>
To: Kazu Yamamoto <kazu@iij.ad.jp>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/VJO43VDkL8ChnBU-PZ_ifz0VYxI>
Subject: Re: [TLS] draft-ietf-tls-tls13-21 posted
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: Thu, 06 Jul 2017 04:11:52 -0000

We need the length field so that calling the function with different
lengths results in different outputs.  Not that anyone should be doing
that, of course.

On 6 July 2017 at 14:06, Kazu Yamamoto <kazu@iij.ad.jp> wrote:
>>>        HKDF-Expand-Label(Secret, Label, *Value*, Length) =
>>>             HKDF-Expand(Secret, HkdfLabel, Length)
>>>
>>>        struct {
>>>            uint16 length = *Value.length*;
>>>            opaque label<7..255> = "tls13 " + Label;
>>>            opaque hash_value<0..255> = *Value*;
>>>        } HkdfLabel;
>>
>> Length is the size of the output, so you don't want to assign
>> Value.length to that field in the struct.
>
> Yes. I would remove the "length" field, too.
>
>> Also, you forgot to rename hash_value in the struct.
>
> You are right.
>
> --Kazu
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls