Re: [TLS] On Curve25519 and other possibilities (e.g. ietf256p, ietf384p, ietf521p,

Andrey Jivsov <> Fri, 04 July 2014 21:09 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id B0FF71A049F for <>; Fri, 4 Jul 2014 14:09:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id rHK-jnNjLGfa for <>; Fri, 4 Jul 2014 14:09:13 -0700 (PDT)
Received: from ( [IPv6:2001:558:fe2d:43:76:96:30:96]) by (Postfix) with ESMTP id BC51F1A0463 for <>; Fri, 4 Jul 2014 14:09:13 -0700 (PDT)
Received: from ([]) by with comcast id NM2D1o0021Y3wxoA9M9DKc; Fri, 04 Jul 2014 21:09:13 +0000
Received: from [] ([]) by with comcast id NM9B1o00M4uhcbK8bM9CkQ; Fri, 04 Jul 2014 21:09:12 +0000
Message-ID: <>
Date: Fri, 04 Jul 2014 14:09:11 -0700
From: Andrey Jivsov <>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
References: <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=q20140121; t=1404508153; bh=oEmXb6v3J1awECbwtBFsJKQ2CPRexGsDyIM95+DVfi4=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=qROWYh0CDON+NpzvcbQHEklIUz1vNs0MXJTHBbvje7WzgRZ6IouqE93SQL9xs39uU Yq9ns+iVU/V1K7f2mZZ2FZ24T1APUO8uQrgBGlqa8K+BNsZAlMKJLpOcsFTt1tepDk 2DaVJxys+Me0OLL2pIo16TaNAJrKL5ONov8/bn+geww4h/Vaq6Bm12kJlQ2DjBB6nM moNjqdC2Pi79dFoO35jBAUGEi2hIfNCoU7FcNCfm48w/zc742Nu6pM7P7TSoOtPcun WDVX2eMJF9VTTNmfnPfxnlv78Qp9ZGEqG97mqCLiJ7YQi/mpCm65pQc18tyUwHyWCn XoLRXN9umvGoA==
Subject: Re: [TLS] On Curve25519 and other possibilities (e.g. ietf256p, ietf384p, ietf521p,
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 04 Jul 2014 21:09:15 -0000

On 07/04/2014 08:15 AM, Watson Ladd wrote:
> On Fri, Jul 4, 2014 at 7:59 AM, Johannes Merkle
> <> wrote:
>> Alyssa Rowan wrote on 27.06.2014 08:46:
>>> Brainpool has already generated a set of 'random' primes, but random primes are extremely slow to implement - and
>>> in the case of Brainpool, the 256-bit curve has extremely unfortunate lack of twist security, so any implementation
>>> that tries to skip validation is in really big trouble.
>> Why should anyone try to skip validation? In order to improve performance by less than 1%?
> Implementations frequently expose an API where validation is separate
> from group operations, and people
> just forget to make the call sometimes.

However, point validation, or validation of an element in a DH group 
( is a common requirement 
for a crypto implementation. FIPS 140-2 crypto module algorithm 
validation includes point validation testing 
requires tests from Section A.4.2 of ANSI X9.62)

An implementation that doesn't do required EC point checks may have 
other flaws at higher levels. Replacing a low-level crypto primitive 
with a stronger one does not necessarily make the entire stack secure. 
Some may argue that this obscures the results of a security audit.

In reality all we are talking about is plugging (x,y) in the curve 
equation and checking that the two sides match. As was pointed out, when 
compression is used, this check is "forced".

> Furthermore, with anything other than a compressed format it's not
> just twist security, but any security that failure of point validation
> harms.
> I send point on a curve with smooth order, and extract the key. I send
> point on curve with small order, and dictate the key, etc.

It would be good to list what does twist security mean for TLS. references the paper that uses an 
ElGamal decryption oracle. The attack will reveal the decryption scalar.

How does this translate to TLS? I assume we are talking about ECDH only.

Regarding dictating the key, it seems that a (corrupt) peer can always 
limit his private key to a small value and thus dictate the shared 
secret to be close to another peer's public key.

> Twist security matters for Joyce-Briers ladders only, as far as I know
> on Weierstrass curves. Other formulas use the y coordinates.

> Sincerely,
> Watson Ladd
>> --
>> Johannes
>> _______________________________________________
>> TLS mailing list