Gentoo Archives: gentoo-dev

From: Dane Smith <c1pher@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: rejecting unsigned commits
Date: Mon, 28 Mar 2011 16:43:21
Message-Id: 4D90B9E4.5030303@gentoo.org
In Reply to: Re: [gentoo-dev] Re: rejecting unsigned commits by "Robin H. Johnson"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 03/27/2011 08:13 PM, Robin H. Johnson wrote:
5 > On Sat, Mar 26, 2011 at 10:12:10AM +0100, Andreas K. Huettel wrote:
6 >> 3) Rely on an existing key list somewhere distributed in portage; the list
7 >> file with the key id's (not the keys themselves) is signed with a master key.
8 >> Is a mediocre and potentially insecure workaround.
9 >> Pros: you can exactly decide what keys are used and trusted, without thinking
10 >> about GnuPG's inner workings. A user can edit his key and the key remains
11 >> trusted.
12 >> Cons: Mainly that the key id is a pretty short hash afaik.(Any better-informed
13 >> people around?)
14 > 1. Generate said list L from the GPG fields in LDAP (w/ long-form keyids)
15 > 2. Clear-sign L, produces L'
16 > 3. Include L' in /metadata/ during rsync content build.
17 > 3.1. Provide all L' files in a trusted Git repository for historical reference.
18 > 4. Tree-sign per GLEP58, such that signed list is included.
19 >
20 > Pros:
21 > - L' is plaintext and works well w/ rsync deltas.
22 >
23 > Security weakpoints:
24 > - Introduces new weak point if attacker can compromise the automated
25 > clear-signing service of #2.
26 >
27 >> 4) Rely on an existing list of keys somewhere distributed in portage and
28 >> possibly somewhere else (keyservers); a key userid is signed with a master
29 >> key. Work with GnuPG's well-tested and well-thought-out trust relationships.
30 >> Back to start, time to re-read the entire thread... :)
31 > What does this actually add over #3 in terms of security?
32 >
33
34 This is an extremely non-trivial question. You're talking about signing
35 each individual key's fingerprint vs generating a list of key
36 fingerprints (hashes of the key), concatenating them all, hashing THAT,
37 and then signing that hash.
38
39 - From a cryptologic point of view, I would be *extremely* impressed with
40 anyone that can find a proof of security that shows that those two are
41 equivalent.
42
43 Simple(ish) example. By creating a list you're introducing a lot of data
44 that is then getting hashed. Now, from a cryptologic point of view, I
45 would *not* attack the signature per se, but rather the underlying hash
46 of the list. By providing a large file with lots of data, there are
47 attacks against (some) has functions that can make use of this (Small
48 changes in the file that will result in the same hash with probability
49 greater than normal). (Anyone know off the cuff what hash is actually
50 used?)
51
52 Now, the other method would require having to single out each hash on
53 it's own, and the underlying key that it hashed. That data is harder to
54 deal with because you have to manipulate one key into another *valid*
55 key(a difficult task to have it still be valid) and have it come out
56 with the same hash. Whereas with the file, who cares if they invalidate
57 another key, as long as they can get their hash into the file and have
58 the hash for the sig come out the same.
59
60 Point being, what it adds / subtracts is not a simple question. Crypto
61 is a funny beast, and is best not trifled with unless you understand the
62 underlying math / the current attacks etc (And even then, don't do it
63 =P). Do I think that using #4 gives us a huge difference over #3, even
64 with my years of study on this topic I would not even begin to try to
65 answer that. Chances are the difference is negligible for our *needs*
66 (see below), but I don't think it's negligible in the true sense of
67 security.
68
69 Having said that we aren't exactly talking about securing the end all be
70 all. We just want to be able to verify with a reasonable degree of
71 certainty that the tree is in a good state and that it wasn't tampered
72 with. Do we really need the end all be all, I somehow doubt it.
73
74 - --
75 Dane Smith (c1pher)
76 Gentoo Linux Developer -- QA / Crypto / Sunrise / x86
77 RSA Key: http://pgp.mit.edu:11371/pks/lookup?search=0x0C2E1531&op=index
78 -----BEGIN PGP SIGNATURE-----
79 Version: GnuPG v2.0.17 (GNU/Linux)
80 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
81
82 iQIcBAEBAgAGBQJNkLnkAAoJEEsurZwMLhUxV64P/1AbiEkcbouFd/XZ50aq/BsC
83 LRjlUC5GbCpBL1MBTigP1OWO0HT8JvBEKJPAbwChr+KSQqtk3/HOcaoRTlJDz3hf
84 iG7NrKkh4VECwErshFpzS1/D0D7M2qFXABat7DE/lPmFrIpI96XSd+ZAnjLMtM0g
85 RoFOAyJ3s3CEIKeG3n448TQagpHkAGinzgkmtA8NZRUf/ziukA7Gk7lQGC+e9YIE
86 MViWW4bBB1PQq4XL5in58JH2ohQBx49+RgeovdREnTWFJlDsHbxIZN3JTV8EHq7a
87 8xpni/uPLCbW3XGS2G3x/L7f8yPJOqEyTPROU3s+YGDtZkDYwDI1bn+k2Fnu+3a7
88 kkFyp4aRrajiFE4WK20iBnnPJn1knfR47O6UEP4aZu/GCC3s/3fJP5pVNlnla7mU
89 5RXJ1j6Tj3MQoCBdbGypEaVYJf1ZiJGdpUYOHpi4XL2R3mh8XsmnEF53pdp7GOk/
90 wHfuKvvZ5uKtYawj8QhVB8+Y97kTNYc7t7OIShpAZb0SoyUN+ZGoal4pDASkSM15
91 uATdmilb7z5JIEKiQ0lLwjdLjJJq5imgpB4YuQBqiF3sKmH8N9Qf5+kCRxvSE09y
92 lq1hWqppGX+H4CvA5FPRkB7/Qvg2prmwfdIqDlGWfMlR2KLsFoIzRyjKnL1xSCgn
93 eX/hTD9umMkzOho7l1eL
94 =h4nm
95 -----END PGP SIGNATURE-----