Re: [openpgp] Mining protection in fingerprint schemes
Bryan Ford <brynosaurus@gmail.com> Sat, 09 April 2016 15:56 UTC
Return-Path: <brynosaurus@gmail.com>
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 757F912B02D for <openpgp@ietfa.amsl.com>; Sat, 9 Apr 2016 08:56:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.799
X-Spam-Level:
X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 sqB7tm_t3z1G for <openpgp@ietfa.amsl.com>; Sat, 9 Apr 2016 08:56:35 -0700 (PDT)
Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (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 8C5D012B02C for <openpgp@ietf.org>; Sat, 9 Apr 2016 08:56:35 -0700 (PDT)
Received: by mail-qg0-x236.google.com with SMTP id j35so113572405qge.0 for <openpgp@ietf.org>; Sat, 09 Apr 2016 08:56:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=q6futV1Zyv1M7UcvWAiG8OVRhEVLFokbrJ/uS1+f9nU=; b=zujE9dyQvdG3Ku419WSPtl3Txx41SXUn2S0TEeRFHKPq4S5i8BtqUILEf4HXDbdEGo Ru/KtGWnE3QtBQtiHIXkYDG/6KfUHJLafEN2FXInxxKbFgxq+fWOkjZtnvW/i7Hg7CcP 7A/LokBiGyTjMH2gjMLNVb84N6fi/phXmPs3BVLc//v7g1RqUeBjJ9l9zBrwbXkOq9Hq qwluwcSqG22wTxK/YyCyz1Htbw+QX0F5/fWY/4p6Uk9ekWvgY8FHPvFwEinht0BaJp7/ tHEL2Mo9VtocZcLX6Lgx1cEZJ7tpRWe0nQbbiGSqPAWAPyw9etZAdUxuMF67cNYslQ0m MFGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=q6futV1Zyv1M7UcvWAiG8OVRhEVLFokbrJ/uS1+f9nU=; b=QPZqj4P9ng2mNqCH+rG5DXH20B6xotQ8CgIwnUCqGIY9Wwd+xukQQN/NYCrYgM8Auf MuqvfOvi1wZq8596zTa1aqM1FYtUM1CZk1fHO48HDmRURA4+prkwwwdB3H8wTxoqIhoO H8c8tiQQ+A/aQOxXvbsgAljLxGiQITB4kpVI9N3kiQGeATPfdNjrWO7S7i+oi0U0Hz8p Woop1e3MU8La3tZfQPHoznFv/DZJROC4Ydo+j6eRh+URXhD1aFTM0RK03V/KurJlCWto OmDUMGvA/XV3xyc6BUOAhJTJa/kO9eBrGxa4//ODpWb7gpvLYvRkUNtDgYpl2fcHQeiI 6GrQ==
X-Gm-Message-State: AD7BkJIKZHCBDq2O5LX05owXbL4CbGMljoTIbb6ebMcv19rLHxzqZXnSuQ55eyslMqmz9Q==
X-Received: by 10.140.234.151 with SMTP id f145mr19865515qhc.51.1460217394430; Sat, 09 Apr 2016 08:56:34 -0700 (PDT)
Received: from [192.168.1.194] ([201.177.20.11]) by smtp.gmail.com with ESMTPSA id 64sm7595184qhf.40.2016.04.09.08.56.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 09 Apr 2016 08:56:32 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_695D30C0-3088-434A-B816-F9D5EC08FABC"; protocol="application/pkcs7-signature"; micalg="sha1"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Bryan Ford <brynosaurus@gmail.com>
In-Reply-To: <9C461E78-DC60-4B9D-A0DF-170F4759A57D@callas.org>
Date: Sat, 09 Apr 2016 12:55:42 -0300
Message-Id: <5E793A3D-128D-470A-8DF7-50827F39E02F@gmail.com>
References: <4C08CDDD-4C06-41AD-9797-7DD6F08ECD06@gmail.com> <2AA5B912-0AE6-4722-8BC7-66E37559C0B1@callas.org> <D17B23A3-633F-4E4E-BC14-69ED6060F357@gmail.com> <6E221A61-7AB2-4E0B-B64D-60F210A0131F@callas.org> <E9A5B4B3-0EEC-4E86-8CEC-6680A24BE44F@gmail.com> <0D7A75AB-74C6-40E9-87C5-BA6F05FCDBF7@callas.org> <87oa9jo5sp.fsf@alice.fifthhorseman.net> <9C461E78-DC60-4B9D-A0DF-170F4759A57D@callas.org>
To: Jon Callas <jon@callas.org>
X-Mailer: Apple Mail (2.3124)
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/9jRf3si7ufP9oJy8WtVrPjED9Fg>
Cc: openpgp@ietf.org, Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: Re: [openpgp] Mining protection in fingerprint schemes
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: Sat, 09 Apr 2016 15:56:37 -0000
On Apr 9, 2016, at 2:35 AM, Jon Callas <jon@callas.org> wrote: > At present, we use the key fingerprint as the authentication string. The mining protection he's suggesting isn't a bad thing. My raised eyebrow comes from conflating the two. We need to have a "DB handle" and I believe the DB handle needs to be easy to compute (key-canonical is an orthogonal issue). The fingerprint gets used all over the place, especially in its truncated form as key-id. I agree that “fingerprints” used purely as internal DB-handles or indexes are a separate purpose from “fingerprints” presented to users and displayed on business cards and websites, and it may well be worth treating them separately. With that in mind, here’s one terminology suggestion. Previous versions of PGP by default tend to use small, weak somethings it calls “key IDs” as the normal user-presentation form of fingerprints. We know that encouraging users to depend on key IDs for anything - or even to understand that “Key ID” collisions are possible and eminently mineable - and hence we know that “Key IDs” of this kind need to die. But if we consider “PGP tradition” terminology to be that “fingerprints” are supposed to be full-length DB handles for internal use, whereas “key IDs” are something related but different for user display and consumption, we could make both of them better in V5 while preserving this terminology convention. In particular: - V5 “fingerprint" is just a raw SHA384 or SHA512 hash of the key material (with or without timestamp or other stuff, depending on the WG’s decision on that orthogonal issue). This is the “DB-handle”. It’s never expected to be presented into the user or put on business cards. - V5 “key ID” is derived from the V5 fingerprint and shortened for presentation to the user - but shortened only to ~256 bits, not shortened to the point of insecurity like V3/V4 key IDs are. That shortening could easily include simple Key ID mining-protection. This would make new “Key IDs” actually safe to use for the purposes they tend to get used for, while avoiding the usage conflation with the “DB handle” purpose of fingerprints. PGP implementations could go on displaying “key IDs” by default when listing keys, only for V5 keys these key IDs would now be long enough to provide meaningful protection. What is the actual function from “fingerprint” to “key ID”? Three alternatives spring to mind: 1. Truncation, from 384 or 512 bits to 256. Trivial but offers no possibility of Key-ID mining protection. 2. Simple mining protection: Key ID is one digit representing number of leading zero hex digits in fingerprint, followed by encoded final 256 bits of fingerprint. Basically PHB’s suggestion. 3. Memory-hardened mining protection: use fingerprint as nonce for a small Argon2 run, then SHA384 or SHA512 hash the output of that, and finally encode as in option 2 above (one-digit representing number of leading zeros followed by encoding of last 256 bits). All of these alternatives allow the “fingerprint” to be used as an internal DB-handle with no added complexity or inefficiency, while adding only a rather small amount of complexity and cost purely to the conversion from internal-purposed “fingerprint” to user-presentation-oriented “key ID”. If the WG doesn’t perceive the added protection of memory-hardening in option 3 is worth the costs, then option 2 would seem at least to me to have pretty much negligible cost. Bryan
- [openpgp] Mining protection in fingerprint schemes Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Jon Callas
- Re: [openpgp] Mining protection in fingerprint sc… Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Jon Callas
- Re: [openpgp] Mining protection in fingerprint sc… Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Peter Gutmann
- Re: [openpgp] Mining protection in fingerprint sc… Robert J. Hansen
- Re: [openpgp] Mining protection in fingerprint sc… Jon Callas
- Re: [openpgp] Mining protection in fingerprint sc… Daniel Kahn Gillmor
- Re: [openpgp] Mining protection in fingerprint sc… Jon Callas
- Re: [openpgp] Mining protection in fingerprint sc… Peter Gutmann
- Re: [openpgp] Mining protection in fingerprint sc… Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Vincent Breitmoser
- Re: [openpgp] Mining protection in fingerprint sc… Phillip Hallam-Baker
- Re: [openpgp] Mining protection in fingerprint sc… Vincent Breitmoser
- Re: [openpgp] Mining protection in fingerprint sc… Daniel Kahn Gillmor
- Re: [openpgp] Mining protection in fingerprint sc… Phillip Hallam-Baker
- Re: [openpgp] Mining protection in fingerprint sc… Hilarie Orman
- Re: [openpgp] Mining protection in fingerprint sc… Peter Gutmann
- Re: [openpgp] Mining protection in fingerprint sc… brian m. carlson
- Re: [openpgp] Mining protection in fingerprint sc… Daniel Kahn Gillmor
- Re: [openpgp] Mining protection in fingerprint sc… Werner Koch
- Re: [openpgp] Mining protection in fingerprint sc… Derek Atkins
- Re: [openpgp] Mining protection in fingerprint sc… Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Bryan Ford
- Re: [openpgp] Mining protection in fingerprint sc… Peter Gutmann