Re: [openpgp] Fingerprints and their collisions resistance

ianG <iang@iang.org> Mon, 07 January 2013 08:30 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 CBF1521F857B for <openpgp@ietfa.amsl.com>; Mon, 7 Jan 2013 00:30:44 -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 IE2aK1+KtjBv for <openpgp@ietfa.amsl.com>; Mon, 7 Jan 2013 00:30:43 -0800 (PST)
Received: from pyyl.pair.com (pyyl.pair.com [209.68.1.203]) by ietfa.amsl.com (Postfix) with ESMTP id 3466221F8526 for <openpgp@ietf.org>; Mon, 7 Jan 2013 00:30:36 -0800 (PST)
Received: from [IPv6:::1] (www2.futureware.at [78.41.115.142]) by pyyl.pair.com (Postfix) with ESMTPSA id 92808B240E; Mon, 7 Jan 2013 03:30:27 -0500 (EST)
Message-ID: <50EA879F.60208@iang.org>
Date: Mon, 07 Jan 2013 11:30:23 +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> <CAAu18hdG6turzfn-3Z8VpbLKVB-NiY9n0MX1zqrXVJcJZ8J=1g@mail.gmail.com>
In-Reply-To: <CAAu18hdG6turzfn-3Z8VpbLKVB-NiY9n0MX1zqrXVJcJZ8J=1g@mail.gmail.com>
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: Mon, 07 Jan 2013 08:30:45 -0000

Part of the problem here is that claiming uniqueness to a cryptographic 
level is harder to do than say.  Typically if we are dealing with larger 
keys and much more aggressive attackers, we'd want to up the size of the 
hash to larger SHA2/3s.  Which means that ordinary users with their 
human comparison function are going to be left behind.  Time factors 
also make us too conservative.

For about 10-15 years we had relative peace with this question because 
we had a strong single SHA1 that survived well.  That is unusual in the 
history of cryptographic computing, and we can see the reflection of 
this low expectation in later algorithms - AES, SHA2 and SHA3 all offer 
a range of strengths.  So perhaps we have been lulled into a sense that 
we can do two or more not-so-complementary things with one algorithm.

I cannot see how we can totally mix the unique programmatic identifier 
with the fingerprint function with a single fixed hash.  Basically, 
humans can be relied upon to never go beyond the 160 bit length of SHA1, 
and even the dedicated struggle to get that on their business card.  80 
bits is far more sensible.

So in this sense, we seem to be facing two possible directions:  Stick 
with SHA1, and have the fingerprint for people only.  If programs want 
more, it is up to them to extract out the key and generate their own 
unique identifier.  I do this all the time in my code, and it isn't a 
bother.  There are benefits in doing the right thing up front.

Alternatively, if we combine these roles, what we might need then is a 
more agile *length* but one fixed algorithm.  Right now we have KeyID, 
Fingerprint and something else I forget - 2 or 3 lengths extracted from 
the same algorithm.  To pursue that, we could simply stick in the 
longest biggest baddest Keccak and write up a process for truncation, 
for different lengths.  Then match that up to the key sizes.

(Or, option 3 - as Jon points out, ECC is looking good, and just use the 
key as is.  That has many advantages.)



iang



On 7/01/13 10:20 AM, Nicholas Cole wrote:
>
>
>
> On Thu, Jan 3, 2013 at 10:54 PM, Werner Koch <wk@gnupg.org
> <mailto:wk@gnupg.org>> wrote:
>
>     On Thu,  3 Jan 2013 20:06, openpgp@brainhub.org
>     <mailto:openpgp@brainhub.org> said:
>
>
>      > export/import control of encryption). Fingerptins are special data
>      > structures because they are sometimes input by humans.
>
>     Well, humans compare fingerprints but don't enter them.  I doubt that I
>     ever did this in the last 20 years.
>
>
> Yes.  And it is also important that there is a way to 'uniquely'
> (granted the *very* small chance of a collision - I think there has been
> only one possible collision with SHA-1 fingerprints reported on the
> gnupg list) identify keys to other programs.  I suspect that a lot of
> programs using gnupg and other implementations expect the fingerprint to
> be unique.  There does have to be a reliable way to refer to a
> particular key.
>
> So fingerprints are compared by humans, but they are also important for
> computers too - and probably used more by computers than by humans.  I
> don't see the sense in adopting a truncated standard.  Any new
> fingerprint is going to be more tedious than comparing SHA-1, but that's
> the price to be paid for security.
>
> I suppose that humans will start relying more on the key-id.  I assume
> that any new standard would adopt a more collision-resistant key-id.
>
> N.
>
>
>
>
> _______________________________________________
> openpgp mailing list
> openpgp@ietf.org
> https://www.ietf.org/mailman/listinfo/openpgp
>