Re: [TLS] PR #699: Simplify traffic key expansion

Kazuho Oku <kazuhooku@gmail.com> Fri, 21 October 2016 01:24 UTC

Return-Path: <kazuhooku@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 1C6F61293F2 for <tls@ietfa.amsl.com>; Thu, 20 Oct 2016 18:24:08 -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 sXtxz_pVnadM for <tls@ietfa.amsl.com>; Thu, 20 Oct 2016 18:24:06 -0700 (PDT)
Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com [IPv6:2a00:1450:4010:c07::22c]) (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 3E1A9127735 for <tls@ietf.org>; Thu, 20 Oct 2016 18:24:06 -0700 (PDT)
Received: by mail-lf0-x22c.google.com with SMTP id x79so121215956lff.0 for <tls@ietf.org>; Thu, 20 Oct 2016 18:24:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/tLE8aUSJ54E4A/ju6JnMeB8XdyWz43sIG25U5gA33s=; b=p1/bhQyOp4+ZpIbm9RL7G9WlGzEgWgg27jYXj1ulhbKREwiBwXliwqgwnRtcymm7sl VcStZUjTEhVstTuB6iwGpcTtHcz2l3wf78Tr9p8SIrvwd65dD+cuMIRwUeM1EB0OTOe7 03BrChF8bKOfz0vmvAh5xn54WmFxBFUFLRw6s11yp7KIbL591MyUQc5eAj7XiIzIUGlX kRnPdwotNcRIrpCx7b83s9HE1uBOCyjyWBCZvf/qntvSoolOpL47OB8waQs8TFclhM0K 0svqTQ68T5DPkmPv+sIJIFgAijmCuplFfNnWy64/BjvPHyBcO1a77jTpuBV2EUv3cKKx eFFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/tLE8aUSJ54E4A/ju6JnMeB8XdyWz43sIG25U5gA33s=; b=PeFAhLhCaT/NCyYbsxCLlR0rgS/K6LJ4vqfbiH86uj7okfqBCzJvi+8acEVo7esvl0 eyaQLuRoMtBv3rP6mi2TnXDjkah8/OxGwdALMHS2ExWXpPJjutaWBLuPFYA6X5pfrCvC XohQqvdas11Yr6CBqIwVp2cRkueopUhFBxkkInntBxAqXdkzHLm/V7kXfdWMKjwGHyjh Hhv7KqKcNVKe1AS3FAadUzXY76i62T6ayBJcd+LcsPHaF5AdO/wIoGx8rfxdzO8Hu91F B3cEGlqxph9PTUuYKMJ+40Ev8XT6Da3bl53IA2iYV630iYZYU4YSfgpOQCUAq0VkT4u9 eOiQ==
X-Gm-Message-State: ABUngvdVj+z6N8uJtfqfNXFs/95bQcy30q0OvwsT2TwAS5lHVhZoM8OxZ9ckLhcPLcX78vhEZhpBC1QxqGG2xA==
X-Received: by 10.194.177.230 with SMTP id ct6mr1944442wjc.145.1477013044343; Thu, 20 Oct 2016 18:24:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.194.80.233 with HTTP; Thu, 20 Oct 2016 18:24:02 -0700 (PDT)
In-Reply-To: <CABkgnnV1bUayYAk+46RRXfB0oE5jSjeq_Gez4W8Ke_XukwcOow@mail.gmail.com>
References: <CABcZeBPC2tbnFeGPKXMPCkiBW7HVNVwLaYeJTKXsCEznJXGtzw@mail.gmail.com> <CANatvzygaJ6e-hNGqRR=ZE4Z5JDK7zHmuv-HNCvkBG8d2-PqCw@mail.gmail.com> <CABkgnnV1bUayYAk+46RRXfB0oE5jSjeq_Gez4W8Ke_XukwcOow@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Fri, 21 Oct 2016 10:24:02 +0900
Message-ID: <CANatvzzu2SoQp3418U9Z=BUfc7ofX6uZs34rNnJrPgUO4TYBnA@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/ZuANGLk0pH3HPUr6JT0Bc6R2E_8>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] PR #699: Simplify traffic key expansion
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: Fri, 21 Oct 2016 01:24:08 -0000

Hi Martin,

Thank you for your response.

2016-10-21 8:05 GMT+09:00 Martin Thomson <martin.thomson@gmail.com>:
> On 21 October 2016 at 06:52, Kazuho Oku <kazuhooku@gmail.com> wrote:
>> Is there any need to expand resumption_psk from resumption_secret?
>>
>> To me, it is unclear why resumption_secret cannot be used directly as
>> a psk, since the two values have the same lengths and since the secret
>> is only used for deriving the psk.
>>
>> Maybe is this something we could also simplify?
>
> draft-17 makes a simplification along the lines you suggested.  Note
> that this wasn't as easy to get right as you might have imagined for a
> bunch of reasons.

Observing the differences between draft-16 and 17, I understand that
it has become much simpler. In fact, I have decided to skip
implementing the draft-16 style NewSessionTicket and go directly to
implementing draft-17, since the newer draft seems easier to
implement. Thank you for making those adjustments to the draft.

That said, the point I am trying to raise is not something that was
fixed in draft-17. It's something that has become apparent in draft-17
thanks to the simplifications being introduced.

In draft-16, resumption_secret was used for two purposes: generate
resumption_psk and resumption_context. So it made sense to derive
resumption_psk from resumption_secret.

But in draft-17, my understanding is that resumption_context has been
abolished. As the result, generation of resumption_psk has been the
only use of resumption_secret.

That is the reason I thought it might be worthwhile to remove the
following formula in section 4.5.1:

   resumption_psk = HKDF-Expand-Label(resumption_secret,
                                      "resumption psk", "", Hash.Length)

and use resumption_secret as the psk.

Thank you in advance. Please forgive me if I am missing something.

-- 
Kazuho Oku