Re: [openpgp] Fingerprint requirements for OpenPGP

Vincent Breitmoser <look@my.amazin.horse> Wed, 13 April 2016 17:07 UTC

Return-Path: <look@my.amazin.horse>
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 53C6812DE37 for <openpgp@ietfa.amsl.com>; Wed, 13 Apr 2016 10:07:58 -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 autolearn_force=no
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 0D7JmiIxkgmb for <openpgp@ietfa.amsl.com>; Wed, 13 Apr 2016 10:07:56 -0700 (PDT)
Received: from mail.mugenguild.com (mugenguild.com [5.135.189.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5657112DEDB for <openpgp@ietf.org>; Wed, 13 Apr 2016 10:07:55 -0700 (PDT)
Received: from localhost (dhcp183-119.wlan.rz.tu-bs.de [134.169.183.119]) by mail.mugenguild.com (Postfix) with ESMTPSA id E569A5FC83; Wed, 13 Apr 2016 19:07:53 +0200 (CEST)
Date: Wed, 13 Apr 2016 19:07:51 +0200
From: Vincent Breitmoser <look@my.amazin.horse>
To: KellerFuchs <KellerFuchs@hashbang.sh>
Message-ID: <20160413170751.GA4283@littlepip.fritz.box>
References: <87vb3nslqh.fsf@alice.fifthhorseman.net> <20160412083409.GA16775@littlepip.fritz.box> <87egaarj74.fsf@alice.fifthhorseman.net> <20160412172246.GE9034@hashbang.sh>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM"
Content-Disposition: inline
In-Reply-To: <20160412172246.GE9034@hashbang.sh>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/p6qoGRZiiYzchlAyo9wK1jrtVXA>
Cc: IETF OpenPGP <openpgp@ietf.org>, Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: Re: [openpgp] Fingerprint requirements for OpenPGP
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.17
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, 13 Apr 2016 17:07:58 -0000

>   usually considered “broken” by cryptographers

This is not the general case cryptographers talk about, but a specific
use case with a very specific set of requirements.

>   so it seems OK to be somewhat cautious here and require collisions
>   to be hard.

If we could get it for free, maybe. But collision resistance is a factor
two in bitsize, which is not only not free, but pretty darn costly.

Just to get a feeling for the numbers, let's do some good old
pessimistic math:

We take a 128 bit fingerprint. We say the attacker wants to attack a
pool of 65000 keys, so 2^16. That leaves 112 bits of fingerprint to
attack. We also assume that an attacker can test as fast as they can
generate sha-256 hashes, and give no penalties for key generation,
multi-target attack, collisions or stuff like that.

Top of the line hashing ASICs are at about 5 terahashes per second. But
let's just say our attacker has 10 terahashes/s (2^43) per device for
ease of math. Then let's say our attacker has one *billion* of those
devices (2^30), which is a ridunculous number to have.

In this scenario, our attacker needs 2^(128-16-43-30) = 2^39 seconds to
find a single preimage, which is 17432 years.

From a different angle, for one Joule of energy (= 1 watt-second) you
can very optimistically get about 5T (2^42) sha256 hashes for one Joule
of energy. For 2^112 hashes, that's 2^(112-42) = 2^70 Joule of energy,
or 2^19 terawatt-hours of energy. For comparison, the total world energy
consumption is around 2^17TWh per year, so that's something like four
years of energy (not even only power) used by people in the world.

 - V