Re: [TLS] ChaCha and IVs

Bodo Moeller <bmoeller@acm.org> Thu, 06 March 2014 01:37 UTC

Return-Path: <SRS0=caPd=YH=acm.org=bmoeller@srs.kundenserver.de>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74C281A0037 for <tls@ietfa.amsl.com>; Wed, 5 Mar 2014 17:37:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.476
X-Spam-Level:
X-Spam-Status: No, score=-1.476 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HELO_EQ_DE=0.35, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.547, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no
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 4LOF4Byjb61P for <tls@ietfa.amsl.com>; Wed, 5 Mar 2014 17:37:54 -0800 (PST)
Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by ietfa.amsl.com (Postfix) with ESMTP id 235821A0031 for <tls@ietf.org>; Wed, 5 Mar 2014 17:37:53 -0800 (PST)
Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0LcPxe-1X1cok2UHW-00jpG3; Thu, 06 Mar 2014 02:37:48 +0100
Received: by mail-yk0-f169.google.com with SMTP id 142so5002917ykq.0 for <tls@ietf.org>; Wed, 05 Mar 2014 17:37:47 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5lIm0hfw0ROA4Ga6TUcHAwy+YsaOCGnrO/ye/FzbX3o=; b=VMVgrVQrTEuYudC07XFK2R/cVt/tkCxQIVKWa9gjyoaT1ZKzf0i6YKn1NWFvk+7TdM meGmqA6tRUHBjC6RgNDM14qICqre4D6vIYKHKxKJ74Z6ibblF31mZ9PGYTHU7+kinSji PukEKd0PtTAiScZh3V4HOzSIhIYlW/DkXiN4CS3GHclIiazR7LYGEwfcqt+8eRI6Wxro ih2ATciBughwW0vDXMm5Xw2gG1nklN4R+zQFrcZKsBAbDUAN0dsV3dpWE2Kk/xRsJwbx 5EXNJ1o+cldjkSWEYMpNCwWOMfh6fXe3pFj8r5zm5H+7X2te1/z78O2FrhvfUdhXRKxB cM0w==
MIME-Version: 1.0
X-Received: by 10.236.47.162 with SMTP id t22mr450572yhb.123.1394069867564; Wed, 05 Mar 2014 17:37:47 -0800 (PST)
Received: by 10.170.78.5 with HTTP; Wed, 5 Mar 2014 17:37:47 -0800 (PST)
In-Reply-To: <CAK3OfOg5pqF_sEmKYJVxqmiekkPrycqbA1sbK8H7=EAtWFQMrw@mail.gmail.com>
References: <53160513.20703@bbn.com> <1393955839.20861.20.camel@dhcp-2-127.brq.redhat.com> <53161825.7060409@bbn.com> <CADMpkcLqWOr6kq4VjTatpDGW8Ryf73V+YziOf3Op3waciG9o4w@mail.gmail.com> <CAK3OfOg5pqF_sEmKYJVxqmiekkPrycqbA1sbK8H7=EAtWFQMrw@mail.gmail.com>
Date: Wed, 05 Mar 2014 17:37:47 -0800
Message-ID: <CADMpkcKJMTfu_=2wASTu0i8oz69Xwn=keUOd-jKoGQFZa-W8LQ@mail.gmail.com>
From: Bodo Moeller <bmoeller@acm.org>
To: Nico Williams <nico@cryptonector.com>
Content-Type: multipart/alternative; boundary="001a11c1ec5c3f958e04f3e62fcd"
X-Provags-ID: V02:K0:OJjypjzIYEjwjtZWe6+C4gAk9nIyD95xf0LHwNgkOVj wumiQ87pmeXXuc/YeOGCLVIg2bxp8w2+jDF3addBKr3amIQp5+ c/vbpFe+V1Hl4+Pn/FpNyHv7hWc4Dv+sb+JeBmuFe/hB/O9eUj BD/BuH0UHKL1ZOteiV4Tsge476qvttLf3W3AtzZFosrN/tUFm5 ZQjMNX1v8JYwpUNRLO58xB7L6WqDy8zHCKNCqXbEZkjxC/lYcQ KwpvSEl4jF1Der0L83SLp4x36x3X44Byi9oQq/Wqlr62dS1Cl9 k/yEkpCJHXuhgK/T7IiNj2UeD56TtZU4C7e8bfgyPmSBWry6ki GWSGhlJjJdIvvesVG8kY7cWAFiRjz8ejaaB3piA3CM6PnHZxFC yYfqugK05/P3wlWJ1XMiJebysiScbqFaA+7giPpFJBvdVgiign 0qqed
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/0OI4A3SX6R_yN_7cA5_qnVxXx-I
Cc: Stephen Kent <kent@bbn.com>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] ChaCha and IVs
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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 Mar 2014 01:37:55 -0000

Nico Williams <nico@cryptonector.com>:

> On Wed, Mar 5, 2014 at 6:35 PM, Bodo Moeller <bmoeller@acm.org> wrote:
>


> > I suppose if this becomes an actual concern for evaluation, you could
> create
> > a more easily evaluable module that accepts explicit IVs but checks that
> > these increase monotonically between invocations.  (Accepting *explicit*
> IVs
> > doesn't mean you have to accept *arbitrary* IVs.)
>
> This.
>
> However in the DTLS case there's no way to make the sequence numbers
> be monotonic.  What the module could do is keep its own IV sequence
> number window and reject the use of sequence numbers that are too old
> or reused...
>
> ...but note that in the decrypt case it may still be useful to know
> that a message is a replay and yet get the authentication tag state
> and plaintext outputs.  The GSS-API's GSS_Unwrap() function supports
> this.
>

Right -- sorry, when I wrote the above, I only meant a check when
*en*crypting. *De*cryption is normally expected to have to handle
potentially arbitrary explicit IVs, anyway: for example, if encryption uses
random IVs, decryption will just have to accept these -- you wouldn't be
generating random IVs in the decryption module too :-).

Bodo