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

Werner Koch <wk@gnupg.org> Wed, 30 September 2015 06:21 UTC

Return-Path: <wk@gnupg.org>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9A5BA1B5CCC for <openpgp@ietfa.amsl.com>; Tue, 29 Sep 2015 23:21:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
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 k6ss5ol7nDxb for <openpgp@ietfa.amsl.com>; Tue, 29 Sep 2015 23:21:00 -0700 (PDT)
Received: from kerckhoffs.g10code.com (kerckhoffs.g10code.com [IPv6:2001:aa8:fff1:100::22]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8F91B1B5CCB for <openpgp@ietf.org>; Tue, 29 Sep 2015 23:21:00 -0700 (PDT)
Received: from uucp by kerckhoffs.g10code.com with local-rmail (Exim 4.80 #2 (Debian)) id 1ZhAl8-0006su-Qy for <openpgp@ietf.org>; Wed, 30 Sep 2015 08:20:58 +0200
Received: from wk by vigenere.g10code.de with local (Exim 4.84 #3 (Debian)) id 1ZhAj8-0005tq-Rk; Wed, 30 Sep 2015 08:18:54 +0200
From: Werner Koch <wk@gnupg.org>
To: Simon Josefsson <simon@josefsson.org>
References: <878u84zy4r.fsf@vigenere.g10code.de> <55FD7CF0.8030200@iang.org> <87io742kz7.fsf@latte.josefsson.org>
Organisation: g10 Code GmbH
X-message-flag: Mails containing HTML will not be read! Please send only plain text.
OpenPGP: id=F2AD85AC1E42B367; url=finger:wk@g10code.com
Mail-Followup-To: Simon Josefsson <simon@josefsson.org>, ianG <iang@iang.org>, openpgp@ietf.org
Date: Wed, 30 Sep 2015 08:18:54 +0200
In-Reply-To: <87io742kz7.fsf@latte.josefsson.org> (Simon Josefsson's message of "Mon, 21 Sep 2015 11:13:48 +0200")
Message-ID: <87mvw4ctv5.fsf_-_@vigenere.g10code.de>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/EsylSdhiN9mFfQE1Ta1MJyvDy2g>
Cc: openpgp@ietf.org, ianG <iang@iang.org>
Subject: Re: [openpgp] New fingerprint: which hash algo (was: to v5 or not to v5)
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 30 Sep 2015 06:21:01 -0000

On Mon, 21 Sep 2015 11:13, simon@josefsson.org 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.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.