Re: [openpgp] Followup on fingerprints

Phillip Hallam-Baker <phill@hallambaker.com> Thu, 30 July 2015 14:44 UTC

Return-Path: <hallam@gmail.com>
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 C3DDF1A1A99 for <openpgp@ietfa.amsl.com>; Thu, 30 Jul 2015 07:44:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.622
X-Spam-Level:
X-Spam-Status: No, score=0.622 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=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 0asAVHQrLxT4 for <openpgp@ietfa.amsl.com>; Thu, 30 Jul 2015 07:44:50 -0700 (PDT)
Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1CBB81A1B48 for <openpgp@ietf.org>; Thu, 30 Jul 2015 07:44:50 -0700 (PDT)
Received: by lbqc9 with SMTP id c9so3256108lbq.1 for <openpgp@ietf.org>; Thu, 30 Jul 2015 07:44:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=50+ZD593WRG+pmhNVGVKlAZNeal1+z6QM1uR9E4rz3Y=; b=0FASLTOs2Ybpg64ncs89FgLWaA0iXKPxC06bDIHpZ+dPBOD8nWdUlR/UTbu3sUi6uR W94/i/W20QmVSNtjk7FFDvyZpRpYnxvduQyWqZtbOZqk6eoUA4/38v5uIjWSQjr6Bstx l9VLOW9WoJ7AWw9kiHI3zUzL1n254ay5Sc/xNiHjyxSgyv00QIr560htQR0hQMbwJzw2 tN8SDBAuC0YzT58QJt7KD+WXPd+Hum3VKOI25p5L4ffzt/n3Ydqy0btFldD/OvQdSlgM 74mFV8h6RkRyar4a7iM2ivvzrecBKIVQPZnWFsZuRdWL4loE40KWvuByp/Xrz1yg5/hf rxQA==
MIME-Version: 1.0
X-Received: by 10.152.234.42 with SMTP id ub10mr43709750lac.60.1438267488524; Thu, 30 Jul 2015 07:44:48 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.112.10.226 with HTTP; Thu, 30 Jul 2015 07:44:48 -0700 (PDT)
In-Reply-To: <87zj2ecmv8.fsf@alice.fifthhorseman.net>
References: <CAMm+LwgTcn8CY+Zk-f9gzXQtMJezG97T+kx2=C7PR5g7zFer_A@mail.gmail.com> <87twsn2wcz.fsf@vigenere.g10code.de> <CAMm+LwgRJX-SvydmpUAJMmN3yysi4zzGSpO2yY4JAMhD-9xLgQ@mail.gmail.com> <87zj2ecmv8.fsf@alice.fifthhorseman.net>
Date: Thu, 30 Jul 2015 10:44:48 -0400
X-Google-Sender-Auth: qpzl0dcCGzbz2gzfYD9yjqfMxXI
Message-ID: <CAMm+LwgKmcTes=V7uS3MjCQixWCo-i7PY=VE7eCHSqt3Ho3OSg@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Content-Type: multipart/alternative; boundary="001a113438a0bee04b051c18bee3"
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/9ucXY0lZlOdIVmu0hAx6wQ-w23k>
Cc: IETF OpenPGP <openpgp@ietf.org>
Subject: Re: [openpgp] Followup on fingerprints
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: Thu, 30 Jul 2015 14:44:52 -0000

On Thu, Jul 30, 2015 at 12:04 AM, Daniel Kahn Gillmor <dkg@fifthhorseman.net
> wrote:

> On Wed 2015-07-29 10:31:22 -0400, Phillip Hallam-Baker wrote:
> > OK one thing from the meeting I forgot to mention, the security
> > considerations have to address the use of a birthday attack by someone
> > generating keys.
>
> I'll echo Vincent here and ask what specific attack you're concerned
> about.
>
> My current understanding of OpenPGP fingerprints is that we do not need
> collision resistance as a property of the fingerprint mechanism.
>

That depends on the use cases you anticipate for OpenPGP and what you
expect people will build on top.

