Re: [openpgp] Ed25519 and digest choices (issue 31)

"brian m. carlson" <sandals@crustytoothpaste.net> Fri, 21 May 2021 20:18 UTC

Return-Path: <sandals@crustytoothpaste.net>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 845073A1F3B for <openpgp@ietfa.amsl.com>; Fri, 21 May 2021 13:18:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (3072-bit key) header.d=crustytoothpaste.net
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 d2mgF7letltz for <openpgp@ietfa.amsl.com>; Fri, 21 May 2021 13:18:40 -0700 (PDT)
Received: from injection.crustytoothpaste.net (injection.crustytoothpaste.net [192.241.140.119]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0EAAE3A1F39 for <openpgp@ietf.org>; Fri, 21 May 2021 13:18:39 -0700 (PDT)
Received: from camp.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:b610:a2f0:36c1:12e3]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by injection.crustytoothpaste.net (Postfix) with ESMTPSA id 7A0ED6043F for <openpgp@ietf.org>; Fri, 21 May 2021 20:18:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1621628288; bh=y6CfffZFM6pUFDMSzgBhgXGz7Ay3i069DPzkcW6KNek=; h=Date:From:To:Subject:References:Content-Type:Content-Disposition: In-Reply-To:From:Reply-To:Subject:Date:To:CC:Resent-Date: Resent-From:Resent-To:Resent-Cc:In-Reply-To:References: Content-Type:Content-Disposition; b=WNnRHNfnelzmUElPV0A5jSe2nzGKiqSSjCYDphKwcKJVKiDo/gqseYqFEYq0Abq1j KAeDnTiplOmNQwMSnhnS+sj6EsrTXhuaskr+nEhOJNhMRri9RTotUhrqYBt/7ld+vj Q7ZpcDBkPSVHnELn5YU5YzWu5RpjNWrBjAsuJsS64F7dBbY/F8WGG09cefBJp4gdwe BDi18k7WTOKlFaryhHwdjrv6wOHZswTQDF8Fx5BSHXE6Uag6d2InHmBPgL5/eqD8+O l3EVWckN3doxloOd4YyXPAup/ipiBMHfQ5878AcWDLoEjEyh2ikDTJUnUVRffc2FTT ZtXD8rBJo4RThq+jK18T9b+5h0UX3mW77E1N9d2QQfdUWLHwuSUzz+C4mtj5sF4k9e kiOIIFxSsqhhMtX8nWGeZH4JRWLbD0wKIOQU7RZsGOWkuujPQw+L3a8EEIfj5dj/Kl K+OP3cURqlVCzBalX9JKvPO/tG//mMT+TX5hC/1ptBhLIkhGkUW
Date: Fri, 21 May 2021 20:18:02 +0000
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: openpgp@ietf.org
Message-ID: <YKgVesA8U+EKgboS@camp.crustytoothpaste.net>
References: <878s48dlkn.fsf@fifthhorseman.net>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Tc5nHcMBw2N9dKUQ"
Content-Disposition: inline
In-Reply-To: <878s48dlkn.fsf@fifthhorseman.net>
User-Agent: Mutt/2.0.5 (2021-01-21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/yOWCGY2P0JUAJmJOpE-ZBuBrumo>
Subject: Re: [openpgp] Ed25519 and digest choices (issue 31)
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 21 May 2021 20:18:45 -0000

On 2021-05-21 at 17:48:56, Daniel Kahn Gillmor wrote:
> Alternately, maybe we should instead reframe OpenPGP's use of Ed25519 as
> a "PureEdDSA" scheme that signs only the OpenPGP digest (not the signed
> data directly).  That bypasses the "PH" parameter, but it also means
> that any cryptanalsis that is applied to EdDSA isn't necessarily
> applicable to OpenPGP, because we have this additional step involved.

I would prefer this approach.  OpenPGP has traditionally allowed users
to use whatever digest they like with keys, even when the standards have
traditionally fixed a digest.  For example, DSA generally has specified
that either SHA-1 or SHA-2 has to be used and it has to be used with the
proper size q, but we've allowed RIPEMD-160 and SHA-256 with smaller q.

If, for example, we discover a weakness in SHA-512, it should be fine
to switch to SHA3-512 for signatures without problems.

I will admit that using multiple digests may require additional work for
cryptanalysis, but I suspect that if PureEdDSA is secure with arbitrary
messages and the hash function is collision resistant (both of which we
would reasonably expect), then this approach will likely be secure.  I
provide no proof of my conjecture, though.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US