Re: [TLS] Comments on nonce construction and cipher text size restriction.

Eric Rescorla <ekr@rtfm.com> Tue, 24 May 2016 19:05 UTC

Return-Path: <ekr@rtfm.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 8545B12D989 for <tls@ietfa.amsl.com>; Tue, 24 May 2016 12:05:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 9goA8sUHLm1Z for <tls@ietfa.amsl.com>; Tue, 24 May 2016 12:05:10 -0700 (PDT)
Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (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 A6B8612D9BB for <tls@ietf.org>; Tue, 24 May 2016 12:05:09 -0700 (PDT)
Received: by mail-yw0-x229.google.com with SMTP id o16so25581444ywd.2 for <tls@ietf.org>; Tue, 24 May 2016 12:05:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vM99zL+ACcfUdnaxSaLsDF2cHmiyAREvNNnT+IhE0eA=; b=XANAu7qG2L//zVnVb2U5w6HajMxQ+c5KJic7xTe5nZg8adR5gUqEf1uFP2wwUkmseC iyRRIg39wzp9hFe6WJzoNhVfK8VQ8WEsfcX5KEDJUNMCfNPI4tTzxliftCiDpkJ4S1tN XyZodkw+hHA/rHpOUnWh4lwsJeBquOAcvdBgMW4+YK1PoodWdV4dsuBdZM68VMXTAvu1 u343+AXVXvNTveLyTLL1T9qae0FbMEXQVk/uRAtyFCHP3H0X7nh0YHgKAIse7vm1f1nu AnqXktq/Go8w2iyqIgyW0Z47PXdr18HLWtt9QyyE1Lpy/++TCJIUGO5eqBdz0mgi4Edj PuyQ==
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=vM99zL+ACcfUdnaxSaLsDF2cHmiyAREvNNnT+IhE0eA=; b=b86gJ/eTzb4+Hnx0dVZcm+EJh9iNcPEx2OvydaOjQxaLtl3d9EiCWiULiqh5N9w1Tj Y/gDZo5UjRimZPreIDgoispT1ncMMU4tiwcANhp7jXXG6uX93oPls273ah7/hZ1r6OoX v12Mqt+ki6N8f5INPmkNpmmQeVpcs5oU4cYzcYEgphf/3pB7LzNNCz8Vs/XboOF4Pgvu rx+aQKmQK/eUnu4+Kl/MB0UuRq1riGKOHgBuBXy73HQOE5mTnZ2GLkc7vIpWEaYiBKHw quJwNk5Cil/e+3GhkxRH0z4A1Tf2Vrx5RipKXKmI9qYSpEh0M8VvWvluimWsV1i+K1NL 53UQ==
X-Gm-Message-State: ALyK8tKlzx3I/M56VoMf+oCxURK/i5HnGK8llxkDdPNoIMdMH6rTJUuQJP8idackqljjuvnkoPyB5gSQb4+/ow==
X-Received: by 10.129.160.149 with SMTP id x143mr3656170ywg.180.1464116708939; Tue, 24 May 2016 12:05:08 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.132.12 with HTTP; Tue, 24 May 2016 12:04:29 -0700 (PDT)
In-Reply-To: <D36A1CA2.267DC%qdang@nist.gov>
References: <D369E95C.267A5%qdang@nist.gov> <CABkgnnVAVYDuWUV0EJ=9iJ69KOwYxR=tzRRB+A96qwKmco8qEg@mail.gmail.com> <D36A0B54.267BA%qdang@nist.gov> <CABkgnnUa8G7UJ9BuQ8zHzuwe54-D_gPKFBE9DPSK6C=a-O28Kw@mail.gmail.com> <D36A1CA2.267DC%qdang@nist.gov>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 24 May 2016 12:04:29 -0700
Message-ID: <CABcZeBNv1bzaT-y7OscX4M2Q5bQxeFM=XkkqnOvKVpE=f3GFLg@mail.gmail.com>
To: "Dang, Quynh (Fed)" <quynh.dang@nist.gov>
Content-Type: multipart/alternative; boundary=94eb2c07ee0458e53705339b3cb2
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/v0xnJu9Nz2MvY7siDW9VdPAygyU>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Comments on nonce construction and cipher text size restriction.
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, 24 May 2016 19:05:17 -0000

On Tue, May 24, 2016 at 12:00 PM, Dang, Quynh (Fed) <quynh.dang@nist.gov>
wrote:

>
>
> On 5/24/16, 2:42 PM, "Martin Thomson" <martin.thomson@gmail.com> wrote:
>
> >On 24 May 2016 at 10:46, Dang, Quynh (Fed) <quynh.dang@nist.gov> wrote:
> >>>We discussed this at quite some length.  I originally took your
> >>>position, but the IVs add an extra layer of safety at very little
> >>>cost.
> >>
> >> I don¹t see any extra layer here.
> >
> >
> >The argument here is that there are only 2^128 keys and some protocols
> >have predictable plaintext.  A predictable nonce would allow an
> >attacker to do some pre-calculation with a large number of keys to get
> >a chance of a collision (and a break).  It's a long bow, but not
> >entirely implausible.
>
> Ciphers use nonces are designed/proved to be secure when nonces are
> predictable: nonces are not random values.
>

I think you may be misunderstanding. There is a time/space tradeoff here
when the
nonces are predictable that does not exist when they are random. This is
not a
vulnerability in the cipher and applies even if the keystream generator at
the core
of the cipher is PRF_k(nonce).

-Ekr


> >
>
>