Re: [CFRG] Small subgroup question for draft-irtf-cfrg-hash-to-curve

Mike Hamburg <mike@shiftleft.org> Sun, 11 April 2021 14:19 UTC

Return-Path: <mike@shiftleft.org>
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 84AEE3A0C03 for <cfrg@ietfa.amsl.com>; Sun, 11 Apr 2021 07:19:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.305
X-Spam-Level:
X-Spam-Status: No, score=-1.305 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, HTML_MESSAGE=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=shiftleft.org
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 YcYJ5cAAVBE2 for <cfrg@ietfa.amsl.com>; Sun, 11 Apr 2021 07:19:31 -0700 (PDT)
Received: from doomsayer.shiftleft.org (unknown [54.219.126.124]) (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 B25B13A0C04 for <cfrg@irtf.org>; Sun, 11 Apr 2021 07:19:31 -0700 (PDT)
Received: from [192.168.7.53] (unknown [198.207.18.242]) (Authenticated sender: mike) by doomsayer.shiftleft.org (Postfix) with ESMTPSA id 0B325BB80C; Sun, 11 Apr 2021 14:19:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shiftleft.org; s=sldo; t=1618150769; bh=ZZ9hDZqhNt/wj9l1hgQsNA5JHMyRs0kW4fodqntXbc0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Q4zVndrGFGkRZ2W9bC4C+qoWIQkmd8XjkTM5zfGLsVpGUkIkc5gzGCwmtUbPgE6ZB oOBlgdjsvadJUqdZxsP1oyHMPFc+Ne9Ap3SuKRHxTi5AAxtQChZvd7Wggi1sFmxhpP t0TMYsY6RaXnV9nECqffbzZmBSAeenbLiA8qe75U=
From: Mike Hamburg <mike@shiftleft.org>
Message-Id: <6AD66846-04F2-4152-9BC6-A5AF15D32685@shiftleft.org>
Content-Type: multipart/alternative; boundary="Apple-Mail=_CF2516C0-6C41-4639-B341-2938DEB7DA79"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
Date: Sun, 11 Apr 2021 11:19:25 -0300
In-Reply-To: <AM6PR01MB427851BEC3094FB01902DA1DD6719@AM6PR01MB4278.eurprd01.prod.exchangelabs.com>
Cc: Hugo Krawczyk <hugo@ee.technion.ac.il>, CFRG <cfrg@irtf.org>
To: "Hao, Feng" <Feng.Hao=40warwick.ac.uk@dmarc.ietf.org>
References: <e270e62d-941d-0a87-7dc9-cf80f73b5aeb@jacaranda.org> <d0778523-5f5d-4327-b795-279918c1899c@www.fastmail.com> <CAMr0u6=PBX1W5zQFmpxKQ=ViUXN9QK00BREL4M0=2HOkaXaiZw@mail.gmail.com> <VI1SPR01MB03573585C37B871D200ECC23D6739@VI1SPR01MB0357.eurprd01.prod.exchangelabs.com> <trinity-f323065e-9f30-48fd-9ead-0865e8f877eb-1618002469856@3c-app-webde-bap03> <VI1SPR01MB035772443E4DA3206E4CD4D3D6739@VI1SPR01MB0357.eurprd01.prod.exchangelabs.com> <7944D4F1-81F8-44FC-95D1-45D47733B385@shiftleft.org> <VI1SPR01MB03574E592790FD59C1ACEB84D6729@VI1SPR01MB0357.eurprd01.prod.exchangelabs.com> <20210410151254.7ze5pt4lpvblhk3f@muon> <CADi0yUNo7o07qM2Qw8yd_eVw_-cM-9wNy3CrLw_Pif79oD_+Og@mail.gmail.com> <VI1SPR01MB0357253A9BA2C2544D6B3F51D6729@VI1SPR01MB0357.eurprd01.prod.exchangelabs.com> <CADi0yUP-Q-bjmDn-RpiVkns4c8ruK97SidFycg1cPVPJvdFB4w@mail.gmail.com> <AM6PR01MB427851BEC3094FB01902DA1DD6719@AM6PR01MB4278.eurprd01.prod.exchangelabs.com>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/tXe6KeELuN7mCFHEdZ9CMKhYoq0>
Subject: Re: [CFRG] Small subgroup question for draft-irtf-cfrg-hash-to-curve
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: Sun, 11 Apr 2021 14:19:37 -0000


> On Apr 11, 2021, at 7:36 AM, Hao, Feng <Feng.Hao=40warwick.ac.uk@dmarc.ietf.org> wrote:
> What this though experiment shows is an idiosyncrasy in the system. It seems the small subgroup confinement issue hasn’t been considered in CPace and OPAQUE. This is understandable given that both protocols have been assuming hash-to-curve as an idealized function. Fortunately, for the curve settings considered in the hash-to-curve draft, the size of the small subgroups is so small that the practical effect is negligible. But the effect can be dramatically different when CPace and OPAQUE are implemented in a different group where the size of the small subgroup is not small, e.g., DSA, Schnoor.

Hello Feng,

CPace and OPAQUE require prime-order groups.  Prime-order groups do not have small subgroups, other than {Id}.  CPace and OPAQUE make security assumptions on their groups, but those assumptions plausibly hold for DSA-style groups.

If you start with a uniformly random distribution on an abelian group G of order pq (where p,q are coprime) and then multiply by an appropriate factor (typically q) to get down to a subgroup H of order p, then you will have a uniformly random distribution on H.  The probability of hitting the identity in H is then 1/p, which must be negligible or else rho attacks break your scheme.  It doesn’t matter in the slightest whether q is large or small.

Or, to pull the analysis back to the full group G: the probability of landing in the small subgroup doesn’t depend on its absolute size q.  It depends on its size relative to G, which is q/(pq) = 1/p, i.e. it depends only on the size of the large group.

In sum, no, this isn’t a bigger effect for larger groups.  The only thing it really changes is the difficulty of tweaking the map before the homomorphism in order to guarantee that the identity can’t show up.  If the group is prime-order in the first place, your tweak only has to avoid one element.  But of course, if you tweak after the homomorphism, then you are only avoiding one element regardless.

Cheers,
— Mike