/[gentoo]/xml/htdocs/proj/en/glep/glep-0059.html
Gentoo

Diff of /xml/htdocs/proj/en/glep/glep-0059.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.8
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 4
5<head> 5<head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> 7 <meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
8 <title>GLEP 59 -- Manifest2 hash policies and security implications</title> 8 <title>GLEP 59 -- Manifest2 hash policies and security implications</title>
9 <link rel="stylesheet" href="tools/glep.css" type="text/css" /></head> 9 <link rel="stylesheet" href="tools/glep.css" type="text/css" /></head>
10<body bgcolor="white"> 10<body bgcolor="white">
11<table class="navigation" cellpadding="0" cellspacing="0" 11<table class="navigation" cellpadding="0" cellspacing="0"
12 width="100%" border="0"> 12 width="100%" border="0">
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.11</td> 30<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.6</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">2008/07/13 02:23:36</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/01/31 09:55:43</a></td>
33</tr> 33</tr>
34<tr class="field"><th class="field-name">Author:</th><td class="field-body">Robin Hugh Johnson &lt;robbat2&#32;&#97;t&#32;gentoo.org&gt;,</td> 34<tr class="field"><th class="field-name">Author:</th><td class="field-body">Robin Hugh Johnson &lt;robbat2&#32;&#97;t&#32;gentoo.org&gt;,</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>
41</tr> 41</tr>
42<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/proj/en/glepglep-0044.html">44</a></td> 42<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/proj/en/glepglep-0044.html">44</a></td>
43</tr> 43</tr>
44<tr class="field"><th class="field-name">Created:</th><td class="field-body">October 2006</td> 44<tr class="field"><th class="field-name">Created:</th><td class="field-body">October 2006</td>
45</tr> 45</tr>
46<tr class="field"><th class="field-name">Updated:</th><td class="field-body">November 2007, June 2008, July 2008</td> 46<tr class="field"><th class="field-name">Updated:</th><td class="field-body">November 2007, June 2008, July 2008, October 2008, January 2010</td>
47</tr> 47</tr>
48<tr class="field"><th class="field-name">Updates:</th><td class="field-body">44</td> 48<tr class="field"><th class="field-name">Updates:</th><td class="field-body">44</td>
49</tr>
50<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">December 2009, January 2010</td>
49</tr> 51</tr>
50</tbody> 52</tbody>
51</table> 53</table>
52<hr /> 54<hr />
53<div class="contents topic" id="contents"> 55<div class="contents topic" id="contents">
57<li><a class="reference internal" href="#motivation" id="id2">Motivation</a></li> 59<li><a class="reference internal" href="#motivation" id="id2">Motivation</a></li>
58<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>
59<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>
60<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>
61<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>
62<li><a class="reference internal" href="#what-should-be-done" id="id7">What should be done</a><ul> 64<li><a class="reference internal" href="#what-should-be-done" id="id7">What should be done</a></li>
63<li><a class="reference internal" href="#checksum-depreciation" id="id8">Checksum depreciation</a></li> 65<li><a class="reference internal" href="#checksum-depreciation-timing" id="id8">Checksum depreciation timing</a></li>
64</ul>
65</li>
66</ul> 66</ul>
67</li> 67</li>
68<li><a class="reference internal" href="#backwards-compatibility" id="id9">Backwards Compatibility</a></li> 68<li><a class="reference internal" href="#backwards-compatibility" id="id9">Backwards Compatibility</a></li>
69<li><a class="reference internal" href="#references" id="id10">References</a></li> 69<li><a class="reference internal" href="#references" id="id10">References</a></li>
70<li><a class="reference internal" href="#thanks-to" id="id11">Thanks to</a></li> 70<li><a class="reference internal" href="#thanks-to" id="id11">Thanks to</a></li>
83<h1><a class="toc-backref" href="#id2">Motivation</a></h1> 83<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 84<p>This GLEP is being written as part of the work on signing the Portage
85tree, but is only tangentially related to the actual signing of 85tree, but is only tangentially related to the actual signing of
86Manifests. Checksums present one possible weak point in the overall 86Manifests. Checksums present one possible weak point in the overall
87security of the tree - and a comprehensive security plan is needed.</p> 87security of the tree - and a comprehensive security plan is needed.</p>
88<p>This GLEP is not mandatory for the tree-signing specification, but
89instead aims to improve the security of the hashes used in Manifest2.
90As such, it is also able to stand on it's own.</p>
88</div> 91</div>
89<div class="section" id="specification"> 92<div class="section" id="specification">
90<h1><a class="toc-backref" href="#id3">Specification</a></h1> 93<h1><a class="toc-backref" href="#id3">Specification</a></h1>
91<div class="section" id="the-bad-news"> 94<div class="section" id="the-bad-news">
92<h2><a class="toc-backref" href="#id4">The bad news</a></h2> 95<h2><a class="toc-backref" href="#id4">The bad news</a></h2>
96The most common position (and indeed the one previously held by myself), 99The most common position (and indeed the one previously held by myself),
97is that multiple checksums would be an increase in security, but we 100is that multiple checksums would be an increase in security, but we
98could not provably quantify the amount of security this added. 101could not provably quantify the amount of security this added.
99The really bad news, is that this position is completely and utterly 102The really bad news, is that this position is completely and utterly
100wrong. Many of you will be aghast at this. There is extremely little 103wrong. Many of you will be aghast at this. There is extremely little
101added security in multiple checksums [J04]. For any set of checksums, 104added security in multiple checksums as noted by Joux [J04]. For any set
102the actual strength lies in that of the strongest checksum.</p> 105of checksums, the actual strength lies in that of the strongest
106checksum.</p>
107<p>Wang et al [W04] extended Joux's [J04] work on SHA-0 to cover MD4, MD5,
108HAVAL-128 and RIPEMD families of hashes.</p>
103</div> 109</div>
104<div class="section" id="how-fast-can-md5-be-broken"> 110<div class="section" id="how-fast-can-md5-be-broken">
105<h2><a class="toc-backref" href="#id5">How fast can MD5 be broken?</a></h2> 111<h2><a class="toc-backref" href="#id5">How fast can MD5 be broken?</a></h2>
106<p>For a general collision, not a pre-image attack, since the original 112<p>For a general collision, not a pre-image attack, since the announcement
107announcement by Wang et al [W04], the time required to break MD5 has 113by Wang et al [W04], the time required to break MD5 has been massively
108been massively reduced. Originally at 1 hour on a near-supercomputer 114reduced. Originally at 1 hour on a near-supercomputer (IBM P690) and
109(IBM P690) and estimated at 64 hours with a Pentium-3 1.7Ghz. This has 115estimated at 64 hours with a Pentium-3 1.7Ghz. This has gone down to
110gone down to less than in two years, to 17 seconds [K06a]!</p> 116less than in two years, to 17 seconds [K06a].</p>
111<p>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours 117<p>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours
11203/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours 11803/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours
11311/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours 11911/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours
11403/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours 12003/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours
11504/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</p> 12104/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</p>
116<p>If we accept a factor of 800x as a sample of how much faster a checksum 122<p>If we accept a factor of 800x as a sample of how much faster a checksum
117may be broken over the course of 2 years (MD5 using the above data is 123may be broken over the course of 2 years (MD5 using the above data is
118&gt;2000x), then existing checksums do not stand a significant chance of 124&gt;2000x), then existing checksums do not stand a significant chance of
119survival in the future. We should thus accept that whatever checksums we 125survival in the future. We should thus accept that whatever checksums we
120are using today, will be broken in the near future, and plan as best as 126are using today, will be broken in the near future, and plan as best as
121possible. (A brief review [H04] of the present SHA1 attacks indicates an 127possible. (A brief review [H04] of the SHA1 attacks indicates an
122improvement of ~600x in the same timespan).</p> 128improvement of ~600x in the same timespan).</p>
123<p>And for those that claim implementation of these procedures is not yet 129<p>And for those that claim implementation of these procedures is not yet
124feasible, see [K06b] for an application that can produce two 130feasible, see [K06b] for an application that can produce two
125self-extracting .exe files, with identical MD5s, and whatever payload 131self-extracting EXE files, with identical MD5s, and whatever payload you
126you want.</p> 132want.</p>
127</div> 133</div>
128<div class="section" id="the-good-news"> 134<div class="section" id="the-good-news">
129<h2><a class="toc-backref" href="#id6">The good news</a></h2> 135<h2><a class="toc-backref" href="#id6">The good news</a></h2>
130<p>Of the checksums presently used by Manifest2, one stands close to being 136<p>Of the checksums presently used by Manifest2 (SHA1, SHA256, RIPEMD160),
131completely broken: SHA1. The SHA2 series has suffered some attacks, but 137one stands close to being completely broken: SHA1; and another is
132still remains reasonably solid [G07],[K08]. No attacks against RIPEMD160 138significantly weakened: RIPEMD160. The SHA2 series has suffered some
133have been published, however it is constructed in the same manner as 139attacks, but still remains reasonably solid [G07],[K08].</p>
134MD5, SHA1 and SHA2, so is also vulnerable to the new methods of
135cryptanalysis [H04].</p>
136<p>To reduce the potential for future problems and any single checksum 140<p>To reduce the potential for future problems and any single checksum
137break leading to a rapid decrease in security, we should incorporate the 141break leading to a rapid decrease in security, we should incorporate the
138strongest hash available from each family of checksums, and be prepared 142strongest hash available from each family of checksums, and be prepared
139to retire old checksums actively, unless there is a overriding reason to 143to retire old checksums actively, unless there is a overriding reason to
140keep a specific checksum.</p> 144keep a specific checksum, such as part of a migration plan.</p>
141</div> 145</div>
142<div class="section" id="what-should-be-done"> 146<div class="section" id="what-should-be-done">
143<h2><a class="toc-backref" href="#id7">What should be done</a></h2> 147<h2><a class="toc-backref" href="#id7">What should be done</a></h2>
144<p>Portage should always try to verify all supported hashes that are 148<p>Portage should always try to verify all supported hashes that are
145available in a Manifest2, starting with the strongest ones as maintained 149available in a Manifest2, starting with the strongest ones as maintained
146by a preference list. Over time, the weaker checksums should be removed 150by a preference list. Over time, the weaker checksums should be removed
147from Manifest2 files, once all old Portage installations have had 151from Manifest2 files, once all old Portage installations have had
148sufficient time to upgrade. We should be prepared to add stronger 152sufficient time to upgrade. We should be prepared to add stronger
149checksums wherever possible, and to remove those that have been 153checksums wherever possible, and to remove those that have been
150defeated.</p> 154defeated.</p>
155<p>As soon as feasible, we should add the SHA512 and WHIRLPOOL algorithms.
156In future, as stream-based checksums are developed (in response to the
157development by NIST [AHS]), they should be considered and used.</p>
158<p>The SHA512 algorithm is available in Python 2.5, which has been a
159dependency of Portage since approximately Python 2.1.6.13.</p>
160<p>The WHIRLPOOL checksum is not available within the PyCrypto library or
161hashlib that is part of Python 2.5, but there are multiple alternative
162Python implementations available, ranging from pure Python to C-based
163(python-mhash).</p>
151<p>An unsupported hash is not considered to be a failure unless no 164<p>The existence unsupported hash is not considered to be a failure unless
152supported hashes are available.</p> 165no supported hashes are available for a given Manifest entry.</p>
166</div>
153<div class="section" id="checksum-depreciation"> 167<div class="section" id="checksum-depreciation-timing">
154<h3><a class="toc-backref" href="#id8">Checksum depreciation</a></h3> 168<h2><a class="toc-backref" href="#id8">Checksum depreciation timing</a></h2>
155<p>For the current Portage, SHA1 should be gradually removed, as presents 169<p>For the current Portage, both SHA1 and RIPEMD160 should be immediately
156no advantages over SHA256. Beyond one specific problem (see the next 170removed, as they present no advantages over the already present SHA256.
157paragraph), we should add SHA512 (SHA2, 512 bit size), the Whirlpool 171SHA256 cannot be replaced immediately with SHA512, as existing Portage
158checksum (standardized checksum, with no known weaknesses). In future, 172versions need at least one supported algorithm present (SHA256 support
159as stream-based checksums are developed (in response to the development 173was added in June 2006), so it must be retained for some while.</p>
160by NIST [AHS]), they should be considered and used.</p> 174<p>Immediately:
161<p>There is one temporary stumbling block at hand - the existing Portage 175- Add WHIRLPOOL and SHA512.
162infrastructure does not support SHA384/512 or Whirlpool, thus hampering 176- Remove SHA1 and RIPEMD160.</p>
163their immediate acceptance. SHA512 is available in Python 2.5, while 177<p>After the majority of Portage installations include SHA512 support:
164SHA1 is already available in Python 2.4. After Python2.5 is established 178- Remove SHA256.</p>
165in a Gentoo media release, that would be a suitable time to remove SHA1
166from Manifest2 files.</p>
167</div>
168</div> 179</div>
169</div> 180</div>
170<div class="section" id="backwards-compatibility"> 181<div class="section" id="backwards-compatibility">
171<h1><a class="toc-backref" href="#id9">Backwards Compatibility</a></h1> 182<h1><a class="toc-backref" href="#id9">Backwards Compatibility</a></h1>
172<p>Old versions of Portage may support and expect only specific checksums. 183<p>Old versions of Portage may support and expect only specific checksums.
184<a class="reference external" href="http://crypto.stanford.edu/~dabo/abstracts/hashing.html">http://crypto.stanford.edu/~dabo/abstracts/hashing.html</a></dd> 195<a class="reference external" href="http://crypto.stanford.edu/~dabo/abstracts/hashing.html">http://crypto.stanford.edu/~dabo/abstracts/hashing.html</a></dd>
185<dt>[H04] Hawkes, P. and Paddon, M. and Rose, G. (2004). &quot;On Corrective</dt> 196<dt>[H04] Hawkes, P. and Paddon, M. and Rose, G. (2004). &quot;On Corrective</dt>
186<dd>Patterns for the SHA-2 Family&quot;. CRYPTO 2004 Cryptology ePrint Archive, 197<dd>Patterns for the SHA-2 Family&quot;. CRYPTO 2004 Cryptology ePrint Archive,
187Report 2004/204. Available online from: 198Report 2004/204. Available online from:
188<a class="reference external" href="http://eprint.iacr.org/2004/207.pdf">http://eprint.iacr.org/2004/207.pdf</a></dd> 199<a class="reference external" href="http://eprint.iacr.org/2004/207.pdf">http://eprint.iacr.org/2004/207.pdf</a></dd>
189<dt>[J04] Joux, Antoie. (2004). &quot;Multicollisions in Iterated Hash Functions</dt> 200<dt>[J04] Joux, Antoie. (2004). &quot;Multicollisions in Iterated Hash</dt>
190<dd><ul class="first simple">
191<li>Application to Cascaded Constructions;&quot; Proceedings of CRYPTO 2004,</li> 201<dd>Functions - Application to Cascaded Constructions;&quot; Proceedings of
192</ul> 202CRYPTO 2004, Franklin, M. (Ed); Lecture Notes in Computer Science
193<div class="system-message">
194<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">glep-0059.txt</tt>, line 139)</p>
195Bullet list ends without a blank line; unexpected unindent.</div>
196<p class="last">Franklin, M. (Ed); Lecture Notes in Computer Science 3152, pp.
197306-316. Available online from: 2033152, pp. 306-316. Available online from:
198<a class="reference external" href="http://web.cecs.pdx.edu/~teshrim/spring06/papers/general-attacks/multi-joux.pdf">http://web.cecs.pdx.edu/~teshrim/spring06/papers/general-attacks/multi-joux.pdf</a></p> 204<a class="reference external" href="http://web.cecs.pdx.edu/~teshrim/spring06/papers/general-attacks/multi-joux.pdf">http://web.cecs.pdx.edu/~teshrim/spring06/papers/general-attacks/multi-joux.pdf</a></dd>
199</dd>
200<dt>[K06a] Klima, V. (2006). &quot;Tunnels in Hash Functions: MD5 Collisions</dt> 205<dt>[K06a] Klima, V. (2006). &quot;Tunnels in Hash Functions: MD5 Collisions</dt>
201<dd>Within a Minute&quot;. Cryptology ePrint Archive, Report 2006/105. 206<dd>Within a Minute&quot;. Cryptology ePrint Archive, Report 2006/105.
202Available online from: <a class="reference external" href="http://eprint.iacr.org/2006/105.pdf">http://eprint.iacr.org/2006/105.pdf</a></dd> 207Available online from: <a class="reference external" href="http://eprint.iacr.org/2006/105.pdf">http://eprint.iacr.org/2006/105.pdf</a></dd>
203<dt>[K06b] Klima, V. (2006). &quot;Note and links to high-speed MD5 collision</dt> 208<dt>[K06b] Klima, V. (2006). &quot;Note and links to high-speed MD5 collision</dt>
204<dd>proof of concept tools&quot;. Available online from: 209<dd>proof of concept tools&quot;. Available online from:
230</dd> 235</dd>
231</dl> 236</dl>
232</div> 237</div>
233<div class="section" id="copyright"> 238<div class="section" id="copyright">
234<h1><a class="toc-backref" href="#id12">Copyright</a></h1> 239<h1><a class="toc-backref" href="#id12">Copyright</a></h1>
235<p>Copyright (c) 2006 by Robin Hugh Johnson. This material may be 240<p>Copyright (c) 2006-2010 by Robin Hugh Johnson. This material may be
236distributed only subject to the terms and conditions set forth in the 241distributed only subject to the terms and conditions set forth in the
237Open Publication License, v1.0.</p> 242Open Publication License, v1.0.</p>
238<p>vim: tw=72 ts=2 expandtab:</p> 243<p>vim: tw=72 ts=2 expandtab:</p>
239</div> 244</div>
240 245
241</div> 246</div>
242<div class="footer"> 247<div class="footer">
243<hr class="footer" /> 248<hr class="footer" />
244<a class="reference external" href="glep-0059.txt">View document source</a>. 249<a class="reference external" href="glep-0059.txt">View document source</a>.
245Generated on: 2008-10-21 23:29 UTC. 250Generated on: 2010-01-31 09:56 UTC.
246Generated 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. 251Generated 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.
247 252
248</div> 253</div>
249</body> 254</body>
250</html> 255</html>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20