| … | |
… | |
| 25 | <tbody valign="top"> |
25 | <tbody valign="top"> |
| 26 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">59</td> |
26 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">59</td> |
| 27 | </tr> |
27 | </tr> |
| 28 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Manifest2 hash policies and security implications</td> |
28 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Manifest2 hash policies and security implications</td> |
| 29 | </tr> |
29 | </tr> |
| 30 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.5</td> |
30 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.7</td> |
| 31 | </tr> |
31 | </tr> |
| 32 | <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0059.txt?cvsroot=gentoo">2010/01/31 07:55:45</a></td> |
32 | <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0059.txt?cvsroot=gentoo">2010/02/02 05:49:27</a></td> |
| 33 | </tr> |
33 | </tr> |
| 34 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Robin Hugh Johnson <robbat2 at gentoo.org>,</td> |
34 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Robin Hugh Johnson <robbat2 at gentoo.org>,</td> |
| 35 | </tr> |
35 | </tr> |
| 36 | <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> |
36 | <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> |
| 37 | </tr> |
37 | </tr> |
| … | |
… | |
| 60 | <li><a class="reference internal" href="#specification" id="id3">Specification</a><ul> |
60 | <li><a class="reference internal" href="#specification" id="id3">Specification</a><ul> |
| 61 | <li><a class="reference internal" href="#the-bad-news" id="id4">The bad news</a></li> |
61 | <li><a class="reference internal" href="#the-bad-news" id="id4">The bad news</a></li> |
| 62 | <li><a class="reference internal" href="#how-fast-can-md5-be-broken" id="id5">How fast can MD5 be broken?</a></li> |
62 | <li><a class="reference internal" href="#how-fast-can-md5-be-broken" id="id5">How fast can MD5 be broken?</a></li> |
| 63 | <li><a class="reference internal" href="#the-good-news" id="id6">The good news</a></li> |
63 | <li><a class="reference internal" href="#the-good-news" id="id6">The good news</a></li> |
| 64 | <li><a class="reference internal" href="#what-should-be-done" id="id7">What should be done</a></li> |
64 | <li><a class="reference internal" href="#what-should-be-done" id="id7">What should be done</a></li> |
| 65 | <li><a class="reference internal" href="#checksum-depreciation-timing" id="id8">Checksum depreciation timing</a></li> |
65 | <li><a class="reference internal" href="#checksum-depreciation-timing" id="id8">Checksum depreciation timing</a><ul> |
|
|
66 | <li><a class="reference internal" href="#general-principles" id="id9">General principles:</a></li> |
|
|
67 | <li><a class="reference internal" href="#immediate-plans" id="id10">Immediate plans:</a></li> |
| 66 | </ul> |
68 | </ul> |
| 67 | </li> |
69 | </li> |
|
|
70 | </ul> |
|
|
71 | </li> |
| 68 | <li><a class="reference internal" href="#backwards-compatibility" id="id9">Backwards Compatibility</a></li> |
72 | <li><a class="reference internal" href="#backwards-compatibility" id="id11">Backwards Compatibility</a></li> |
| 69 | <li><a class="reference internal" href="#references" id="id10">References</a></li> |
73 | <li><a class="reference internal" href="#references" id="id12">References</a></li> |
| 70 | <li><a class="reference internal" href="#thanks-to" id="id11">Thanks to</a></li> |
74 | <li><a class="reference internal" href="#thanks-to" id="id13">Thanks to</a></li> |
| 71 | <li><a class="reference internal" href="#copyright" id="id12">Copyright</a></li> |
75 | <li><a class="reference internal" href="#copyright" id="id14">Copyright</a></li> |
| 72 | </ul> |
76 | </ul> |
| 73 | </div> |
77 | </div> |
| 74 | <div class="section" id="abstract"> |
78 | <div class="section" id="abstract"> |
| 75 | <h1><a class="toc-backref" href="#id1">Abstract</a></h1> |
79 | <h1><a class="toc-backref" href="#id1">Abstract</a></h1> |
| 76 | <p>While Manifest2 format allows multiple hashes, the question of which |
80 | <p>While Manifest2 format allows multiple hashes, the question of which |
| … | |
… | |
| 83 | <h1><a class="toc-backref" href="#id2">Motivation</a></h1> |
87 | <h1><a class="toc-backref" href="#id2">Motivation</a></h1> |
| 84 | <p>This GLEP is being written as part of the work on signing the Portage |
88 | <p>This GLEP is being written as part of the work on signing the Portage |
| 85 | tree, but is only tangentially related to the actual signing of |
89 | tree, but is only tangentially related to the actual signing of |
| 86 | Manifests. Checksums present one possible weak point in the overall |
90 | Manifests. Checksums present one possible weak point in the overall |
| 87 | security of the tree - and a comprehensive security plan is needed.</p> |
91 | security of the tree - and a comprehensive security plan is needed.</p> |
|
|
92 | <p>This GLEP is not mandatory for the tree-signing specification, but |
|
|
93 | instead aims to improve the security of the hashes used in Manifest2. |
|
|
94 | As such, it is also able to stand on it's own.</p> |
| 88 | </div> |
95 | </div> |
| 89 | <div class="section" id="specification"> |
96 | <div class="section" id="specification"> |
| 90 | <h1><a class="toc-backref" href="#id3">Specification</a></h1> |
97 | <h1><a class="toc-backref" href="#id3">Specification</a></h1> |
| 91 | <div class="section" id="the-bad-news"> |
98 | <div class="section" id="the-bad-news"> |
| 92 | <h2><a class="toc-backref" href="#id4">The bad news</a></h2> |
99 | <h2><a class="toc-backref" href="#id4">The bad news</a></h2> |
| … | |
… | |
| 109 | <p>For a general collision, not a pre-image attack, since the announcement |
116 | <p>For a general collision, not a pre-image attack, since the announcement |
| 110 | by Wang et al [W04], the time required to break MD5 has been massively |
117 | by Wang et al [W04], the time required to break MD5 has been massively |
| 111 | reduced. Originally at 1 hour on a near-supercomputer (IBM P690) and |
118 | reduced. Originally at 1 hour on a near-supercomputer (IBM P690) and |
| 112 | estimated at 64 hours with a Pentium-3 1.7Ghz. This has gone down to |
119 | estimated at 64 hours with a Pentium-3 1.7Ghz. This has gone down to |
| 113 | less than in two years, to 17 seconds [K06a].</p> |
120 | less than in two years, to 17 seconds [K06a].</p> |
|
|
121 | <ul class="simple"> |
| 114 | <p>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours |
122 | <li>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours</li> |
| 115 | 03/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours |
123 | <li>03/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours</li> |
| 116 | 11/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours |
124 | <li>11/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours</li> |
| 117 | 03/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours |
125 | <li>03/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours</li> |
| 118 | 04/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</p> |
126 | <li>04/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</li> |
|
|
127 | </ul> |
| 119 | <p>If we accept a factor of 800x as a sample of how much faster a checksum |
128 | <p>If we accept a factor of 800x as a sample of how much faster a checksum |
| 120 | may be broken over the course of 2 years (MD5 using the above data is |
129 | may be broken over the course of 2 years (MD5 using the above data is |
| 121 | >2000x), then existing checksums do not stand a significant chance of |
130 | >2000x), then existing checksums do not stand a significant chance of |
| 122 | survival in the future. We should thus accept that whatever checksums we |
131 | survival in the future. We should thus accept that whatever checksums we |
| 123 | are using today, will be broken in the near future, and plan as best as |
132 | are using today, will be broken in the near future, and plan as best as |
| … | |
… | |
| 144 | <h2><a class="toc-backref" href="#id7">What should be done</a></h2> |
153 | <h2><a class="toc-backref" href="#id7">What should be done</a></h2> |
| 145 | <p>Portage should always try to verify all supported hashes that are |
154 | <p>Portage should always try to verify all supported hashes that are |
| 146 | available in a Manifest2, starting with the strongest ones as maintained |
155 | available in a Manifest2, starting with the strongest ones as maintained |
| 147 | by a preference list. Over time, the weaker checksums should be removed |
156 | by a preference list. Over time, the weaker checksums should be removed |
| 148 | from Manifest2 files, once all old Portage installations have had |
157 | from Manifest2 files, once all old Portage installations have had |
| 149 | sufficient time to upgrade. We should be prepared to add stronger |
158 | sufficient time to upgrade. Stronger checksums shall be added as soon as |
| 150 | checksums wherever possible, and to remove those that have been |
159 | an implementation is available in Portage. Weak checksums may be removed |
| 151 | defeated.</p> |
160 | as long as the depreciation process is followed (see below).</p> |
| 152 | <p>As soon as feasible, we should add the SHA512 and WHIRLPOOL algorithms. |
161 | <p>As soon as feasible, we should add the SHA512 and WHIRLPOOL algorithms. |
| 153 | In future, as stream-based checksums are developed (in response to the |
162 | In future, as stream-based checksums are developed (in response to the |
| 154 | development by NIST [AHS]), they should be considered and used.</p> |
163 | development by NIST [AHS]), they should be considered and used.</p> |
| 155 | <p>The SHA512 algorithm is available in Python 2.5, which has been a |
164 | <p>The SHA512 algorithm is available in Python 2.5, which has been a |
| 156 | dependency of Portage since approximately Python 2.1.6.13.</p> |
165 | dependency of Portage since approximately Portage 2.1.6.13.</p> |
| 157 | <p>The WHIRLPOOL checksum is not available within the PyCrypto library or |
166 | <p>The WHIRLPOOL checksum is not available within the PyCrypto library or |
| 158 | hashlib that is part of Python 2.5, but there are multiple alternative |
167 | hashlib that is part of Python 2.5, but there are multiple alternative |
| 159 | Python implementations available, ranging from pure Python to C-based |
168 | Python implementations available, ranging from pure Python to C-based |
| 160 | (python-mhash).</p> |
169 | (python-mhash).</p> |
| 161 | <p>The existence unsupported hash is not considered to be a failure unless |
170 | <p>The existence unsupported hash is not considered to be a failure unless |
| 162 | no supported hashes are available for a given Manifest entry.</p> |
171 | no supported hashes are available for a given Manifest entry.</p> |
| 163 | </div> |
172 | </div> |
| 164 | <div class="section" id="checksum-depreciation-timing"> |
173 | <div class="section" id="checksum-depreciation-timing"> |
| 165 | <h2><a class="toc-backref" href="#id8">Checksum depreciation timing</a></h2> |
174 | <h2><a class="toc-backref" href="#id8">Checksum depreciation timing</a></h2> |
|
|
175 | <div class="section" id="general-principles"> |
|
|
176 | <h3><a class="toc-backref" href="#id9">General principles:</a></h3> |
|
|
177 | <p>A minimum set of depreciated checksums shall be maintained only to |
|
|
178 | support old package manager versions where needed by historically used |
|
|
179 | trees:</p> |
|
|
180 | <ul class="simple"> |
|
|
181 | <li>New package manager versions should NOT use depreciated checksums in</li> |
|
|
182 | <li>New trees with that have never used the depreciated checksums may omit |
|
|
183 | them for reasons of size, but are still strongly suggested to include |
|
|
184 | them.</li> |
|
|
185 | <li>Removal of depreciated checksums shall happen after no less than 18 |
|
|
186 | months or one major Portage version cycle, whichever is greater.</li> |
|
|
187 | </ul> |
|
|
188 | </div> |
|
|
189 | <div class="section" id="immediate-plans"> |
|
|
190 | <h3><a class="toc-backref" href="#id10">Immediate plans:</a></h3> |
| 166 | <p>For the current Portage, both SHA1 and RIPEMD160 should be immediately |
191 | <p>For the current Portage, both SHA1 and RIPEMD160 should be immediately |
| 167 | removed, as they present no advantages over the already present SHA256. |
192 | removed, as they present no advantages over the already present SHA256. |
| 168 | SHA256 cannot be replaced immediately with SHA512, as existing Portage |
193 | SHA256 cannot be replaced immediately with SHA512, as existing Portage |
| 169 | versions need at least one supported algorithm present (SHA256 support |
194 | versions need at least one supported algorithm present (SHA256 support |
| 170 | was added in June 2006), so it must be retained for some while.</p> |
195 | was added in June 2006), so it must be retained for some while.</p> |
| 171 | <p>Immediately: |
196 | <p>Immediately:</p> |
|
|
197 | <ul class="simple"> |
| 172 | - Add WHIRLPOOL and SHA512. |
198 | <li>Add WHIRLPOOL and SHA512.</li> |
| 173 | - Remove SHA1 and RIPEMD160.</p> |
199 | <li>Remove SHA1 and RIPEMD160.</li> |
|
|
200 | </ul> |
| 174 | <p>After the majority of Portage installations include SHA512 support: |
201 | <p>After the majority of Portage installations include SHA512 support:</p> |
|
|
202 | <ul class="simple"> |
| 175 | - Remove SHA256.</p> |
203 | <li>Remove SHA256.</li> |
|
|
204 | </ul> |
|
|
205 | </div> |
| 176 | </div> |
206 | </div> |
| 177 | </div> |
207 | </div> |
| 178 | <div class="section" id="backwards-compatibility"> |
208 | <div class="section" id="backwards-compatibility"> |
| 179 | <h1><a class="toc-backref" href="#id9">Backwards Compatibility</a></h1> |
209 | <h1><a class="toc-backref" href="#id11">Backwards Compatibility</a></h1> |
| 180 | <p>Old versions of Portage may support and expect only specific checksums. |
210 | <p>Old versions of Portage may support and expect only specific checksums. |
| 181 | This is accounted for in the checksum depreciation discussion.</p> |
211 | This is accounted for in the checksum depreciation discussion.</p> |
|
|
212 | <p>For maximum compatiability, we should only have to include each of the |
|
|
213 | old algorithms that we are officially still supporting, as well as the |
|
|
214 | new ones that we prefer.</p> |
| 182 | </div> |
215 | </div> |
| 183 | <div class="section" id="references"> |
216 | <div class="section" id="references"> |
| 184 | <h1><a class="toc-backref" href="#id10">References</a></h1> |
217 | <h1><a class="toc-backref" href="#id12">References</a></h1> |
| 185 | <dl class="docutils"> |
218 | <dl class="docutils"> |
| 186 | <dt>[AHS] NIST (2007). "NIST's Plan for New Cryptographic Hash Functions",</dt> |
219 | <dt>[AHS] NIST (2007). "NIST's Plan for New Cryptographic Hash Functions",</dt> |
| 187 | <dd>(Advanced Hash Standard). <a class="reference external" href="http://csrc.nist.gov/pki/HashWorkshop/">http://csrc.nist.gov/pki/HashWorkshop/</a></dd> |
220 | <dd>(Advanced Hash Standard). <a class="reference external" href="http://csrc.nist.gov/pki/HashWorkshop/">http://csrc.nist.gov/pki/HashWorkshop/</a></dd> |
| 188 | <dt>[BOBO06] Boneh, D. and Boyen, X. (2006). "On the Impossibility of</dt> |
221 | <dt>[BOBO06] Boneh, D. and Boyen, X. (2006). "On the Impossibility of</dt> |
| 189 | <dd>Efficiently Combining Collision Resistant Hash Functions"; Proceedings |
222 | <dd>Efficiently Combining Collision Resistant Hash Functions"; Proceedings |
| … | |
… | |
| 217 | version (August 17, 2004). Available online from: |
250 | version (August 17, 2004). Available online from: |
| 218 | <a class="reference external" href="http://eprint.iacr.org/2004/199.pdf">http://eprint.iacr.org/2004/199.pdf</a></dd> |
251 | <a class="reference external" href="http://eprint.iacr.org/2004/199.pdf">http://eprint.iacr.org/2004/199.pdf</a></dd> |
| 219 | </dl> |
252 | </dl> |
| 220 | </div> |
253 | </div> |
| 221 | <div class="section" id="thanks-to"> |
254 | <div class="section" id="thanks-to"> |
| 222 | <h1><a class="toc-backref" href="#id11">Thanks to</a></h1> |
255 | <h1><a class="toc-backref" href="#id13">Thanks to</a></h1> |
| 223 | <dl class="docutils"> |
256 | <dl class="docutils"> |
| 224 | <dt>I'd like to thank the following folks, in no specific order:</dt> |
257 | <dt>I'd like to thank the following folks, in no specific order:</dt> |
| 225 | <dd><ul class="first last simple"> |
258 | <dd><ul class="first last simple"> |
| 226 | <li>Ciaran McCreesh (ciaranm) - for pointing out the Joux (2004) paper, |
259 | <li>Ciaran McCreesh (ciaranm) - for pointing out the Joux (2004) paper, |
| 227 | and also being stubborn enough in not accepting a partial solution.</li> |
260 | and also being stubborn enough in not accepting a partial solution.</li> |
| … | |
… | |
| 231 | </ul> |
264 | </ul> |
| 232 | </dd> |
265 | </dd> |
| 233 | </dl> |
266 | </dl> |
| 234 | </div> |
267 | </div> |
| 235 | <div class="section" id="copyright"> |
268 | <div class="section" id="copyright"> |
| 236 | <h1><a class="toc-backref" href="#id12">Copyright</a></h1> |
269 | <h1><a class="toc-backref" href="#id14">Copyright</a></h1> |
| 237 | <p>Copyright (c) 2006-2010 by Robin Hugh Johnson. This material may be |
270 | <p>Copyright (c) 2006-2010 by Robin Hugh Johnson. This material may be |
| 238 | distributed only subject to the terms and conditions set forth in the |
271 | distributed only subject to the terms and conditions set forth in the |
| 239 | Open Publication License, v1.0.</p> |
272 | Open Publication License, v1.0.</p> |
| 240 | <p>vim: tw=72 ts=2 expandtab:</p> |
273 | <p>vim: tw=72 ts=2 expandtab:</p> |
| 241 | </div> |
274 | </div> |
| 242 | |
275 | |
| 243 | </div> |
276 | </div> |
| 244 | <div class="footer"> |
277 | <div class="footer"> |
| 245 | <hr class="footer" /> |
278 | <hr class="footer" /> |
| 246 | <a class="reference external" href="glep-0059.txt">View document source</a>. |
279 | <a class="reference external" href="glep-0059.txt">View document source</a>. |
| 247 | Generated on: 2010-01-31 08:27 UTC. |
280 | Generated on: 2010-02-07 10:37 UTC. |
| 248 | Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
281 | Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
| 249 | |
282 | |
| 250 | </div> |
283 | </div> |
| 251 | </body> |
284 | </body> |
| 252 | </html> |
285 | </html> |