Re: [openpgp] Fingerprints and their collisions resistance

ianG <iang@iang.org> Fri, 04 January 2013 05:57 UTC

Return-Path: <iang@iang.org>
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 A413C21F85FC for <openpgp@ietfa.amsl.com>; Thu, 3 Jan 2013 21:57:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o5obAfRxc3qp for <openpgp@ietfa.amsl.com>; Thu, 3 Jan 2013 21:57:00 -0800 (PST)
Received: from pyyl.pair.com (pyyl.pair.com [209.68.1.203]) by ietfa.amsl.com (Postfix) with ESMTP id 86D7F21F84DC for <openpgp@ietf.org>; Thu, 3 Jan 2013 21:57:00 -0800 (PST)
Received: from [IPv6:::1] (www2.futureware.at [78.41.115.142]) by pyyl.pair.com (Postfix) with ESMTPSA id E9034B24E7; Fri, 4 Jan 2013 00:56:52 -0500 (EST)
Message-ID: <50E66F22.3070208@iang.org>
Date: Fri, 04 Jan 2013 08:56:50 +0300
From: ianG <iang@iang.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: openpgp@ietf.org
References: <50E530D6.6020609@brainhub.org> <D3684BB5-FDC6-4834-8FAE-C482A25E3FB0@callas.org> <50E5D6AA.6060200@brainhub.org> <874nixev2u.fsf@vigenere.g10code.de> <50E61486.9010209@brainhub.org>
In-Reply-To: <50E61486.9010209@brainhub.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [openpgp] Fingerprints and their collisions resistance
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 04 Jan 2013 05:57:01 -0000

Some comments...


On 4/01/13 02:30 AM, Andrey Jivsov wrote:
> On 01/03/2013 02:54 PM, Werner Koch wrote:
>> On Thu,  3 Jan 2013 20:06, openpgp@brainhub.org said:
>>
>> ...
>>> Let's say we choose SHA-3-384, which is no more difficult to implement
>>> than SHA-2. We then simply use the current fingerprint algorithm but
>> Except that SHA-2 is already in use and has hardware support.
> ... but there is no reason why SHA-3 will not optimized in the future.
> BTW, which SHA-2 friendly CPU feature we are talking about? ( other than
> Intel's plans to add cycle shift )
>
> In any case, please note that we are talking about hashing the key
> material and thus the performance of the hash algorithm doesn't matter.
>
> My preference for SHA-3 is to satisfy the concerns of algorithm agility.
> I argue for a hardcoded algorithm, and thus the natural choice is the
> strongest of SHA that will be future-proof for regulatory compliance.
>
> I would also be OK to do SHA-2 + SHA-3, TLS style, to be future proof,
> but this seems too paranoid.


It also seems non-sensical, the notion that anyone is likely to trash 
SHA-2 or SHA-3 over the next decade has been well and truly trounced.  I 
don't think we really have to worry about the hardness of this 
particular application overly muchly.

Meanwhile, spending time on that means they weren't spending time on 
other more important things.  Maybe a warning to us!


>>> instead of SHA-1 use SHA-3-384. Then allow truncation of the output
>>> (it's already implied by the 8 byte keyIDs). 20 byte fingerprint on a
>>> business card may be reasonable, but we also would like to have full
>> So why should we truncate the fingerprint?  Is there a reason to believe
>> that truncation to 160 bit of SHA-2 or SHA-3 is seriously more secure
>> than SHA-1?  I don't know.
>
> The current attacks tell us so. Instead of 80 bit is security (birthday
> bounds) SHA-1 is listed as 51 bits on
> http://en.wikipedia.org/wiki/Message_digest. The number can continue to
> go lower.
>
> But I also think that it makes sense to standardise on larger than 160
> bits of the fingerprint as a UI feature (somewhere between 160 and 384
> bits).

If the purpose of the fingerprint is *only* for human comparisons, then 
it would seem that this is a marginal improvement.  But if it falls out 
of other decisions, oh well, maybe.


>>> strength for regulatory compliance. Consider not hashing the key
>>> creation date. Fixing all the variables in this paragraph, we have the
>> What would be the advantage of this except for yet another code path.
>>
>>> signed message, but I don't think they materially care about the
>>> flavour of the fingerprint (as long as it's a "strong" one).
>> They will care if a key suddenly comes with two different fingerprints.
>> We never had this situation in OpenPGP.  Recall how long it took to get
>> rid of v3 keys.  Thus if we want a new fingerprint algorithm we need to
>> change more than just this.
>
> While every key inherently will have two fingerprints -- old and new
> (and I was saying don't make it worse with hash variations) -- the
> software should probably select to display only one of them with an
> option to change it.


It doesn't need to be so.  If the switch to some other algorithm is 
organised in alignment with a new key type, then it can roll over with 
the new key type.

(Whether this is overall better or worse depends...)


> We might let users enter the fingerprint as before but then use it for
> dual purpose as SHA-1 or new one (as opposed to using an explicit type).
> At some point in the future one might start flagging links achieved with
> the old fingerprint. Features flags will be helpful for this (i.e. I
> generate a key that I want to be known only by its new fingerprint; I
> put this fact into Features; don't match this key by the old fingerprint)


those Features seem like User and Code Confusion :)



iang