Re: [Cfrg] I-D Action: draft-nir-cfrg-chacha20-poly1305-01.txt

Ted Krovetz <ted@krovetz.net> Thu, 13 March 2014 15:16 UTC

Return-Path: <ted@krovetz.net>
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 F0E481A09A8 for <cfrg@ietfa.amsl.com>; Thu, 13 Mar 2014 08:16:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.821
X-Spam-Level:
X-Spam-Status: No, score=-1.821 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] 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 HtCnYAPVWThw for <cfrg@ietfa.amsl.com>; Thu, 13 Mar 2014 08:16:52 -0700 (PDT)
Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by ietfa.amsl.com (Postfix) with ESMTP id 8AA5E1A09F9 for <cfrg@irtf.org>; Thu, 13 Mar 2014 08:16:52 -0700 (PDT)
Received: by mail-pb0-f47.google.com with SMTP id up15so1237260pbc.34 for <cfrg@irtf.org>; Thu, 13 Mar 2014 08:16:46 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=/TX/E9bg5REmIGpzAdm99b45Xmki3kPVUJo5rqyNqdk=; b=AuNqRW+EjRZcrc0XHFLClkm41IVCPTCDF5noxAsmKvotGBFdUB3jSV4F21dV5t8eKl 1VIRtecb8VnoqdT3+fMQE5H/RXCV/pWw1G4gEvg6bdcOYdIJhhE4neWCe6spOrQcE74D 0li7lrxSns2/gsMKjRuouqzSKWo96WVh0VUx3N1gzTz7NoL64cEBxiuM1yezQYblSK/J ZujTqe8i8u3sVfODNocCsXREEEtTbeoDaUjX6Txc4M+C3IP48aNrUJ/npb/kS0dXVcXU BjVvqbttU8EAQdUutKP4V9/odbU9GYw+syCIIhe7dxTL5wT9M0KcvAzgdZSiUoh6J1Xc 1Jfg==
X-Gm-Message-State: ALoCoQkh+gFF95+yh9c31k3VF0ihMqcywEjrsR/Q+bTiu18DyxC7FLB3d7SdkK0tdLsm4Liipd0E
X-Received: by 10.66.251.42 with SMTP id zh10mr3066495pac.84.1394723806134; Thu, 13 Mar 2014 08:16:46 -0700 (PDT)
Received: from [192.168.1.100] (adsl-69-230-109-90.dsl.scrm01.pacbell.net. [69.230.109.90]) by mx.google.com with ESMTPSA id rk15sm11235539pab.37.2014.03.13.08.16.44 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 08:16:45 -0700 (PDT)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\))
From: Ted Krovetz <ted@krovetz.net>
In-Reply-To: <411966EE-1A23-4B38-8A50-E479832CC13B@gmail.com>
Date: Thu, 13 Mar 2014 08:16:49 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <9AB2F389-409D-408E-BAB6-000E74E6E43A@krovetz.net>
References: <20140228121448.1c123bab@chromobil.localdomain> <1AC3290E-64A3-4D74-AE2B-C578236E60EA@krovetz.net> <411966EE-1A23-4B38-8A50-E479832CC13B@gmail.com>
To: Yoav Nir <ynir.ietf@gmail.com>
X-Mailer: Apple Mail (2.1874)
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/ewcxOH6xwoIz_BRmKbFDUSLFmvg
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] I-D Action: draft-nir-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: Thu, 13 Mar 2014 15:16:56 -0000

> I guess I should change the text to say that it’s a little-endian representation of integers limited to 32 bits.

I would recommend that you never use endianess to describe integers. An integer is an integer, and endianess has only to do with cpu-memory interfacing. An integer can be read little-endian from memory, but the resulting integer is not a little-endian integer, it's just an integer. It may be clearest to talk about inputs and output being strings and each successive 32-bit chunk getting byte-reversed.

So, for example, the input to chacha is a 256-bit key string, 96-bit nonce string and 32-bit unsigned integer. The first thing that happens in chacha is the key and nonce are split into 32-bit unsigned integers by byte reversing each 32-bit chunk and then interpreting each 32-bit chunk as an unsigned integer. Now we're in the realm of integers, and the word endianess is never mentioned.

-Ted