Re: [TLS] I-D Action: draft-ietf-tls-ecdhe-psk-aead-00.txt

Martin Thomson <martin.thomson@gmail.com> Tue, 08 November 2016 03:50 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 C0B2E1295DB for <tls@ietfa.amsl.com>; Mon, 7 Nov 2016 19:50:38 -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 uSWM6rYnFYv8 for <tls@ietfa.amsl.com>; Mon, 7 Nov 2016 19:50:37 -0800 (PST)
Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (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 F19181294B4 for <tls@ietf.org>; Mon, 7 Nov 2016 19:50:36 -0800 (PST)
Received: by mail-qk0-x234.google.com with SMTP id x190so200929088qkb.0 for <tls@ietf.org>; Mon, 07 Nov 2016 19:50:36 -0800 (PST)
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=78bl3uV9wau+3mUmzf7nErT9v20RQaKpJrY7NmLqHNI=; b=h7yrMO6IPTCXku3bEw35M5CSv0sln2KqByhDsSrcUcyOWHPxWmsPZ2VhsMZLfhVgLp IhLRP4xoisrHf0N0XM8aAc4ALkIAeKyRxODQJaYKoUD0cDcCCHnycjnLJJ93sJHI8Lk7 9ZY8tAa0EkOUVplMXglfjKof+c0RuFdKr3D/dcYowUcXYwtiVnCSTYrWGwoYuyqh/Gkl M0oIFVunenZXPEUMoZZfTeEUhUDVCMYFfipAvV9Ybohx2TjGurWfSNMIvCMjf/RF0e41 soBGg9y4l8WTUSHAuFg+LoNK3BEj0eU2W6RVT8S2/dvnUJzdhMtsMMXv2tyxlKpuYEwX ghMg==
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=78bl3uV9wau+3mUmzf7nErT9v20RQaKpJrY7NmLqHNI=; b=iqel5NocJWPQlaxaz0qJ0W7ERrEXsj+xOEyw6/oq+t8jHen9a6kC/EwAKqtTL0Q4vt MZE++ds0I640k9uZgNlJC+IggIVv9Uwk5S0J5z3zyGgmsxgs/B1tx8kmReoSiuOPSfKK xQzM6KClXxXZkyEsdbfmY89Y5YYAm2AZbM2PhkyfGSDl97oDMl48PV2Xfr/L0yyrY2dV 22wEY+5/OOgEEnsXtOASoBH47OwvCoyWL4oc9PPcYC9knN9RjzWQhh4AZnfYGQshEXlc UJ2xbbpGpJgRsOyrvdIGwSVCfshjM/Dg90h45F4IL/zJXGwCUO0YNggHbwO3XqViAGwe rnwA==
X-Gm-Message-State: ABUngvcxmEwCQdV226OLQ+GDyy5SNEWW0sl98VwZpvtHhMJnB9Z6+RM40wv4kF5HC2B4gBctLhusGiiZg/AAyA==
X-Received: by 10.55.12.2 with SMTP id 2mr9948781qkm.68.1478577036150; Mon, 07 Nov 2016 19:50:36 -0800 (PST)
MIME-Version: 1.0
Received: by 10.140.85.7 with HTTP; Mon, 7 Nov 2016 19:50:35 -0800 (PST)
In-Reply-To: <CADZyTkm05WD_DSHFUJMtPughDQKuS2-ZwRVwuHPFdLh=tAthzA@mail.gmail.com>
References: <20160527171935.11166.82258.idtracker@ietfa.amsl.com> <7a3597ae-92b8-23c8-b2c3-357f6fdb6792@bouncycastle.org> <6CE18F17-F8E0-4F4A-95A4-BE9B3A8250A2@sn3rd.com> <80bc8ae67e0ba0e2355b26bdbb34d1b6.squirrel@www.trepanning.net> <D41FA5C6.52E9B%john.mattsson@ericsson.com> <CADZyTkkJv2yyd5p7CR8p5gHCE+gjWQNu-+39N4RW-26gh+NzSA@mail.gmail.com> <CADZyTkmHwL=2MVQOUKwDkMur_gMiT_00Q6EY-h=zOUbfeddAOA@mail.gmail.com> <CADZyTkm05WD_DSHFUJMtPughDQKuS2-ZwRVwuHPFdLh=tAthzA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 08 Nov 2016 14:50:35 +1100
Message-ID: <CABkgnnXZPCFD6=SdNcFun6QdADg+Jk-N45kx=9BktnCVsJ3Piw@mail.gmail.com>
To: Daniel Migault <daniel.migault@ericsson.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Jal1Z3AnL5NdYFgxWk9OOqL2H40>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] I-D Action: draft-ietf-tls-ecdhe-psk-aead-00.txt
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: Tue, 08 Nov 2016 03:50:38 -0000

I don't understand this.  I have no problems with a recommendation
(i.e., SHOULD), but you will find that many implementations will not
comply with these requirements when pushed.

On 8 November 2016 at 14:09, Daniel Migault <daniel.migault@ericsson.com> wrote:
>    The cipher suites defined in this document are based on the AES-GCM
>    and AES-CCM Authenticated Encryption with Associated Data (AEAD)
>    algorithms AEAD_AES_128_GCM, AEAD_AES_256_GCM, AEAD_AES_128_CCM, and
>    AEAD_AES_256_CCM defined in [RFC5116], AEAD_AES_128_CCM_8 and
>    AEAD_AES_256_CCM_8 defined in [RFC6655].
>
>    For the AES-128 cipher suites, the TLS Pseudorandom Function (PRF)
>    with SHA-256 as the hash function SHALL be used and Clients and
>    Servers MUST NOT negotiate curves of less than 255 bits.

This is two statements:

1. The PRF hash for these suites is SHA-256.  That's not a
requirement, you just define it, no 2119 language.

2. Using a weak key negotiation means that your key negotiation is the
weak point.  Here, my preference is to avoid stating a requirement,
but that's only because it's very hard to get right.  Otherwise, use a
SHOULD and copy from HTTP/2:

"When choosing these cipher suites, servers SHOULD select a key
exchange that is at least 2048 bits for cipher suites that use
ephemeral finite field Diffie-Hellman (DHE) [TLS12] and 224 bits for
cipher suites that use ephemeral elliptic curve Diffie-Hellman (ECDHE)
[RFC4492]."

Getting into the exact number of bits is a bit self-defeating.  4Q
isn't 255 bits.  25519 isn't either if you count them all.  Both seem
to be more than adequate in strength though.

>    For the AES-256 cipher suites, the TLS PRF with SHA-384 as the hash
>    function SHALL be used and Clients and Servers MUST NOT negotiate
>    curves of less than 384 bits.

As above, but with bigger numbers.

>    TLS enable curve negotiation but not for code point.  This makes
>    restrictions on code points hard to implement.  As a result Endpoints
>    MAY treat negotiation of key sizes smaller than the lower limits as a
>    connection error of type insufficient_security(71) for TLS1.2 and
>    TLS1.3.

Nits: 'enables'; there is a space between "TLS" and the version number.