Re: [Cfrg] (flaws with Curve25519 DH function, if one does not check the output) Re: Elliptic Curves - curve form and coordinate systems

Viktor Dukhovni <ietf-dane@dukhovni.org> Tue, 17 March 2015 00:48 UTC

Return-Path: <ietf-dane@dukhovni.org>
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 1552D1ACD8C for <cfrg@ietfa.amsl.com>; Mon, 16 Mar 2015 17:48:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 j6MSk8NUWopC for <cfrg@ietfa.amsl.com>; Mon, 16 Mar 2015 17:48:11 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [38.117.134.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B4BAF1A1BEC for <cfrg@irtf.org>; Mon, 16 Mar 2015 17:48:11 -0700 (PDT)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 88BD5283012; Tue, 17 Mar 2015 00:48:10 +0000 (UTC)
Date: Tue, 17 Mar 2015 00:48:10 +0000
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: "cfrg@irtf.org" <cfrg@irtf.org>
Message-ID: <20150317004810.GF3223@mournblade.imrryr.org>
References: <5501E6A5.5040608@brainhub.org> <A6F30412-8E0A-4D8D-9F26-580307B46874@shiftleft.org> <20150316002255.28855.qmail@cr.yp.to> <20150316044906.GA27479@mournblade.imrryr.org> <5506D5BB.3090700@gmail.com> <20150316135620.GC27479@mournblade.imrryr.org> <5506EF80.7010809@gmail.com> <CACsn0ck6EY1PVB39a6gTxrnxgPTY_quMRGya2jm79CsH4iLC4Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CACsn0ck6EY1PVB39a6gTxrnxgPTY_quMRGya2jm79CsH4iLC4Q@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/pHkURCOTpQtUBZVt34Ea5_80ouo>
Subject: Re: [Cfrg] (flaws with Curve25519 DH function, if one does not check the output) Re: Elliptic Curves - curve form and coordinate systems
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: cfrg@irtf.org
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: Tue, 17 Mar 2015 00:48:13 -0000

On Mon, Mar 16, 2015 at 08:39:06AM -0700, Watson Ladd wrote:

> Of course, we've always described what's required to ensure contributory
> behavior in Curve25519, and it's always the case that implementors
> should know what the protocol requires as far as assuring contributory
> behavior, namely rejecting 8 inputs. TLS is really the odd man out in
> requiring contributory behavior.

If I recall correctly it is simpler to reject the corresponding
single output (namely 0) than the 8 inputs that map to zero.
Admittedly my memory of the details is a bit fuzzy on this...

Since the output is sensitive, all one has to do is a constant-time
memcmp of the output with a 256-bit zero.

Does TLS need to defend against this?  It is not obvious that it
does.

-- 
	Viktor.