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

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

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 845073A1F3B for <>; Fri, 21 May 2021 13:18:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
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: (amavisd-new); dkim=pass (3072-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id d2mgF7letltz for <>; Fri, 21 May 2021 13:18:40 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 0EAAE3A1F39 for <>; Fri, 21 May 2021 13:18:39 -0700 (PDT)
Received: from (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 (Postfix) with ESMTPSA id 7A0ED6043F for <>; Fri, 21 May 2021 20:18:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;; 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" <>
Message-ID: <>
References: <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Tc5nHcMBw2N9dKUQ"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/2.0.5 (2021-01-21)
Archived-At: <>
Subject: Re: [openpgp] Ed25519 and digest choices (issue 31)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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