1 |
On Oct 17, 2012 6:57 AM, "Robin H. Johnson" <robbat2@g.o> wrote: |
2 |
> |
3 |
> Hi all, |
4 |
> |
5 |
> One of the items that has come up in the Git conversion, and needs some |
6 |
> attention. |
7 |
> |
8 |
> Previously, the PORTAGE_GPG_KEY variable has allowed ANY argument, and |
9 |
> passed it to GPG, letting GPG use that. This was intended to explicitly |
10 |
> be a unique identifier for a key (or subkey). |
11 |
> |
12 |
> However, it seems that there are signed commits with other values in the |
13 |
> variable, and instead of something nice like: |
14 |
> (Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit |
15 |
> with key 0x586A3B1F) |
16 |
> We have commits with: |
17 |
> (Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit |
18 |
> with key emailaddress) |
19 |
> |
20 |
> This makes validation harder, as we need to extract the identity of the |
21 |
> key from the Manifest before we can proceed. Additionally, if a |
22 |
> developer has multiple keys, possibly over time, we cannot use this |
23 |
> string to identify what key was used easily. |
24 |
> |
25 |
> As such, we've decided to make the PORTAGE_GPG_KEY strictly enforce what |
26 |
> was originally intended. |
27 |
> |
28 |
> - You must specify a key or subkey exactly. |
29 |
> - The leading "0x" is optional. |
30 |
> - If you want to use a subkey, per the PGP specifications, you must |
31 |
> suffix your keyid with "!". |
32 |
> - Your keyid is exactly: 8, 16, 24, 32 xor 40 hexdigits long. |
33 |
> |
34 |
> Additionally, while we are NOT enforcing the use of long key-ids |
35 |
> presently, I strongly encourage ALL developers to move to using them, |
36 |
> due to known attacks against short ids: |
37 |
> http://www.asheesh.org/note/debian/short-key-ids-are-bad-news.html |
38 |
> Long key-ids are the 16/24/32 hexdigit long versions of your key ids. |
39 |
|
40 |
Why not enforce best practices and only accept the above long key-ids? |
41 |
|
42 |
> Using your full fingerprint (40 hexdigit) is also possible, but doesn't |
43 |
> allow you to select a subkey (subkeys don't have a full fingerprint). |
44 |
> Additionally, we'll be chasing up LDAP to convert all entries there to |
45 |
> long key-ids. |
46 |
> |
47 |
> Examples: |
48 |
> --------- |
49 |
> Recommended: |
50 |
> PORTAGE_GPG_KEY='0123456789ABCEF' |
51 |
> PORTAGE_GPG_KEY='0123456789ABCEF!' |
52 |
> PORTAGE_GPG_KEY='0x0123456789ABCEF' |
53 |
> PORTAGE_GPG_KEY='0x0123456789ABCEF!' |
54 |
> |
55 |
> Valid, but not recommended: |
56 |
> PORTAGE_GPG_KEY='01234567' |
57 |
> PORTAGE_GPG_KEY='ABCDEF01!' |
58 |
> PORTAGE_GPG_KEY='0x01234567' |
59 |
> PORTAGE_GPG_KEY='0xABCDEF01!' |
60 |
> PORTAGE_GPG_KEY='0123456789ABCEF0123456789ABCEF0123456789' |
61 |
> |
62 |
> Invalid: |
63 |
> PORTAGE_GPG_KEY='username' |
64 |
> PORTAGE_GPG_KEY='username@××××××.com' |
65 |
> |
66 |
> -- |
67 |
> Robin Hugh Johnson |
68 |
> Gentoo Linux: Developer, Trustee & Infrastructure Lead |
69 |
> E-Mail : robbat2@g.o |
70 |
> GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 |