| … | |
… | |
| 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.3</td> |
30 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.5</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/10/28 07:45:44</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 07:55:45</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> |
| … | |
… | |
| 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, October 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> |
49 | </tr> |
| 50 | <tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td> |
50 | <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">December 2009, January 2010</td> |
| 51 | </tr> |
51 | </tr> |
| 52 | </tbody> |
52 | </tbody> |
| 53 | </table> |
53 | </table> |
| 54 | <hr /> |
54 | <hr /> |
| 55 | <div class="contents topic" id="contents"> |
55 | <div class="contents topic" id="contents"> |
| … | |
… | |
| 59 | <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> |
| 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><ul> |
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" id="id8">Checksum depreciation</a></li> |
65 | <li><a class="reference internal" href="#checksum-depreciation-timing" id="id8">Checksum depreciation timing</a></li> |
| 66 | </ul> |
|
|
| 67 | </li> |
|
|
| 68 | </ul> |
66 | </ul> |
| 69 | </li> |
67 | </li> |
| 70 | <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> |
| 71 | <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> |
| 72 | <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> |
| … | |
… | |
| 98 | The most common position (and indeed the one previously held by myself), |
96 | The most common position (and indeed the one previously held by myself), |
| 99 | is that multiple checksums would be an increase in security, but we |
97 | is that multiple checksums would be an increase in security, but we |
| 100 | could not provably quantify the amount of security this added. |
98 | could not provably quantify the amount of security this added. |
| 101 | The really bad news, is that this position is completely and utterly |
99 | The really bad news, is that this position is completely and utterly |
| 102 | wrong. Many of you will be aghast at this. There is extremely little |
100 | wrong. Many of you will be aghast at this. There is extremely little |
| 103 | added security in multiple checksums [J04]. For any set of checksums, |
101 | added security in multiple checksums as noted by Joux [J04]. For any set |
| 104 | the actual strength lies in that of the strongest checksum.</p> |
102 | of checksums, the actual strength lies in that of the strongest |
|
|
103 | checksum.</p> |
|
|
104 | <p>Wang et al [W04] extended Joux's [J04] work on SHA-0 to cover MD4, MD5, |
|
|
105 | HAVAL-128 and RIPEMD families of hashes.</p> |
| 105 | </div> |
106 | </div> |
| 106 | <div class="section" id="how-fast-can-md5-be-broken"> |
107 | <div class="section" id="how-fast-can-md5-be-broken"> |
| 107 | <h2><a class="toc-backref" href="#id5">How fast can MD5 be broken?</a></h2> |
108 | <h2><a class="toc-backref" href="#id5">How fast can MD5 be broken?</a></h2> |
| 108 | <p>For a general collision, not a pre-image attack, since the original |
109 | <p>For a general collision, not a pre-image attack, since the announcement |
| 109 | announcement by Wang et al [W04], the time required to break MD5 has |
110 | by Wang et al [W04], the time required to break MD5 has been massively |
| 110 | been massively reduced. Originally at 1 hour on a near-supercomputer |
111 | reduced. Originally at 1 hour on a near-supercomputer (IBM P690) and |
| 111 | (IBM P690) and estimated at 64 hours with a Pentium-3 1.7Ghz. This has |
112 | estimated at 64 hours with a Pentium-3 1.7Ghz. This has gone down to |
| 112 | gone down to less than in two years, to 17 seconds [K06a]!</p> |
113 | less than in two years, to 17 seconds [K06a].</p> |
| 113 | <p>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours |
114 | <p>08/2004 - 1 hour, IBM pSeries 690 (32x 1.7Ghz POWER4+) = 54.4 GHz-Hours |
| 114 | 03/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours |
115 | 03/2005 - 8 hours, Pentium-M 1.6Ghz = 12.8 Ghz-Hours |
| 115 | 11/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours |
116 | 11/2005 - 5 hours, Pentium-4 1.7Ghz = 8.5 Ghz-Hours |
| 116 | 03/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours |
117 | 03/2006 - 1 minute, Pentium-4 3.2Ghz = .05 Ghz-Hours |
| 117 | 04/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</p> |
118 | 04/2006 - 17 seconds, Pentium-4 3.2Ghz = .01 Ghz-Hours</p> |
| 118 | <p>If we accept a factor of 800x as a sample of how much faster a checksum |
119 | <p>If we accept a factor of 800x as a sample of how much faster a checksum |
| 119 | may be broken over the course of 2 years (MD5 using the above data is |
120 | may be broken over the course of 2 years (MD5 using the above data is |
| 120 | >2000x), then existing checksums do not stand a significant chance of |
121 | >2000x), then existing checksums do not stand a significant chance of |
| 121 | survival in the future. We should thus accept that whatever checksums we |
122 | survival in the future. We should thus accept that whatever checksums we |
| 122 | are using today, will be broken in the near future, and plan as best as |
123 | are using today, will be broken in the near future, and plan as best as |
| 123 | possible. (A brief review [H04] of the present SHA1 attacks indicates an |
124 | possible. (A brief review [H04] of the SHA1 attacks indicates an |
| 124 | improvement of ~600x in the same timespan).</p> |
125 | improvement of ~600x in the same timespan).</p> |
| 125 | <p>And for those that claim implementation of these procedures is not yet |
126 | <p>And for those that claim implementation of these procedures is not yet |
| 126 | feasible, see [K06b] for an application that can produce two |
127 | feasible, see [K06b] for an application that can produce two |
| 127 | self-extracting .exe files, with identical MD5s, and whatever payload |
128 | self-extracting EXE files, with identical MD5s, and whatever payload you |
| 128 | you want.</p> |
129 | want.</p> |
| 129 | </div> |
130 | </div> |
| 130 | <div class="section" id="the-good-news"> |
131 | <div class="section" id="the-good-news"> |
| 131 | <h2><a class="toc-backref" href="#id6">The good news</a></h2> |
132 | <h2><a class="toc-backref" href="#id6">The good news</a></h2> |
| 132 | <p>Of the checksums presently used by Manifest2, one stands close to being |
133 | <p>Of the checksums presently used by Manifest2 (SHA1, SHA256, RIPEMD160), |
| 133 | completely broken: SHA1. The SHA2 series has suffered some attacks, but |
134 | one stands close to being completely broken: SHA1; and another is |
| 134 | still remains reasonably solid [G07],[K08]. No attacks against RIPEMD160 |
135 | significantly weakened: RIPEMD160. The SHA2 series has suffered some |
| 135 | have been published, however it is constructed in the same manner as |
136 | attacks, but still remains reasonably solid [G07],[K08].</p> |
| 136 | MD5, SHA1 and SHA2, so is also vulnerable to the new methods of |
|
|
| 137 | cryptanalysis [H04].</p> |
|
|
| 138 | <p>To reduce the potential for future problems and any single checksum |
137 | <p>To reduce the potential for future problems and any single checksum |
| 139 | break leading to a rapid decrease in security, we should incorporate the |
138 | break leading to a rapid decrease in security, we should incorporate the |
| 140 | strongest hash available from each family of checksums, and be prepared |
139 | strongest hash available from each family of checksums, and be prepared |
| 141 | to retire old checksums actively, unless there is a overriding reason to |
140 | to retire old checksums actively, unless there is a overriding reason to |
| 142 | keep a specific checksum.</p> |
141 | keep a specific checksum, such as part of a migration plan.</p> |
| 143 | </div> |
142 | </div> |
| 144 | <div class="section" id="what-should-be-done"> |
143 | <div class="section" id="what-should-be-done"> |
| 145 | <h2><a class="toc-backref" href="#id7">What should be done</a></h2> |
144 | <h2><a class="toc-backref" href="#id7">What should be done</a></h2> |
| 146 | <p>Portage should always try to verify all supported hashes that are |
145 | <p>Portage should always try to verify all supported hashes that are |
| 147 | available in a Manifest2, starting with the strongest ones as maintained |
146 | available in a Manifest2, starting with the strongest ones as maintained |
| 148 | by a preference list. Over time, the weaker checksums should be removed |
147 | by a preference list. Over time, the weaker checksums should be removed |
| 149 | from Manifest2 files, once all old Portage installations have had |
148 | from Manifest2 files, once all old Portage installations have had |
| 150 | sufficient time to upgrade. We should be prepared to add stronger |
149 | sufficient time to upgrade. We should be prepared to add stronger |
| 151 | checksums wherever possible, and to remove those that have been |
150 | checksums wherever possible, and to remove those that have been |
| 152 | defeated.</p> |
151 | defeated.</p> |
|
|
152 | <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 |
|
|
154 | 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 |
|
|
156 | dependency of Portage since approximately Python 2.1.6.13.</p> |
|
|
157 | <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 |
|
|
159 | Python implementations available, ranging from pure Python to C-based |
|
|
160 | (python-mhash).</p> |
| 153 | <p>An unsupported hash is not considered to be a failure unless no |
161 | <p>The existence unsupported hash is not considered to be a failure unless |
| 154 | supported hashes are available.</p> |
162 | no supported hashes are available for a given Manifest entry.</p> |
|
|
163 | </div> |
| 155 | <div class="section" id="checksum-depreciation"> |
164 | <div class="section" id="checksum-depreciation-timing"> |
| 156 | <h3><a class="toc-backref" href="#id8">Checksum depreciation</a></h3> |
165 | <h2><a class="toc-backref" href="#id8">Checksum depreciation timing</a></h2> |
| 157 | <p>For the current Portage, SHA1 should be gradually removed, as presents |
166 | <p>For the current Portage, both SHA1 and RIPEMD160 should be immediately |
| 158 | no advantages over SHA256. Beyond one specific problem (see the next |
167 | removed, as they present no advantages over the already present SHA256. |
| 159 | paragraph), we should add SHA512 (SHA2, 512 bit size), the Whirlpool |
168 | SHA256 cannot be replaced immediately with SHA512, as existing Portage |
| 160 | checksum (standardized checksum, with no known weaknesses). In future, |
169 | versions need at least one supported algorithm present (SHA256 support |
| 161 | as stream-based checksums are developed (in response to the development |
170 | was added in June 2006), so it must be retained for some while.</p> |
| 162 | by NIST [AHS]), they should be considered and used.</p> |
171 | <p>Immediately: |
| 163 | <p>There is one temporary stumbling block at hand - the existing Portage |
172 | - Add WHIRLPOOL and SHA512. |
| 164 | infrastructure does not support SHA384/512 or Whirlpool, thus hampering |
173 | - Remove SHA1 and RIPEMD160.</p> |
| 165 | their immediate acceptance. SHA512 is available in Python 2.5, while |
174 | <p>After the majority of Portage installations include SHA512 support: |
| 166 | SHA1 is already available in Python 2.4. After Python2.5 is established |
175 | - Remove SHA256.</p> |
| 167 | in a Gentoo media release, that would be a suitable time to remove SHA1 |
|
|
| 168 | from Manifest2 files.</p> |
|
|
| 169 | </div> |
|
|
| 170 | </div> |
176 | </div> |
| 171 | </div> |
177 | </div> |
| 172 | <div class="section" id="backwards-compatibility"> |
178 | <div class="section" id="backwards-compatibility"> |
| 173 | <h1><a class="toc-backref" href="#id9">Backwards Compatibility</a></h1> |
179 | <h1><a class="toc-backref" href="#id9">Backwards Compatibility</a></h1> |
| 174 | <p>Old versions of Portage may support and expect only specific checksums. |
180 | <p>Old versions of Portage may support and expect only specific checksums. |
| … | |
… | |
| 226 | </dd> |
232 | </dd> |
| 227 | </dl> |
233 | </dl> |
| 228 | </div> |
234 | </div> |
| 229 | <div class="section" id="copyright"> |
235 | <div class="section" id="copyright"> |
| 230 | <h1><a class="toc-backref" href="#id12">Copyright</a></h1> |
236 | <h1><a class="toc-backref" href="#id12">Copyright</a></h1> |
| 231 | <p>Copyright (c) 2006 by Robin Hugh Johnson. This material may be |
237 | <p>Copyright (c) 2006-2010 by Robin Hugh Johnson. This material may be |
| 232 | distributed only subject to the terms and conditions set forth in the |
238 | distributed only subject to the terms and conditions set forth in the |
| 233 | Open Publication License, v1.0.</p> |
239 | Open Publication License, v1.0.</p> |
| 234 | <p>vim: tw=72 ts=2 expandtab:</p> |
240 | <p>vim: tw=72 ts=2 expandtab:</p> |
| 235 | </div> |
241 | </div> |
| 236 | |
242 | |
| 237 | </div> |
243 | </div> |
| 238 | <div class="footer"> |
244 | <div class="footer"> |
| 239 | <hr class="footer" /> |
245 | <hr class="footer" /> |
| 240 | <a class="reference external" href="glep-0059.txt">View document source</a>. |
246 | <a class="reference external" href="glep-0059.txt">View document source</a>. |
| 241 | Generated on: 2008-10-28 07:47 UTC. |
247 | Generated on: 2010-01-31 07:55 UTC. |
| 242 | 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. |
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. |
| 243 | |
249 | |
| 244 | </div> |
250 | </div> |
| 245 | </body> |
251 | </body> |
| 246 | </html> |
252 | </html> |