Re: [TLS] Twist security for brainpoolp256r1

Watson Ladd <watsonbladd@gmail.com> Thu, 13 November 2014 15:43 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4DB7D1A8998 for <tls@ietfa.amsl.com>; Thu, 13 Nov 2014 07:43:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.7
X-Spam-Level:
X-Spam-Status: No, score=-1.7 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, MIME_8BIT_HEADER=0.3, SPF_PASS=-0.001] autolearn=no
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 RnhH_J2GqFV1 for <tls@ietfa.amsl.com>; Thu, 13 Nov 2014 07:43:16 -0800 (PST)
Received: from mail-yh0-x236.google.com (mail-yh0-x236.google.com [IPv6:2607:f8b0:4002:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1B50C1A8971 for <tls@ietf.org>; Thu, 13 Nov 2014 07:43:00 -0800 (PST)
Received: by mail-yh0-f54.google.com with SMTP id 29so2494329yhl.13 for <tls@ietf.org>; Thu, 13 Nov 2014 07:42:59 -0800 (PST)
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:content-transfer-encoding; bh=Vr2bAYNPhwRE2ms3VUfKw009bdC/Yn0iD9xucvvrOgQ=; b=Hc+HDIYBosfiwru4/rThrNnZy3n8l8L5R6QKgMPotovYkz9uCLH8AyTvKJ7DiC/lTM XkoLVV9ciDM/JdE0cqRHVk9jcDbGhfN3mwLzLrcb4scSTNH7dx41r+oIB3vYKqadqglJ UY5SqJJrljuJlCyj7EeTpuMUkTcy49/g943Bdw1trUWpJEWaEfzh0xfuP0vlXt6vv4aH NMMO5GoZFyC3wKn50AeSh4xovrB/ZnjZEXXM6ZTD0dXV0Lo2xhVvMOEqFw0GT5CLjtoV iVJH9ZI7rYPknvZWhAXLsyuK3ghQeclYWm4br590n6Qqz8zN4qlKdpIADHVN8EpPJt98 ixAg==
MIME-Version: 1.0
X-Received: by 10.236.61.6 with SMTP id v6mr3621569yhc.44.1415893379424; Thu, 13 Nov 2014 07:42:59 -0800 (PST)
Received: by 10.170.195.203 with HTTP; Thu, 13 Nov 2014 07:42:59 -0800 (PST)
In-Reply-To: <54647819.3020802@polarssl.org>
References: <546394E9.2010208@secunet.com> <1821348128.254417.1415860521951.JavaMail.yahoo@jws10668.mail.bf1.yahoo.com> <54647819.3020802@polarssl.org>
Date: Thu, 13 Nov 2014 07:42:59 -0800
Message-ID: <CACsn0cmFe=Em4KDoozXMjX8texg5CHThq_kjEjx3qcsPv+Bx1g@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: =?UTF-8?Q?Manuel_P=C3=A9gouri=C3=A9=2DGonnard?= <mpg@polarssl.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/Wd0uYaI8co5M5M1mO0gFJN1gClI
Cc: Oleg Gryb <oleg@gryb.info>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Twist security for brainpoolp256r1
X-BeenThere: tls@ietf.org
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." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2014 15:43:17 -0000

On Thu, Nov 13, 2014 at 1:21 AM, Manuel Pégourié-Gonnard
<mpg@polarssl.org> wrote:
> On 13/11/2014 07:35, Oleg Gryb wrote:
>> Thanks, very helpful. Just to summarize yours and Manuel's notes in regard of
>> quadratic non-residue, or non-quadratic twists (as they are called in other
>> emails), they can be used as a source of malicious EC points to run
>> invalid-curve attacks on the original curves, but since all implementations
>> compliant with X9* standards including openssl must have point-on-curve
>> validation, invalid-curve attacks and small-group attacks become irrelevant
>> when it comes to brainpoool's openssl implementation.
>
> The situation is actually a bit more complex. Here is a version that's still a
> bit simplified but closer to the truth: let's say there are two kinds of
> protocols (or curve representations):
>
> 1. Those who use both coordinates of the points.
> 2. Those who use only the x coordinate.

The coordinates used on the wire do not determine the calculations
used by an implementation. An interoperable implementation of TLS
could use the Brier-Joyce ladder on x-coordinates only, and take a
randomly chosen square root for use as the y-coordinate, validating
signatures through a different method. This would be of interest in
certain side-channel attack scenarios, as the Brier-Joyce ladder is
easier to protect.

Most implementations don't do this, so the rest of your email is correct.

Sincerely,
Watson Ladd