Re: [IPsec] ChaCha20 & Poly1305, AEAD and other modes

Daniel Migault <mglt.ietf@gmail.com> Mon, 10 March 2014 08:43 UTC

Return-Path: <mglt.ietf@gmail.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EEBAF1A0404 for <ipsec@ietfa.amsl.com>; Mon, 10 Mar 2014 01:43:13 -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 IMBQp4RD0Hy1 for <ipsec@ietfa.amsl.com>; Mon, 10 Mar 2014 01:43:11 -0700 (PDT)
Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by ietfa.amsl.com (Postfix) with ESMTP id 621321A03FD for <ipsec@ietf.org>; Mon, 10 Mar 2014 01:43:11 -0700 (PDT)
Received: by mail-we0-f172.google.com with SMTP id t61so8260185wes.17 for <ipsec@ietf.org>; Mon, 10 Mar 2014 01:43:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AhzRL6l4H82Z7L7tiBu+xtOgKO+uYmBVNabZWkMg8dc=; b=mW71zfYoUnqyN9uAAZRZZ9u8UDoyyMLLpbIbM2q8AMfLNdbGX5YP2WS8XVvfyxAY+T IssjewhdllDtmJLXY7pBIeQGBY7bwIaoOq911ZxHVpbDD9YqQKkYBKEmuXmGBbxrjKPw VAKg5TJeC135auMihDTdUCGW2NhotHy7kBpFTBMesYCLqnhaPhrn+UuHroe+vVwG6pmu ZWgzEOD1Wt4kESKWXIdZs+wrRUoCI/3bVBMi0ui34ttNev5Il+ibglVZ7MUev0IVceq6 3ggC/YIPtKAVLZIl5pOrazhXG1G3FGGfxUqmIs+TQjqSu2VOJITfRiDVGylU6LAhFznC hJcQ==
MIME-Version: 1.0
X-Received: by 10.180.89.225 with SMTP id br1mr7049898wib.38.1394440985636; Mon, 10 Mar 2014 01:43:05 -0700 (PDT)
Received: by 10.194.171.225 with HTTP; Mon, 10 Mar 2014 01:43:05 -0700 (PDT)
In-Reply-To: <CAGvU-a5TSGeNm9E_k-3bnbpCtthrpS81VVXcq7AkYKjOwYQ04g@mail.gmail.com>
References: <CAGvU-a619O9AGJcwod3uYXKNnBRhcWdZdBnoqnmuDECPHnX-6A@mail.gmail.com> <531D5508.4000707@gmail.com> <CAGvU-a5TSGeNm9E_k-3bnbpCtthrpS81VVXcq7AkYKjOwYQ04g@mail.gmail.com>
Date: Mon, 10 Mar 2014 09:43:05 +0100
Message-ID: <CADZyTk=Zmj=H9ob2VXmrfhsYSKfXZu=Y87tiaCv8556UHyydPg@mail.gmail.com>
From: Daniel Migault <mglt.ietf@gmail.com>
To: Yoav Nir <ynir.ietf@gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Archived-At: http://mailarchive.ietf.org/arch/msg/ipsec/VGgctE8IPc_J3U9XhLbzkji-65w
Cc: ipsec <ipsec@ietf.org>
Subject: Re: [IPsec] ChaCha20 & Poly1305, AEAD and other modes
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Mar 2014 08:43:14 -0000

Hi,

My understanding is that Poly1305 and chacha20 are provided as
"alternatives" to SHA* or AES*. Specific devices with AES
accelerations may be willing, for performance optimization, to use
Poly1305 instead of SHA with AES. For this reason it might be better
to have:
    - chacha20 as a stand-alone cipher
    - Poly1305 as a stand-alone MAC

On the other hand, providing the AEAD chacha20-poly1305 may be helpful
for end users or admins. Especially if security consideration
recommends AEAD. Would it bring too much complexity to also define
AEAD chacha20-poly1305?

BR
Daniel



On Mon, Mar 10, 2014 at 9:15 AM, Yoav Nir <ynir.ietf@gmail.com> wrote:
>
>
>
> On Mon, Mar 10, 2014 at 8:00 AM, Yaron Sheffer <yaronf.ietf@gmail.com>
> wrote:
>>
>> Hi Yoav,
>>
>> Can you explain why we need Poly1305 at all? We have SHA-2 and will
>> probably adopt Keccak (SHA-3), so it's not like we don't have a backup.
>
>
> Sure.  Poly1305 is fast.Faster than SHA-1, SHA-2, and Keccak. I haven't
> compared it to GMAC on Intel, but that is fast only becuase it has special
> Intel instructions like PCLMULQD. Both ChaCha and Poly1305 can be fast in a
> plain C implementation, so they're fast on any platform.  Poly1305 needs
> another algorithm to generate the per-message keys. That could be AES as in
> DJB's original paper, or it can be ChaCha as in this draft (with or without
> the AEAD).
>
>>
>> Let me suggest that we adopt *only* ChaCha20, which can be combined with
>> any integrity protection algorithm in the normal ESP way. Is there any extra
>> value (maybe code sharing?) in predefining an AEAD?
>
>
> The AEAD version is already in at least one crypto library (NSS as used in
> Chrome) and there's a patch that AGL donated to OpenSSL (not in there yet).
> So in addition to AEADs being fashionable, this combination makes sense for
> performance, especially on non-Intel platforms.
>
> Yoav
>
>
> _______________________________________________
> IPsec mailing list
> IPsec@ietf.org
> https://www.ietf.org/mailman/listinfo/ipsec
>



-- 
Daniel Migault
Orange Labs -- Security
+33 6 70 72 69 58