Re: [Cfrg] RGLC on draft-irtf-cfrg-chacha20-poly1305-01.txt

Yoav Nir <ynir.ietf@gmail.com> Sun, 12 October 2014 15:00 UTC

Return-Path: <ynir.ietf@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 52E291A1B34 for <cfrg@ietfa.amsl.com>; Sun, 12 Oct 2014 08:00:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 NtSGczDNxGt3 for <cfrg@ietfa.amsl.com>; Sun, 12 Oct 2014 08:00:51 -0700 (PDT)
Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5ACB91A1B1D for <cfrg@irtf.org>; Sun, 12 Oct 2014 08:00:50 -0700 (PDT)
Received: by mail-wi0-f177.google.com with SMTP id fb4so5547279wid.16 for <cfrg@irtf.org>; Sun, 12 Oct 2014 08:00:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=N701ry9hnvDzupeTcGtWuW+FJ4OLKJ3sf4aNjIjt9h8=; b=sN7VoS+5UQl/tp/eBlnIWYBi7iNMROS8oFHA1DM5NJOSwFniYefNKifMSWKnvfGIH6 /PzwdrTaoFbGx+Fv+EhnhIlvEopZkG+E44qkCQhBr8T5ty0q6Z8ZQoNPBehi83RNK3cG P5G46xhb75ZrHgAmFjltcDw3tSxmLhPrXMbB7EqB7T0Kjls1XMETrixSXMkatmk+Y6FA Iu86uJeCpeeeXkEqJGlMsuISKiQ9rPEVhVuz4qjKOu7lmXZ2F958BPJD5vR6Zp7QSRR+ oHHFRe0aGi3EXGXC0l5+p3I4Yirca3zRMS7gwV11avGWktQHtWTMwpjwWZjP7PsKHfBd s+pQ==
X-Received: by 10.180.10.38 with SMTP id f6mr15075605wib.30.1413126048805; Sun, 12 Oct 2014 08:00:48 -0700 (PDT)
Received: from [172.24.248.64] (dyn32-131.checkpoint.com. [194.29.32.131]) by mx.google.com with ESMTPSA id fv2sm8209699wib.2.2014.10.12.08.00.47 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Oct 2014 08:00:48 -0700 (PDT)
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: text/plain; charset=windows-1252
From: Yoav Nir <ynir.ietf@gmail.com>
X-Priority: 3 (Normal)
In-Reply-To: <def39d05b9dfd967b3219f2bcf1af6a0.squirrel@www.trepanning.net>
Date: Sun, 12 Oct 2014 18:00:45 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: <59B73C9D-3292-4253-A7B0-2E1ABC73FF67@gmail.com>
References: <542D48CD.9060404@isode.com> <CAGvU-a7zd9jB_0vwipe4ALO5u5F0tk5BrfQ-0B5sLNjNRjZiPQ@mail.gmail.com> <9a348a00f974bffba1c3785464cd2032.squirrel@www.trepanning.net> <1CFF7FC2-DDC9-46AF-B574-4126379232DB@gmail.com> <CAMfhd9UQr6wR4ooxfvkNDpmura5oSFask2JhnD+OERDA6tB30A@mail.gmail.com> <def39d05b9dfd967b3219f2bcf1af6a0.squirrel@www.trepanning.net>
To: Dan Harkins <dharkins@lounge.org>
X-Mailer: Apple Mail (2.1878.6)
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/aQl2cJwPCBkuWRsQCzq6yVAnyUs
Cc: Adam Langley <agl@imperialviolet.org>, "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] RGLC on draft-irtf-cfrg-chacha20-poly1305-01.txt
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Oct 2014 15:00:53 -0000

On Oct 7, 2014, at 1:35 AM, Dan Harkins <dharkins@lounge.org> wrote:

> 
> 
> On Mon, October 6, 2014 2:53 pm, Adam Langley wrote:
>> On Mon, Oct 6, 2014 at 2:50 PM, Yoav Nir <ynir.ietf@gmail.com> wrote:
>>> I’m not quite sure I follow. The construction uses a 96-bit nonce
>>> precisely
>>> so that we comply with RFC 5116. What requirement of 5116 are we not
>>> fitting
>>> into?
>> 
>> I think Dan is just saying that the limits need to be specified. For
>> example see page 8 in
>> https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-5
>> (although these values are wrong now).
> 
>  I'm sorry, I meant the formation of the AAD. Is it a single blob that
> gets passed to the algorithm? Does the mode allow for multiple distinct
> AAD inputs ala RFC 5297? What if the protocol I want to use with this
> mode has several distinct blobs I want to use as AAD (like how IEEE Std
> 802.11 uses AAD with AEAD cipher modes-- take these bits and then
> concatenate these addresses, etc)? I suspect it's all just a single
> concatenated blob but it would help to say so explicitly and to define
> the RFC 5116 interface.

Oh, I see. OK. Our construction does not make any particular provisions for multiple blobs of AAD. Of course the application is free to create such a structure by making it a series of TV or TLV, or if they really want to be fancy, a BER-encoded SEQUENCE (please don’t), but the code for ChaCha20-Poly1305 does not recognize such a structure.

>  It obviously takes AAD since section 2.8 mentions it as something to
> include as input to AEAD_CHACHA20-POLY1305. So I'm suggesting you
> define what AAD looks like when it is delivered to the mode: "Distinct
> AAD shall be concatenated into a single input to
> AEAD_CHACHA20-POLY1305", for example.

OK. I’ll add a sentence like that.

Thanks,

Yoav