Re: [openpgp] New fingerprint: which hash algo (was: to v5 or not to v5)

Werner Koch <> Wed, 30 September 2015 06:21 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 9A5BA1B5CCC for <>; Tue, 29 Sep 2015 23:21:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id k6ss5ol7nDxb for <>; Tue, 29 Sep 2015 23:21:00 -0700 (PDT)
Received: from ( [IPv6:2001:aa8:fff1:100::22]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8F91B1B5CCB for <>; Tue, 29 Sep 2015 23:21:00 -0700 (PDT)
Received: from uucp by with local-rmail (Exim 4.80 #2 (Debian)) id 1ZhAl8-0006su-Qy for <>; Wed, 30 Sep 2015 08:20:58 +0200
Received: from wk by with local (Exim 4.84 #3 (Debian)) id 1ZhAj8-0005tq-Rk; Wed, 30 Sep 2015 08:18:54 +0200
From: Werner Koch <>
To: Simon Josefsson <>
References: <> <> <>
Organisation: g10 Code GmbH
X-message-flag: Mails containing HTML will not be read! Please send only plain text.
OpenPGP: id=F2AD85AC1E42B367;
Mail-Followup-To: Simon Josefsson <>, ianG <>,
Date: Wed, 30 Sep 2015 08:18:54 +0200
In-Reply-To: <> (Simon Josefsson's message of "Mon, 21 Sep 2015 11:13:48 +0200")
Message-ID: <>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Archived-At: <>
Cc:, ianG <>
Subject: Re: [openpgp] New fingerprint: which hash algo (was: to v5 or not to v5)
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 30 Sep 2015 06:21:01 -0000

On Mon, 21 Sep 2015 11:13, said:

> Regarding which hash to use, SHA-256 is probably the simplest choice
> From a practicallity and consensus point of view.  Are there any strong
> reasons to favor something else?

I see also several reasons to favor SHA-256:

 - SHA-2 has shown no weaknesses during the SHA-3 competition.

 - SHA-256 is the commonly used hash algorithm for OpenPGP messages and
   keys and thus available in all code bases.

 - Although not an issue for fingerprints, SHA-3 is slower than SHA-2.

 - On embedded systems SHA-512 has a substantially performance penalty
   over SHA-256.

Given that modern ECC requires a larger than 256 bit hash, I am not sure
whether the next point is valid:

 - If we would go for a newer hash algorithm, all implementations would
   need to support SHA-256 (and SHA-1) anyway to support existing keys
   and allow verification of existing signatures.  Also decryption of
   symmetrically encrypted messages may require SHA-256 for the S2K.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.