Re: [openpgp] Unuploadable Keys

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Wed, 05 August 2015 01:48 UTC

Return-Path: <dkg@fifthhorseman.net>
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 338201B2AE7 for <openpgp@ietfa.amsl.com>; Tue, 4 Aug 2015 18:48:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.5
X-Spam-Level:
X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_05=-0.5] autolearn=ham
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 2kVJXphqdj3H for <openpgp@ietfa.amsl.com>; Tue, 4 Aug 2015 18:48:06 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108]) by ietfa.amsl.com (Postfix) with ESMTP id E2D081B2AE4 for <openpgp@ietf.org>; Tue, 4 Aug 2015 18:48:05 -0700 (PDT)
Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 8F5CDF984; Tue, 4 Aug 2015 21:48:04 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id 4E5912010F; Wed, 5 Aug 2015 03:47:54 +0200 (CEST)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: "Neal H. Walfield" <neal@walfield.org>
In-Reply-To: <87io98nucf.wl-neal@walfield.org>
References: <87a8uxlcvz.wl-neal@walfield.org> <87615dkygj.fsf@alice.fifthhorseman.net> <87io98nucf.wl-neal@walfield.org>
User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu)
Date: Tue, 04 Aug 2015 21:47:54 -0400
Message-ID: <87k2ta33qt.fsf@alice.fifthhorseman.net>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/D3oO_9wPoakXgtmFeia4UW8MRm8>
Cc: IETF OpenPGP <openpgp@ietf.org>
Subject: Re: [openpgp] Unuploadable Keys
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: Wed, 05 Aug 2015 01:48:08 -0000

On Sat 2015-07-25 11:13:36 -0400, Neal H. Walfield wrote:
> I think this would make sharing non-exportable keys a pain, because it
> overloads the meaning of local in a confusing way.  Further, the
> current mechanism is simply not enough to realize all interesting
> policies.  So, if we are forced to add something new, we should do it
> properly.  Consider the following two scenarios.
>
> When Alice wants to share her key with Bob, but not with the world,
> she could sends it to him via email.  To import her key, Bob has to do
> something like: `gpg2 --import-options import-local'.  There should be
> no reason for Bob to have to do this in this situation.  The policy
> that Alice wants to implement is about exporting keys, not importing
> them.  When Bob wants to export Alice's key to forward it to Carol via
> email, he needs to run `gpg2 --export-options export-local'.  This is
> annoying.  Instead, when he exports the key, he should get a warning
> or a prompt saying that Alice has indicated that this key shouldn't be
> widely distributed.  Of course, we can't enable `--import-options
> import-local' and `--export-options export-local' by default, because
> local signatures really shouldn't be imported or exported by default.

these UI/UX difficulties seem like they're inherent in how GnuPG
interacts with the "non-exportable" flag, but not necessarily a
requirement from the OpenPGP protocol perspective.  Maybe there are
UI/UX improvements that could be done in GnuPG to treat these flags more
conveniently?

> The problem goes from a usability problem to a security problem when
> we consider private key servers.  Now, the private key server needs to
> be configured to not discard local signatures.

Are you aware that SKS currently doesn't discard local signatures at
all? :(  (see the link in my previous e-mail)

> But, is this always the right decision?  Sometimes signatures really
> are local and should not be discarded or they are intended for a
> different key server.

I think you're saying that there should be an extra flag that is similar
in semantics to the "non-exportable" flag, but that is slightly
different.  OpenPGP implementations should support both semantics.

I worry that this would lead to more confusion, not less: Can a key be
both "exportable" and "not for wide distribution"?  what about a key
that is marked as "local (non-exportable)" but also marked "for wide
distribution"?  how can we explain what these options mean to users?  Or
should we define a new value (other than 0 or 1) for the exportable
subpacket?  https://tools.ietf.org/html/rfc4880#section-5.2.3.11

I note that the spec doesn't say what to do if there are multiple
Exportable Certification subpackets of different values in a single
certification.

>> would this interpretation of non-exportable self-sigs be
>> a sufficient mechanism?
>
> I'm sorry, but I'm not clear on what definition you mean.  I've read
> your mail several times, but I can't figure it out.  Can you please
> repeat it.

I just meant "would issuing only non-exportable self-sigs (as i proposed
above) be sufficient to do what you're looking for?"  -- you've answered
this somewhat above with your concerns about the difficult ui/ux of
--export-options export-local, etc, but it seems like that answer
relates more to the GnuPG implementation than to the OpenPGP protocol.

So i think the things we'd need to do to sort this out more clearly are:

 0) figure out what the explicit semantics are (and how they differ
 from/relate to the existing exportable semantics)

 1) figure out where they should apply -- should they belong to the
 primary key, to User IDs, or somewhere else?

 2) figure out how to represent them in the bytes on the wire

 3) come up with implementation guidance about how to handle keys/certs
 marked in this way.

regards,

 --dkg