The thing is that OpenPGP is not just an email security application, it is
infrastructure. A lot of stuff is built on top of the spec that has nothing
to do with email.

That does not mean we have to support those applications. But it does mean
that we have to write a security consideration telling people we have (1)
considered the issue and that (2) either it isn't a problem or you should
do stuff that is going to be affected.


The concern here is that Mallet generates two keys that have the
fingerprints

Mxxxx-xxxxx-xxxxx-xxxxx-xxxx1 'M1' and .
Mxxxx-xxxxx-xxxxx-xxxxx-xxxx2 'M2'

Mallet joins an open source project which only takes the first 100 bits for
the fingerprint. He uploads the key for M1 to a keyserver.

He then commits a large number of malicious patches using M2 for
authentication. These are all authenticated against his public key M2 when
he does the commit but the repository uses the key sent in band and does
not keep the key for later verification.

At this point, any attempt to hold Mallet accountable is going to have to
rely on a human examining the logs and working out that Mallet must have
generated the malicious pair of keys. There is going to be no way to unwind
the thing automatically.


if we want to discuss append-only logs of key material, i'd be happy to
> see that discussion happen formally in a separate thread, or over in the
> certificate transparency WG where that sort of thing is already under
> way.  I think dragging blockchains into a discussion on OpenPGP
> fingerprint mechanisms is a distraction.


The connection is that each blockchain output can be used as an axiom of
trust. Since the purpose of fingerprints is to represent roots of trust,
this is a possible use case that the spec should be capable of
accommodating without opening up the question of how precisely that would
be achieved.




>
> > The other bit I left out is the idea of compression. The idea here being
> > that the person generating the key looks for a fingerprint that has 0s
> for
> > the first n bits. Then the fingerprint starts with a version number that
> > says 'the first 32 bits are 0s' or whatever.
>  [...]
> > My preference is to just truncate and use the inferred length. That
> allows
> > us to minimize the amount of data we need to put in front of the user
> > without compromising security.
>
> These two proposals seem incompatible to me.  If you give me a
> fingerprint that is shorter than the expected length, and both
> mechanisms are available, how am i supposed to know whether you've given
> me a truncated fingerprint or a "compressed" fingerprint?


Well, the fingerprint version tag would have to flag that encryption is
being used. So instead of the fingerprint being Mxxxx-.... (SHA2-512) or
Sxxxx-... (SHA3-512), it might be Xxxxx-...


> Lets say that in 2020 Alice meets Bob and they exchange their fingerprints
> > via a 150 bit QR code. Alice's smartphone goes to the mesh and pulls the
> > corresponding profile which has Bob's key and full 512 bit fingerprint.
> The
> > phone then stores the big fingerprint for Bob in her contacts directory.
>
> Wouldn't the phone just store the key itself instead of the fingerprint?
> Why does the fingerprint matter in this scenario after the initial
> introduction?
>

OK, 'at least the 512 bit fingerprint'...

Which you do probably depends on if you are using ECC or RSA. With RSA,
those 2048 bit keys start to bulk up...

For my particular implementation, I want to be able to rotate encryption
keys on a monthly basis or any time a device is added or removed from a
user's profile. so I am using fingerprints of key signing keys rather than
end-entity keys.

As a general rule, it seems that you can solve pretty much any usability
problem at the cost of an additional key. Back in 1995, this would have
ground the whole net to a halt. Today it isn't a problem. Right now on my
testbed Alice has a personal profile of 3 keys, plus a device profile of 3
keys per device, plus individual keys for each use in application (1+1 per
device for email, 1 for 2 factor auth, 1 for admin, 1 for data encryption,
1 for drive encryption). So assuming Alice has 2 desktops, a laptop, a
tablet, a phone and a watch, that is 3 + 18 + 7 + 6 = 30 keypairs and an
additional one per month.

It might sound a bit extreme, but since I started in the business, machines
have gotten roughly a million times faster and have a million times the
memory. 30 keypairs instead of one does not seem like a big deal.