public inbox for gentoo-dev-announce@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-dev-announce@lists.gentoo.org
Subject: [gentoo-dev-announce] PORTAGE_GPG_KEY strictness
Date: Tue, 16 Oct 2012 22:54:04 +0000	[thread overview]
Message-ID: <robbat2-20121016T221055-257492390Z@orbis-terrarum.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]

Hi all,

One of the items that has come up in the Git conversion, and needs some
attention.

Previously, the PORTAGE_GPG_KEY variable has allowed ANY argument, and
passed it to GPG, letting GPG use that. This was intended to explicitly
be a unique identifier for a key (or subkey).

However, it seems that there are signed commits with other values in the
variable, and instead of something nice like:
(Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit
with key 0x586A3B1F)
We have commits with:
(Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit
with key emailaddress)

This makes validation harder, as we need to extract the identity of the
key from the Manifest before we can proceed. Additionally, if a
developer has multiple keys, possibly over time, we cannot use this
string to identify what key was used easily.

As such, we've decided to make the PORTAGE_GPG_KEY strictly enforce what
was originally intended.

- You must specify a key or subkey exactly.
- The leading "0x" is optional.
- If you want to use a subkey, per the PGP specifications, you must
  suffix your keyid with "!".
- Your keyid is exactly: 8, 16, 24, 32 xor 40 hexdigits long.

Additionally, while we are NOT enforcing the use of long key-ids
presently, I strongly encourage ALL developers to move to using them,
due to known attacks against short ids:
http://www.asheesh.org/note/debian/short-key-ids-are-bad-news.html
Long key-ids are the 16/24/32 hexdigit long versions of your key ids.
Using your full fingerprint (40 hexdigit) is also possible, but doesn't
allow you to select a subkey (subkeys don't have a full fingerprint).
Additionally, we'll be chasing up LDAP to convert all entries there to
long key-ids.

Examples:
---------
Recommended:
PORTAGE_GPG_KEY='0123456789ABCEF'
PORTAGE_GPG_KEY='0123456789ABCEF!'
PORTAGE_GPG_KEY='0x0123456789ABCEF'
PORTAGE_GPG_KEY='0x0123456789ABCEF!'

Valid, but not recommended:
PORTAGE_GPG_KEY='01234567'
PORTAGE_GPG_KEY='ABCDEF01!'
PORTAGE_GPG_KEY='0x01234567'
PORTAGE_GPG_KEY='0xABCDEF01!'
PORTAGE_GPG_KEY='0123456789ABCEF0123456789ABCEF0123456789'

Invalid:
PORTAGE_GPG_KEY='username'
PORTAGE_GPG_KEY='username@domain.com'

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 330 bytes --]

                 reply	other threads:[~2012-10-17  0:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=robbat2-20121016T221055-257492390Z@orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --cc=gentoo-dev-announce@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox