From: Grant Olson <kgo@grant-olson.net>
To: The Git Mailing List <git@vger.kernel.org>
Cc: "Greg A. Woods" <woods@planix.com>
Subject: Re: PATCH: Less fragile lookup of gpg key
Date: Sun, 02 May 2010 22:09:25 -0400 [thread overview]
Message-ID: <4BDE3055.9010602@grant-olson.net> (raw)
In-Reply-To: <m1O8k0Z-000kndC@most.weird.com>
[-- Attachment #1: Type: text/plain, Size: 3502 bytes --]
On 5/2/2010 8:59 PM, Greg A. Woods wrote:
> At Sat, 01 May 2010 12:54:24 -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Subject: Re: PATCH: Less fragile lookup of gpg key
>>
>> If I have two keys like these:
>>
>> Junio C Hamano <gitster@pobox.com>
>> Junio Hamano <gitster@pobox.com>
>
> I'm not an expert on PGP internals or such, but I think that's a really
> bad thing to do. I'm surprised you were able to get gpg to do it in the
> first place. I would have hoped it wouldn't allow it. As far as I can
> tell it's _not_ compatible with other implementations of PGP.
>
> PGP keys normally are searched by the e-mail portion only. All the
> other stuff (comments and the display name, etc.) is for decoration
> only. This is just as it is in e-mail routing too of course.
>
> You can of course have more than one e-mail address per key, but you
> should NEVER have more than one key per e-mail.
>
> I.e. it's less reliable in the first place to have two different keys
> which can be found using the same e-mail address.
>
This might be getting a little off-topic for the git list, but...
It's a weird thing to do, which is why I didn't account for it in the
original patch, but the RFC doesn't have any specific requirements
regarding what a UID is:
5.11. User ID Packet (Tag 13)
A User ID packet consists of UTF-8 text that is intended to represent
the name and email address of the key holder. By convention, it
includes an RFC 2822 [RFC2822] mail name-addr, but there are no
restrictions on its content. The packet length in the header
specifies the length of the User ID.
Ultimately the key ID is the unique identifier, so there's nothing
technically wrong with creating multiple keys with the same email. It
will cause some email clients to flip out, but that's a non-issue with
git tags.
But if someone is a regular user of OpenPGP, and they get two signatures
from the same email address with different keys, the assumption is going
to be that at least one of them is a forgery. Maybe the keys are
cross-signed if, for example, someone is phasing out an old 1024-bit key
with a new 2048-bit one. But that's still going to raise a few
eyebrows. And even in that case, you still probably want to sign
everything with the same key.
If you look at any day-to-day usage of gpg, or examples posted around,
they're almost always going to just pass an email address only with the
-u flag, if they use the -u flag at all. I don't think you're going to
find any examples or tutorials that suggest you type:
gpg -u "Junio Hamano <gitster@pobox.com>" --armor --sign file.txt
they'll all use:
gpg -u gitster@pobox.com --armor --sign file.txt
And normally a user wouldn't even use the -u flag to begin with. They
would just go with the default secret key on your keyring. But that
might have a different email address than your git settings, so it does
make sense to use -u within git.
I personally think that using multiple keys with the same UID falls into
the 'advanced user' category, where you can expect the advanced user to
figure out how to deal with the exceptional usage, and have the defaults
set out to cover the general case.
But all that being said, I don't have a problem with the proposed
solution of falling back to a straight email search after the username +
email search fails.
--
Grant
"Can you construct some sort of rudimentary lathe?"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 552 bytes --]
next prev parent reply other threads:[~2010-05-03 2:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 15:16 PATCH: Less fragile lookup of gpg key Grant Olson
2010-05-01 16:26 ` A Large Angry SCM
2010-05-01 17:18 ` Junio C Hamano
2010-05-01 17:25 ` Grant Olson
2010-05-01 19:54 ` Junio C Hamano
2010-05-02 23:39 ` Grant Olson
2010-05-03 0:59 ` Greg A. Woods
2010-05-03 2:09 ` Grant Olson [this message]
2010-05-03 11:16 ` Theodore Tso
2010-05-03 22:19 ` Greg A. Woods
2010-05-04 2:19 ` tytso
2010-05-04 2:23 ` Grant Olson
2010-05-04 6:07 ` Andreas Ericsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BDE3055.9010602@grant-olson.net \
--to=kgo@grant-olson.net \
--cc=git@vger.kernel.org \
--cc=woods@planix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.