Re: [CFRG] Psychic Signatures

David Jacobson <david@dmjacobson.com> Fri, 22 April 2022 03:22 UTC

Return-Path: <david@dmjacobson.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 207D43A1766 for <cfrg@ietfa.amsl.com>; Thu, 21 Apr 2022 20:22:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LOTS_OF_MONEY=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=dmjacobson.com
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 lbOMH4KTdWnd for <cfrg@ietfa.amsl.com>; Thu, 21 Apr 2022 20:22:16 -0700 (PDT)
Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8553E3A1765 for <cfrg@irtf.org>; Thu, 21 Apr 2022 20:22:16 -0700 (PDT)
Date: Fri, 22 Apr 2022 03:22:04 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dmjacobson.com; s=protonmail2; t=1650597732; bh=bHgj7/Lg7dR4ks/Vmistn+w4tGNZaMWoROIZORrUZuY=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=g2a2JIkZFYr69e4OxqwHjtOB0w3LrlHGBR5L6Ex6DG/NUSU3+aYTJ7tIXA5vZqFep AE/jk9LP4qKM0SCksxigB5oBmfYHZaVqguDXuuMM605LFygTW2VnjRJLzkjBu0b/rS 5G8iR066l6125aRHGjxQr7Pv2j5YU1dFr1HOJ1edde+VRqavrESQUf+HTQn3tMoUhc ayqmq85IySY0rHS0www7eh5Od9lBuGOx/fuRg7z8uhGgxALoPmgFWJs54b3uD70F4B Yt6FwK0k15Cvs0R+xqjPyL6FcUPaB3AIC+pCF6AegmfZ6gfB8eV6AzT04BxpKyM6AT DKps4HPGvHxTg==
To: IRTF CFRG <cfrg@irtf.org>
From: David Jacobson <david@dmjacobson.com>
Reply-To: David Jacobson <david@dmjacobson.com>
Message-ID: <87FFD633-DAF5-44B8-A2BF-55B547616560@dmjacobson.com>
In-Reply-To: <2438a7cd-e0f7-685b-ad47-e9ba5995a5a0@mail.muni.cz>
References: <SY4PR01MB62519FEA53D39AABAF0BD0F4EEF49@SY4PR01MB6251.ausprd01.prod.outlook.com> <2CBA5AE5-DF84-4E9C-85DA-4DC38464710A@ericlagergren.com> <SY4PR01MB6251CA4D5F7C83FA564FD204EEF49@SY4PR01MB6251.ausprd01.prod.outlook.com> <2438a7cd-e0f7-685b-ad47-e9ba5995a5a0@mail.muni.cz>
Feedback-ID: 9147119:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/9IENUlbEKjFW__7w5uqM1n9Te7Y>
Subject: Re: [CFRG] Psychic Signatures
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Apr 2022 03:22:22 -0000

Ján Jančár wrote

> For example, many
> libraries do not do the required checks to prevent invalid curve attacks
> by default, but have a separate public key validation function that the
> user of the library needs to call, …

I suspect that the reason for the library requiring a separate validation function was patent US 7215773.  Claim 1 reads:


1. A method for validating digital information transmitted in a data communication system,said method comprising the steps of:
a) obtaining an elliptic curve public key generated from a corresponding privatekey in accordance with an elliptic curve cryptographic scheme, said scheme conforming to a predetermined arithmetic algorithm and said scheme conforming to defined system parameters including an elliptic curve defined over a finite field,
b) upon obtaining said public key, verifying said public key is a point lying on said curve, and
c) utilising said public key in a cryptographic operation within said cryptographic scheme upon obtaining such verification.

The important part is step (b): "verifying said public key is a point lying on said curve”.

By leaving the verification to a user supplied function, the library provider would not be infringing on this patent.

This patent was filed October 14, 1998, so presumably it expired October 14, 2018.  Thus, if I am correct about the expiration date, we can now check whether points are on curves.

  —David

> On Apr 21, 2022, at 3:17 PM, Ján Jančár <445358@mail.muni.cz> wrote:
>
> [resending because irtf.org mailserver doesn't like my self-hosted
> mailserver]
>
> Hi all,
>
> On 21. 4. 2022 13:18, Peter Gutmann wrote:
>> Eric Lagergren <eric@ericlagergren.com> writes:
>>
>>> Project Wycheproof has a very good set of test vectors like this.
>>
>> The problem with that is that the description omits one vital point:
>>
>>  Project Wycheproof tests crypto libraries against known attacks.
>>
>> without saying:
>>
>>  as long as that crypto library is a JCE one.
>>
>> This makes it... less than useful for checking crypto libraries in general.
>> In particular none of the stuff I was referring to in my previous post is
>> written in Java.
>>
>> To be more generally applicable, it really needs static test vectors, e.g. a
>> bunch of self-signed X.509 certs that shouldn't verify, rather than a JCE test
>> suite.
>>
>
> We do something like this (for elliptic curve crypto only) in the
> ECTester tool: https://github.com/crocs-muni/ECTester which targets both
> smartcards and software crypto libraries. It has hooks into 15 libraries
> that can be tested.
>
> We also have a test that would have caught this vulnerability in the
> Java ECDSA implementation, however ECTester is written in Java and
> currently targets < Java 9 and so couldn't test the new Java ECDSA
> implementation (also, there is a reason ECTester is implemented in Java,
> it targets JavaCard-based smartcards).
>
> However, I am worried whether this bug would have been found even if we
> ran it on the vulnerable version of Java, as running our test suites,
> which contain everything from invalid curve attacks to these sort of
> ECDSA signature checks, produces a large number of potentially
> concerning results for the libraries and smartcards. For example, many
> libraries do not do the required checks to prevent invalid curve attacks
> by default, but have a separate public key validation function that the
> user of the library needs to call, which may or may not happen in the
> wild. Many cards and libraries can be made to not respond or segfault if
> various malformed curve parameters are provided, etc.
>
> Cheers,
> --Jan
>
> _______________________________________________
> CFRG mailing list
> CFRG@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg