Re: [TLS] Twist security for brainpoolp256r1

Johannes Merkle <> Tue, 11 November 2014 18:49 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 60AEC1A1A5E for <>; Tue, 11 Nov 2014 10:49:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.295
X-Spam-Status: No, score=-1.295 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.594] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id u1lrKQw2escL for <>; Tue, 11 Nov 2014 10:49:41 -0800 (PST)
Received: from ( []) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id C820B1A036A for <>; Tue, 11 Nov 2014 10:49:40 -0800 (PST)
Received: from localhost (alg1 []) by (Postfix) with ESMTP id 083F51A007A; Tue, 11 Nov 2014 19:49:32 +0100 (CET)
X-Virus-Scanned: by secunet
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with LMTP id L2JNooWz4ERS; Tue, 11 Nov 2014 19:49:24 +0100 (CET)
Received: from (unknown []) by (Postfix) with ESMTP id EF5461A006C; Tue, 11 Nov 2014 19:49:23 +0100 (CET)
Received: from [] ( by ( with Microsoft SMTP Server (TLS) id; Tue, 11 Nov 2014 19:49:30 +0100
Message-ID: <>
Date: Tue, 11 Nov 2014 19:49:29 +0100
From: Johannes Merkle <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: Oleg Gryb <>, "" <>
References: <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Originating-IP: []
X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10
Subject: Re: [TLS] Twist security for brainpoolp256r1
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: Tue, 11 Nov 2014 18:49:43 -0000

> I was going through SafeCurves pages recently and wanted to ask a question about brainpoolP256r1's twist security.
> According to this research,, <>  a combined
> cost of attacks on brainpoolP256t1, which is a P256r1's "twist" is rather low. At the same time it's obvious that
> small-group-attack is not applicable, because "h=1" is a requirement for all brainpool curves including the one under
> consideration.

This is a misunderstanding. The term "twist security" refers to non-quadratic twists (B/u)y^2=x^3+Ax^2+x, where u is a
non-square in F_p. RFC 5639 considers "quadratic twist", where u is a square in F_p. Quadratic twists are isomorphic to
the original curve and provide equivalent security. Therefore, brainpoolP256t1 is as secure as brainpoolP256r1. In
contrast, the non-quadratic twists of brainpoolP256r1 are not secure, because their group order does not have a large
enough prime factor, i.e., the cofactor is huge.

> The other two "invalid-curve" attacks should be mitigated by openssl controls, since latter does have a
> point-on-the-curve validation (e,g. see EC_POINT_is_on_curve function and its usage in the latest openssl stable versions).

Twist security is only relevant, if you use an arithmetic on the x-coordinate only (Brier-Joye ladder) and don't perform
point-on-the-curve validation. I am quite sure that openssl avoids both, i.e., computes on both coordinates and performs
point-on-the-curve validation. Therefore, twist security is irrelevant here.

x-coordinate arithmetic is generally quite slow for Weierstrass curves, and point-on-the-curve validation is mandated by
the relevant standards. Therefore, twist security should be hardly an issue anywhere.