List of hash - Baldanders.info
tag:Baldanders.info,2015-08-08:/tags
2015-08-08T09:00:00+00:00
バルトアンデルスは連続的な怪物,時間の怪物である。(ホルヘ・ルイス・ボルヘス 『幻獣辞典』より)
https://baldanders.info/images/avatar.jpg
https://baldanders.info/images/avatar.jpg
SHA-3 が OpenPGP に組み込まれる(予定)
tag:Baldanders.info,2015-08-08:/blog/000866/
2015-08-08T09:00:00+00:00
2015-08-08T09:00:00+00:00
ちうわけで OpenPGP の ML で新たにリリースされた SHA-3 の ID 割り当て議論が始まっている。
Spiegel
/profile/
<ul>
<li><a href="https://mailarchive.ietf.org/arch/msg/openpgp/2C5jQNKcnUZZUzh84s0Di-GYKV0">[openpgp] SHA3 algorithm ids.</a></li>
</ul><p>
ちうわけで OpenPGP の ML で<a href="https://baldanders.info/blog/000865/">新たにリリースされた SHA-3</a> の ID 割り当て議論が始まっている。
最初の提案のまま通れば hash 関数の ID は以下のようになる。
</p>
<figure>
<table>
<thead>
<tr><th>ID</th><th>アルゴリズム</th><th>参考文献</th></tr>
</thead>
<tbody>
<tr>
<td class="right">1</td>
<td>MD5</td>
<td><a href="http://www.ietf.org/rfc/rfc1321.txt">RFC1321</a></td></tr>
<tr>
<td class="right">2</td>
<td>SHA-1</td>
<td><a href="http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf">FIPS PUB 186-2 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">3</td>
<td>RIPE-MD/160</td>
<td><a href="http://homes.esat.kuleuven.be/~bosselae/ripemd160.html">"The hash function RIPEMD-160"</a></td></tr>
<tr>
<td class="right">4</td>
<td>Reserved</td>
<td> </td></tr>
<tr>
<td class="right">5</td>
<td>Reserved</td>
<td> </td></tr>
<tr>
<td class="right">6</td>
<td>Reserved</td>
<td> </td></tr>
<tr>
<td class="right">7</td>
<td>Reserved</td>
<td> </td></tr>
<tr>
<td class="right">8</td>
<td>SHA256</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS PUB 180-4 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">9</td>
<td>SHA384</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS PUB 180-4 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">10</td>
<td>SHA512</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS PUB 180-4 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">11</td>
<td>SHA224</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS PUB 180-4 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">12</td>
<td>SHA3-224</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf">FIPS PUB 202 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">13</td>
<td>SHA3-256</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf">FIPS PUB 202 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">14</td>
<td>SHA3-384</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf">FIPS PUB 202 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
<tr>
<td class="right">15</td>
<td>SHA3-512</td>
<td><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf">FIPS PUB 202 <sup><i class="far fa-file-pdf"></i></sup></a></td></tr>
</tbody>
</table>
<figcaption>OpenPGP で使用可能な一方向ハッシュ関数一覧</figcaption>
</figure>
<p>
現在 OpenPGP(<a href="http://tools.ietf.org/html/rfc4880">RFC4880</a>)の改訂版の議論が行われている。
とはいえ前回の時もすンごい時間かかったもんなぁ。
GnuPG の modern version は早めに組み込まれる可能性があるけど,正式なのはもう少し先かな。
</p>
<section>
<h3>参考ページ</h3>
<ul>
<li><a href="https://baldanders.info/spiegel/openpgp/">わかる! OpenPGP 暗号 -- Baldanders.info</a></li>
</ul>
</section>
<section>
<h3>参考図書</h3>
<div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797382228/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/41je9xcsHTL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797382228/baldandersinf-22/">暗号技術入門 第3版 秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>SBクリエイティブ 2015-08-15</dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/4627817711/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4627817711.09._SCTHUMBZZZ_.jpg" alt="データ解析の実務プロセス入門"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/479804413X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/479804413X.09._SCTHUMBZZZ_.jpg" alt="クラウドを支えるこれからの暗号技術"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797376279/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797376279.09._SCTHUMBZZZ_.jpg" alt="10年戦えるデータ分析入門 SQLを武器にデータ活用時代を生き抜く (Informatics &IDEA)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4781701973/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4781701973.09._SCTHUMBZZZ_.jpg" alt="ハッカーの学校"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4798141100/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4798141100.09._SCTHUMBZZZ_.jpg" alt="その数式、プログラムできますか?"/></a> </p>
<p class="description">8月に第3版がでるよ。やっほい!</p>
<p class="gtools">reviewed by <a href="#me" class="reviewer">Spiegel</a> on <abbr class="dtreviewed" title="2015-07-02">2015/07/02</abbr> (powered by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a>)</p>
</div>
</section>
SHA-3 が正式リリース: あれから10年も...
tag:Baldanders.info,2015-08-06:/blog/000865/
2015-08-06T09:00:00+00:00
2015-08-06T09:00:00+00:00
というわけで,イマイチ不遇な感じの SHA-3 だが,決まったからには緩々と実装が始まると思われる。OpenPGP にもそのうち組み込まれるだろう(現在,次期仕様について議論中)。
Spiegel
/profile/
<p>
<a href="https://twitter.com/hyuki">結城浩さん</a>の tweet 経由で
</p>
<figure class="block-center center">
<blockquote class="twitter-tweet" lang="ja"><p lang="ja" dir="ltr">FIPS 202がドラフトではなくなった模様。ギリギリで私の『暗号技術入門 第3版』に反映できそうだ。 / "<a href="http://t.co/gTmr6dekCX">http://t.co/gTmr6dekCX</a> - Computer Security Division - Comput..." <a href="http://t.co/7PqEIt76Lg">http://t.co/7PqEIt76Lg</a></p>— 結城浩 (@hyuki) <a href="https://twitter.com/hyuki/status/629231659146067968">2015, 8月 6</a></blockquote>
</figure>
<p>
おおっ! ついに SHA-3 が正式リリースですか。
</p><ul>
<li><a href="http://csrc.nist.gov/groups/ST/hash/sha-3/sha-3_standardization.html">SHA-3 Standardization</a></li>
<li><a href="https://www.federalregister.gov/articles/2015/08/05/2015-19181/announcing-approval-of-federal-information-processing-standard-fips-202-sha-3-standard">Federal Register | Announcing Approval of Federal Information Processing Standard (FIPS) 202, SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions, and Revision of the Applicability Clause of FIPS 180-4, Secure Hash Standard</a></li>
<li><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf">FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions<sup><i class="far fa-file-pdf"></i></sup></a></li>
<li><a href="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">FIPS PUB 180-4: Secure Hash Standard (SHS)<sup><i class="far fa-file-pdf"></i></sup></a></li>
</ul><p>
そもそもの始まりは,2004年に SHA-1 の脆弱性が見つかったことである。
</p>
<figure>
<blockquote>
<q>例えば SHA-1 のハッシュ値のサイズは160ビットなので,確率は 2 の 80 乗分の 1,つまり 2 の 80 乗回試せばひとつは同じハッシュ値を持つデータの組を見つけることができる(これをハッシュ値の衝突(Collision)と呼びます)ということになります。
しかし件の論文によると,それよりも大きな 2 の 69 乗分の 1 の確率で衝突を起こす攻略方法があるらしいのです。
この論文の内容については現在も検証が行われていますが,専門家の間では概ね正しいだろうと言われています。</q>
</blockquote>
<figcaption><q><a href="https://baldanders.info/blog/000204/">暗号の危殆化と新しいアルゴリズム -- 戯れ言++</a></q>より</figcaption>
</figure>
<p>
もともと SHA-1 は2010年までに運用を終了する予定(いわゆる2010年問題)だったが,この問題は SHA-2 (SHA-2 は SHA-1 の改良版。両方共 NSA が関わっていることで知られている)まで波及しそうな勢いだったため,早急に SHA-2 に代わる新しい hash 関数が求められるようになった。
</p><ul>
<li><a href="https://baldanders.info/blog/000267/">"NIST's Plan for New Cryptographic Hash Functions" -- Baldanders.info</a></li>
<li><a href="https://baldanders.info/blog/000608/">SHA-3 が決まった -- Baldanders.info</a></li>
<li><a href="https://baldanders.info/blog/000702/">FIPS PUB 202 (SHA-3 Standard) Draft -- Baldanders.info</a></li>
</ul><p>
ところがこの competition のあいだに SHA-3 の位置づけが変わってきた。
</p>
<figure>
<blockquote>
<q>もともと SHA-3 は SHA-1 の危殆化に伴い SHA-1/SHA-2 に代わる新しいアルゴリズムをコンペ形式で選定しようというものだった。 SHA-3 のコンペは現在も続いているが(だよね?),その位置づけが変わってきているようなのだ。
<br/>たとえば FIPS PUB 180-4 のドラフトでは64ビット CPU 向けの実装(SHA-512/224, SHA-512/256, SHA-512)が示されている。
これは SHA-1 の危殆化が2005年当時に言われていたほどではないのではないか,という判断があるらしい(実際, SHA-1 のハッシュの衝突例も見つかっていない)。
上述の「2010年問題」の期限延長も,この辺の判断が働いたのではないかという気がする。</q>
</blockquote>
<figcaption><q><a href="https://baldanders.info/blog/000586/">『暗号をめぐる最近の話題』 -- Baldanders.info</a></q>より</figcaption>
</figure>
<p>
というわけで,イマイチ不遇な感じの SHA-3 だが,決まったからには緩々と実装が始まると思われる。
OpenPGP にもそのうち組み込まれるだろう(現在,次期仕様について議論中)。
</p><p>
SP800-57 によると暗号強度と hash 関数の組み合わせは以下のようになっている。
</p>
<figure lang="en">
<table>
<thead>
<tr>
<th>Security <br/>Strength</th>
<th>Digital <br/>Signatures and <br/>hash-only <br/>applications</th>
<th>HMAC</th>
<th>Key Derivation <br/>Functions</th>
<th>Random <br/>Number <br/>Generation</th>
</tr>
</thead>
<tbody>
<tr>
<td class="right">80</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
</tr><tr>
<td class="right">112</td>
<td>SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
</tr><tr>
<td class="right">128</td>
<td>SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
</tr><tr>
<td class="right">192</td>
<td>SHA-384, SHA-512</td>
<td>SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512</td>
</tr><tr>
<td class="right">256</td>
<td>SHA-512</td>
<td>SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-256, SHA-512/256, SHA-384, SHA-512</td>
<td>SHA-256, SHA-512/256, SHA-384, SHA-512</td>
</tr>
</tbody>
</table>
<figcaption>Hash function that can be used to provide the targeted security strengths (via <q><a href="http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf">SP800-57 Part 1 (Revision 3) <sup><i class="far fa-file-pdf"></i></sup></a></q>)</figcaption>
</figure>
<p>
ちなみに2030年を超えて Acceptable なのは 128bits 以上の暗号強度である。
</p>
<figure lang="en">
<table>
<thead>
<tr>
<th colspan="2">Security Strength</th>
<th>2011 through 2013</th>
<th>2014 through 2030</th>
<th>2031 and Beyond</th>
</tr>
</thead>
<tbody>
<tr><td class="right" rowspan="2">80</td> <td>Applying</td> <td>Deprecated</td> <td colspan="2" class="center">Disallowed</td></tr>
<tr> <td>Processing</td> <td colspan="3" class="center">Legacy use</td></tr>
<tr><td class="right" rowspan="2">112</td><td>Applying</td> <td rowspan="2">Acceptable</td><td rowspan="2">Acceptable</td><td>Disallowed</td></tr>
<tr> <td>Processing</td> <td>Legacy use</td></tr>
<tr><td class="right">128</td> <td rowspan="3">Applying/Processing</td><td>Acceptable</td> <td>Acceptable</td> <td>Acceptable</td></tr>
<tr><td class="right">192</td> <td>Acceptable</td> <td>Acceptable</td> <td>Acceptable</td></tr>
<tr><td class="right">256</td> <td>Acceptable</td> <td>Acceptable</td> <td>Acceptable</td></tr>
</tbody>
</table>
<figcaption>Security-strength time frames (via <q><a href="http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf">SP800-57 Part 1 (Revision 3) <sup><i class="far fa-file-pdf"></i></sup></a></q>)</figcaption>
</figure>
<p>
他の暗号アルゴリズムで言うと 128bits 以上の暗号強度は
</p><ul>
<li>DSA, ElGamal, RSA なら 3072bits 以上</li>
<li>ECDSA なら 256bits 以上</li>
<li>共通鍵暗号なら AES-128 以上</li>
</ul><p>
に相当する。
</p>
<div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797382228/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/41je9xcsHTL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797382228/baldandersinf-22/">暗号技術入門 第3版 秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>SBクリエイティブ 2015-08-15</dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/4627817711/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4627817711.09._SCTHUMBZZZ_.jpg" alt="データ解析の実務プロセス入門"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/479804413X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/479804413X.09._SCTHUMBZZZ_.jpg" alt="クラウドを支えるこれからの暗号技術"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797376279/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797376279.09._SCTHUMBZZZ_.jpg" alt="10年戦えるデータ分析入門 SQLを武器にデータ活用時代を生き抜く (Informatics &IDEA)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4781701973/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4781701973.09._SCTHUMBZZZ_.jpg" alt="ハッカーの学校"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4798141100/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4798141100.09._SCTHUMBZZZ_.jpg" alt="その数式、プログラムできますか?"/></a> </p>
<p class="description">8月に第3版がでるよ。やっほい!</p>
<p class="gtools">reviewed by <a href="#me" class="reviewer">Spiegel</a> on <abbr class="dtreviewed" title="2015-07-02">2015/07/02</abbr> (powered by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a>)</p>
</div>
<figure class="block-center center">
<iframe width="500" height="281" src="https://www.youtube-nocookie.com/embed/EISwMAsq3BY" frameborder="0" allowfullscreen=""></iframe>
</figure>
FIPS PUB 202 (SHA-3 Standard) Draft
tag:Baldanders.info,2014-06-21:/blog/000702/
2014-06-21T09:00:00+00:00
2014-06-21T09:00:00+00:00
先月5月に FIPS PUB 202 のドラフトが登場している。
Spiegel
/profile/
<p> 先月5月に <a href="http://csrc.nist.gov/publications/PubsDrafts.html#FIPS-202">FIPS PUB 202 のドラフトが登場</a>している。 2014年8月26日(日本時間で27日?)までコメント受付中だそうだ。 </p> <blockquote> “Four fixed-length cryptographic hash algorithms (SHA3-224, SHA3-256, SHA3-384, and SHA3-512) and two closely related, “extendable-output” functions (SHAKE128 and SHAKE256) are specified in Draft FIPS 202; all six algorithms are permutation-based “sponge” functions. The four SHA-3 hash functions provide alternatives to the SHA-2 family of hash functions. The extendable-output functions (XOFs) can be specialized to hash functions, subject to additional security considerations, or used in a variety of other applications. Hash algorithms are used in many information security applications, including (1) the generation and verification of digital signatures, (2) key-derivation functions, and (3) random bit generation.” <br/>(via “<a href="https://www.federalregister.gov/articles/2014/05/28/2014-12336/announcing-draft-federal-information-processing-standard-fips-202-sha-3-standard-permutation-based">Federal Register | Announcing Draft Federal Information Processing Standard (FIPS) 202, SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions, and Draft Revision of the Applicability Clause of FIPS 180-4, Secure Hash Standard, and Request for Comments</a>”) </blockquote> <p> <a href="https://baldanders.info/blog/000586/">前にも紹介した</a>が,当初言われていたのとは異なり, SHA-3 は現行の SHA-2 を置き換えるのではなく SHA-2 の “alternative” として考えられているようだ。 向こうでは<a href="http://csrc.nist.gov/groups/ST/hash/sha-3/Aug2014/index.html">8月にワークショップも開催される</a>らしい。 </p><p> これを知ったのは <a href="https://www.ietf.org/mailman/listinfo/openpgp">OpenPGP のメーリングリスト</a>だが,我ながら感度低くなったなぁ。 まぁ理由ははっきりしていて, RSS の巡回を怠っているせいだ。 だって仕事終わりがしんどいんだもん。 週末に一気に見るのもしんどいし。 というわけで,「遅ればせながら」の記事が多いのは勘弁して下さい。 </p><p> あぁ,それからこれは蛇足だけど,最近 Hash 関数等で「符号化」しただけのものを「暗号化」などと嘯くサービスプロバイダが増えてる気がするが,暗号化と符号化は違うからね(符号化あるいは要約と呼ばれる技術も暗号技術の一部だけどさ)。 暗号とは「アルゴリズム」と「鍵」がセットになってはじめて「暗号」だからね(そして鍵の管理を考慮しない暗号製品やサービスはクズ)。 同様の理由でステガノグラフィのような隠蔽技術も厳密には暗号とは区別されるよ。 </p> <div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H18/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/51njmeGhpKL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H18/baldandersinf-22/">新版暗号技術入門 秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>SBクリエイティブ株式会社 2013-12-04</dd><dd>評価<abbr class="rating" title="5"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-5-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00KRB9U8K/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00KRB9U8K.09._SCTHUMBZZZ_.jpg" alt="詳解UNIXプログラミング 第3版"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H40/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00H372H40.09._SCTHUMBZZZ_.jpg" alt="プログラマの数学"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00KNRBFM2/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00KNRBFM2.09._SCTHUMBZZZ_.jpg" alt="プログラムは技術だけでは動かない ~プログラミングで食べていくために知っておくべきこと"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00I8AT1D6/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00I8AT1D6.09._SCTHUMBZZZ_.jpg" alt="数学ガール/ゲーデルの不完全性定理"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00I8AT1CM/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00I8AT1CM.09._SCTHUMBZZZ_.jpg" alt="数学ガール/フェルマーの最終定理"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2014/06/21">2014/06/21</abbr></p></div>
さようなら MD5
tag:Baldanders.info,2014-06-04:/blog/000694/
2014-06-04T09:00:00+00:00
2014-06-04T09:00:00+00:00
まぁ,全く使えなくなったわけではないし,過去の資産に対しては必要なものだったりするのでなくなることもないとは思いますが。
Spiegel
/profile/
<p> いつか来ると分かっていたとはいえ,いよいよとなると感慨深いものです。 </p><blockquote> “Reject signatures made using the MD5 hash algorithm unless the new option --allow-weak-digest-algos or --pgp2 are given.” <br/>(via “<a href="http://lists.gnupg.org/pipermail/gnupg-announce/2014q2/000342.html">[Announce] GnuPG 2.0.23 released</a>”) </blockquote><p> まぁ,全く使えなくなったわけではないし,過去の資産に対しては必要なものだったりするのでなくなることもないとは思いますが。 </p><p> こういうのを見ると20世紀に暗号アルゴリズムが軍事品として輸出規制されていた頃を思い出します。 色々苦労したよなぁ, PGP とか。 </p> <div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H18/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/51njmeGhpKL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H18/baldandersinf-22/">新版暗号技術入門 秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>SBクリエイティブ株式会社 2013-12-04</dd><dd>評価<abbr class="rating" title="4"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-4-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00KMHSJ7M/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00KMHSJ7M.09._SCTHUMBZZZ_.jpg" alt="オープンソース・クラウド基盤 OpenStack入門 構築・利用方法から内部構造の理解まで (アスキー書籍)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00H372H40/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00H372H40.09._SCTHUMBZZZ_.jpg" alt="プログラマの数学"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00I8AT1D6/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00I8AT1D6.09._SCTHUMBZZZ_.jpg" alt="数学ガール/ゲーデルの不完全性定理"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00I8AT1CM/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00I8AT1CM.09._SCTHUMBZZZ_.jpg" alt="数学ガール/フェルマーの最終定理"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/B00IP549AE/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/B00IP549AE.09._SCTHUMBZZZ_.jpg" alt="インフラ/ネットワークエンジニアのためのネットワーク技術&設計入門"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2014/06/03">2014/06/03</abbr></p></div> <div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4314009071/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/51ZRZ62WKCL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4314009071/baldandersinf-22/">暗号化 プライバシーを救った反乱者たち</a></dt><dd>スティーブン・レビー 斉藤 隆央 </dd><dd>紀伊國屋書店 2002-02-16</dd><dd>評価<abbr class="rating" title="4"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-4-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/487593100X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/487593100X.09._SCTHUMBZZZ_.jpg" alt="ハッカーズ"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/410215972X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/410215972X.09._SCTHUMBZZZ_.jpg" alt="暗号解読〈上〉 (新潮文庫)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4102159738/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4102159738.09._SCTHUMBZZZ_.jpg" alt="暗号解読 下巻 (新潮文庫 シ 37-3)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4484111160/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4484111160.09._SCTHUMBZZZ_.jpg" alt="グーグル ネット覇者の真実 追われる立場から追う立場へ"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4105393022/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4105393022.09._SCTHUMBZZZ_.jpg" alt="暗号解読―ロゼッタストーンから量子暗号まで"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2014/06/03">2014/06/03</abbr></p></div>
SHA-3 が決まった
tag:Baldanders.info,2012-10-06:/blog/000608/
2012-10-06T09:00:00+00:00
2012-10-06T09:00:00+00:00
SHA-3 のアルゴリズムが決まったそうだ。
Spiegel
/profile/
<p>
SHA-3 のアルゴリズムが決まったそうだ。
</p><blockquote>
“NIST announced Keccak as the winner of the SHA-3 Cryptographic Hash Algorithm Competition and the new SHA-3 hash algorithm in a press release issued on October 2, 2012.”<br/>
(via “<a href="http://csrc.nist.gov/groups/ST/hash/sha-3/winner_sha-3.html">SHA-3 WINNER</a>”)
</blockquote><p>
これから FIPS 等も整理されていくのだろう。
</p><p>
近年の暗号の状況については「<a href="https://baldanders.info/blog/000586/">『暗号をめぐる最近の話題』</a>」を参考にどうぞ。
</p>
『暗号をめぐる最近の話題』
tag:Baldanders.info,2012-02-12:/blog/000586/
2012-02-12T09:00:00+00:00
2012-02-12T09:00:00+00:00
「2010年問題」の期限延長と次期ハッシュ関数 SHA-3 について。
Spiegel
/profile/
<p>
ゴメン。
「最近の話題」ってのは少しウソ。
実は1年前の話なのだが,私が放ったらかしにしていたのだ。
でも個人的にはもうすぐ <a href="https://baldanders.info/pubkeys/">OpenPGP 運用鍵</a>の更新タイミングだし,そろそろ覚え書きの形でもまとめておかないといけない気がするので,今更ながら書いておく。
</p><p>
2011年はじめ,米国 <a href="http://csrc.nist.gov/">NIST</a> から以下の文書が公開された。
</p><ul>
<li><a href="http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf">NIST Special Publication 800-131A -- Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths</a> (PDF)</li>
<li><a href="">DRAFT FIPS PUB 180-4 -- Secure Hash Standard (SHS)</a> (PDF)</li>
</ul><p>
特に重要なのは SP 800-131A のほう。
SP 800-131A には推奨される暗号アルゴリズムとその鍵長について記されている。
さらに IPA が2011年5月に公開した「<a href="http://www.ipa.go.jp/about/technicalwatch/20110511.html">『暗号をめぐる最近の話題』に関するレポート</a>」では,この SP 800-131A について言及がある。
</p><ul>
<li><a href="http://www.ipa.go.jp/about/technicalwatch/pdf/110511report.pdf">IPA テクニカルウォッチ 『暗号をめぐる最近の話題』に関するレポート ~ SSL/TLSや暗号世代交代に関連する話題から ~</a> (PDF)</li>
</ul><p>
IPA のレポートのほうが簡潔で分かりやすいので,以降はこのレポートを元に書いていく。
</p><p>
もともと NIST では SP 800-57 で1024ビット RSA 鍵や SHA-1 署名等を2010年を目処にもっと強力なもの(2048ビット RSA 鍵,SHA-2)に切り替えるよう促していた。
いわゆる「2010年問題」である。
しかし SP 800-131A ではこの期限を実質的に2013年までに延長した。
具体的には以下のとおり。
</p><div style="margin-left:2em;"><table class="solid">
<tbody><tr><td>2-key Triple DES</td><td>2010年末まで Acceptable<br/>2015年末まで Restricted</td></tr>
<tr><td>AES </td><td>Acceptable</td></tr>
<tr><td>1024ビット RSA</td><td>2010年末まで Acceptable<br/>2013年末まで Deprecated</td></tr>
<tr><td>2048ビット RSA</td><td>Acceptable</td></tr>
<tr><td>SHA-1 による署名</td><td>2010年末まで Acceptable<br/>2013年末まで Deprecated</td></tr>
<tr><td>SHA-1 (署名以外)</td><td>Acceptable</td></tr>
<tr><td>SHA-256</td><td>Acceptable</td></tr>
</tbody></table></div><p>
ちなみに “Acceptable” は「安全に使える(解読リスクが表面化していない)と考えられる暗号アルゴリズム」, “Deprecated” は「ある程度の解読リスクはあるものの、短期的には(データ暗号化や署名生成にも)使ってもよいと考えられる暗号アルゴリズム」, “Restricted” は「解読リスクを回避するために利用する際の制約条件を付けた上で、短期的には(データ暗号化にも)使ってもよいと考えられる暗号アルゴリズム」である。
なおこれらの期限以降は基本的に “Disallowed”(利用を禁止する暗号アルゴリズム)となっている。
</p><p>
現状はどうなっているかというと以下の記事が参考になる。
</p><ul>
<li><a href="http://itpro.nikkeibp.co.jp/article/NEWS/20120208/380459/">「暗号の2010年問題ではハッシュ関数の対応が遅れている」、日本ベリサイン - ITpro</a></li>
</ul><blockquote>
「日本ベリサインによれば、SSLサーバー証明書の公開鍵暗号については一部のモバイルサイトを除き、多くのWebサイトが2048ビットRSAに対応済みという。一方で、ハッシュ関数についてはWebブラウザーなどの対応が遅れており、ほとんどがSHA-1のままだという。「Windows XP SP2以前のWindowsや2008年以前に発売された携帯電話機など一部でSHA-2に対応できないものが存在しており、業界として対応を先送りにしてきた事情がある」」
(「<a href="http://itpro.nikkeibp.co.jp/article/NEWS/20120208/380459/">「暗号の2010年問題ではハッシュ関数の対応が遅れている」、日本ベリサイン</a>」より)
</blockquote><p>
ということらしい。
WinXP のバージョンが古いままなのはユーザ側の問題だし(つか,いっそのこと XP のサポートは終了していいと思う。 IE6 根絶のためにもw),古いケータイが SHA-2 に対応していない(できない)のはどうしようもないと思う。
さて,来年末までにどうにかなるのかねぇ。
</p><p>
もうひとつ「<a href="http://www.ipa.go.jp/about/technicalwatch/20110511.html">『暗号をめぐる最近の話題』に関するレポート</a>」で指摘されているのは,時期ハッシュ関数である SHA-3 の位置づけである。
</p><p>
もともと SHA-3 は <a href="http://www.atmarkit.co.jp/fsecurity/rensai/crypt01/crypt01.html">SHA-1 の危殆化</a>に伴い SHA-1/SHA-2 に代わる新しいアルゴリズムをコンペ形式で選定しようというものだった。
SHA-3 のコンペは現在も続いているが(だよね?),その位置づけが変わってきているようなのだ。
</p><blockquote>
「これまで、SHA-2ファミリーはSHA-3ができるまでのワンポイントリリーフ的な扱いになるかもしれないという意見が少なからずあった。
しかし、現在のNISTの動きを見る限りは、AESがDES/Triple DESの代替方式という明確な位置づけを与えられていたのとは異なり、むしろSHA-2ファミリーのほうこそ今後の本命であり、SHA-3はSHA-2の代替どころか補完もしくはバックアップとして位置づけるように見直してきている節がある。」
(「<a href="http://www.ipa.go.jp/about/technicalwatch/pdf/110511report.pdf">『暗号をめぐる最近の話題』に関するレポート</a>」(PDF)より)
</blockquote><p>
たとえば FIPS PUB 180-4 のドラフトでは64ビット CPU 向けの実装(SHA-512/224, SHA-512/256, SHA-512)が示されている。
これは SHA-1 の危殆化が2005年当時に言われていたほどではないのではないか,という判断があるらしい(実際, SHA-1 のハッシュの衝突例も見つかっていない)。
上述の「2010年問題」の期限延長も,この辺の判断が働いたのではないかという気がする。
</p><p>
というわけで,個人的には SHA-3 の登場を(そして GnuPG に実装されるのを)待っていたのだが,少なくとも運用に関しては SHA-3 を気にしなくてもよさそうな感じである。
</p><p>
参考:
</p><ul>
<li><a href="https://baldanders.info/blog/000204/">暗号の危殆化と新しいアルゴリズム</a> </li>
</ul>
<div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797350997/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/51evnioBHsL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797350997/baldandersinf-22/">新版暗号技術入門 秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>ソフトバンククリエイティブ 2008-11-22</dd><dd>評価<abbr class="rating" title="5"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-5-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/4798025585/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4798025585.09._SCTHUMBZZZ_.jpg" alt="図解入門 よくわかる最新情報セキュリティの基本と仕組み―基礎から学ぶセキュリティリテラシー (How‐nual Visual Guide Book)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797329734/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797329734.09._SCTHUMBZZZ_.jpg" alt="プログラマの数学"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/406257490X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/406257490X.09._SCTHUMBZZZ_.jpg" alt="改訂新版 暗号の数理 (ブルーバックス)"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797341378/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797341378.09._SCTHUMBZZZ_.jpg" alt="数学ガール"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4274065421/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4274065421.09._SCTHUMBZZZ_.jpg" alt="マスタリングTCP/IP SSL/TLS編"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2012/02/12">2012/02/12</abbr></p></div>
<div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4314009071/baldandersinf-22/"><img src="https://images-fe.ssl-images-amazon.com/images/I/51ZRZ62WKCL._SL160_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4314009071/baldandersinf-22/">暗号化 プライバシーを救った反乱者たち</a></dt><dd>スティーブン・レビー 斉藤 隆央 </dd><dd>紀伊國屋書店 2002-02-16</dd><dd>評価<abbr class="rating" title="5"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-5-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/487593100X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/487593100X.09._SCTHUMBZZZ_.jpg" alt="ハッカーズ"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4794204302/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4794204302.09._SCTHUMBZZZ_.jpg" alt="カッコウはコンピュータに卵を産む〈上〉"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4794204310/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4794204310.09._SCTHUMBZZZ_.jpg" alt="カッコウはコンピュータに卵を産む〈下〉"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/076454280X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/076454280X.09._SCTHUMBZZZ_.jpg" alt="The Art of Deception: Controlling the Human Element of Security"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/067940774X/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/067940774X.09._SCTHUMBZZZ_.jpg" alt="ARTIFICIAL LIFE"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2012/02/12">2012/02/12</abbr></p></div>
FIPS PUB 186-3
tag:Baldanders.info,2009-09-28:/blog/000462/
2009-09-28T09:00:00+00:00
2009-09-28T09:00:00+00:00
いやぁ,全く気がつかなかったっス。
Spiegel
/profile/
<p>
いやぁ,
全く気がつかなかったっス。
<a href="http://csrc.nist.gov/groups/ST/toolkit/digital_signatures.html">6月にリリース</a>されてたんだねぇ。
</p><blockquote>
“NIST is proud to announce the publication of FIPS 186-3,
The Digital Signature Standard.
FIPS 186-3 is a revision of FIPS 186-2.
The FIPS specifies three techniques for the generation and verification of digital signatures: DSA, ECDSA and RSA.
This revision increases the length of the keys allowed for DSA,
provides additional requirements for the use of ECDSA and RSA,
and includes requirements for obtaining assurances necessary for valid digital signatures.”
</blockquote><p>
ちうわけで,
以下が FIPS 186-3 だ。
</p><ul>
<li><a href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf">FIPS PUB 186-3, Digital Signature Standard (DSS)</a> (PDF)</li>
</ul><p>
今回のメインはやっぱり DSA (Digital Signature Algorithm)の要件が改良されたことだろう。
詳しくは拙文<a href="https://baldanders.info/blog/000204/">「暗号の危殆化と新しいアルゴリズム」</a>を参照のこと。
当時はドラフト案だったけど,
これで大手を振って使えるわけやね。
(あれから3年かかったんじゃねぇ)
</p><p>
あとは新しいハッシュ関数(SHA-3)か。
現在 SHA-3 コンペは第2ラウンドらしい。
しばらく前に MD6 が手を引いたみたいなニュースが流れていた。
</p><ul>
<li><a href="http://www.schneier.com/blog/archives/2009/07/md6.html">MD6 Withdrawn from SHA-3 Competition</a></li>
<li><a href="http://csrc.nist.gov/groups/ST/hash/sha-3/Round2/submissions_rnd2.html">Second Round Candidates</a></li>
<li><a href="http://www.schneier.com/blog/archives/2009/07/sha-3_second_ro.html">SHA-3 Second Round Candidates Announced</a></li>
</ul><p>
さて,
どうなるか楽しみである。
</p>
“SHA-1 Collision Search Graz”
tag:Baldanders.info,2007-09-09:/blog/000347/
2007-09-09T09:00:00+00:00
2007-09-09T09:00:00+00:00
「計算機暗号屋日記」の記事で知ったのですが,“SHA-1 Collision Search Graz”というのがあるようです。(追記あり)
Spiegel
/profile/
<p>
<a href="http://flu.if0.org/~maro/j/diary/0708.html#30">「計算機暗号屋日記」の記事</a>で知ったのですが,
<a href="http://boinc.iaik.tugraz.at/sha1_coll_search/">“SHA-1 Collision Search Graz”</a>
というのがあるようです。
<a href="http://boinc.berkeley.edu/">BOINC</a> ベースの分散コンピューティングプロジェクトということで<a href="http://boinc.iaik.tugraz.at/view_profile.php?userid=2469">私も早速参加</a>しました。
</p><p>
ハッシュ関数である SHA-1 のアルゴリズム上の欠陥により,
ハッシュ値が衝突する可能性が考えられているよりもずっと高いと言われていることは<a href="https://baldanders.info/blog/000204/">以前書きました</a>が,
<a href="http://boinc.iaik.tugraz.at/sha1_coll_search/">“SHA-1 Collision Search Graz”</a> はこの問題の実証実験という位置付けのようです。
暗号技術に関心のある方,
計算機パワーに余裕のある方,
このプロジェクトのために余分に電気代を払ってもいいという方はぜひご参加ください。
<a href="http://boinc.berkeley.edu/">BOINC</a> は複数の分散コンピューティング・プロジェクトと共存できます。
詳しくは <a href="http://spiegel.vox.com/library/posts/tags/boinc/">Vox で書いた記事</a>をどうぞ。
</p>
<p>
(追記 9/15)
</p><p>
いつの間にか URL が変わってました。
現在は以下の URL で行われています。
</p><ul>
<li><a href="http://boinc.iaik.tugraz.at/sha1_coll_search/">http://boinc.iaik.tugraz.at/sha1_coll_search/</a></li>
<ul>
</ul></ul>
APOP 認証の脆弱性について
tag:Baldanders.info,2007-04-21:/blog/000319/
2007-04-21T09:00:00+00:00
2007-04-21T09:00:00+00:00
今更だけど覚え書きとして書いておく。(4/22 一部修正)
Spiegel
/profile/
<p>
今更だけど覚え書きとして書いておく。
今週 IPA/ISEC から APOP の脆弱性に関する注意喚起が出た。
(4/30 一部訂正)
</p><ul>
<li><a href="http://www.ipa.go.jp/security/vuln/200704_APOP.html">APOP(エーポップ)方式におけるセキュリティ上の弱点(脆弱性)の注意喚起について</a></li>
<li><a href="http://www.ipa.go.jp/security/vuln/documents/2007/JVN_19445002.html">JVN#19445002 APOP におけるパスワード漏えいの脆弱性</a></li>
</ul><p>
IPA/ISEC および JVN の解説は簡潔すぎて要領を得ないので,以下のページを参考にするとよい。
</p><ul>
<li><a href="http://fse2007.uni.lu/slides/APOP.pdf">Message Freedom in MD4 and MD5 Collisions: Application to APOP</a></li>
<li><a href="http://cryptology.cocolog-nifty.com/blog/2007/04/apop.html">APOP</a></li>
<li><a href="http://oku.edu.mie-u.ac.jp/~okumura/blog/node/1413">APOP Broken?</a></li>
</ul><p>
注意しなければならないのは,
これはあくまでメール(POP)サーバへアクセスする際の認証プロトコルの問題であり,
メール本文が盗み見されたり改竄されたりといった問題とは無関係ということだ。
っていうか,
よく言われるように電子メールは郵便で言えば葉書と同じようなものであり,
第三者が本文を覗き見したり改竄することは以前から可能である
(たとえ MUA-MTA 間の通信を暗号化しても MTA-MTA 間は平文のまま流通する)。
それをリスクと感じるなら PGP/MIME や S/MIME 等でメール本文を署名・暗号化する必要がある。
</p><p>
さて,
今回の手法は「Man-in-the-middle 攻撃」と呼ばれるものの一種。
ユーザと POP サーバの間に割り込んで(ユーザから見て)サーバになりすます。
そうして APOP のやり取りを記録しパスワードの一部を割り出すわけだ。
パスワードの一部といっても最大31文字まで割り出せるそうなので,
ほとんどの人は完全なパスワードをぶっこ抜かれてしまうのではないだろうか。
</p><p>
何故 APOP が狙われているかというと,おそらく3つポイントがある。
</p><ul>
<li>APOP がセキュアな MAC (Message Authentication Code)ではない。</li>
<li>APOP で使われる MD5 (ハッシュ関数の一種)はいくつかの攻略法が発見されていて既に危殆化している。
(ハッシュ関数の危殆化の問題については<a href="https://baldanders.info/blog/000204/">拙文</a>を参照のこと)</li>
<li>アルゴリズムの危殆化が考慮されておらず MD5 以外の選択肢がない。</li>
</ul><p>
多くの人は POP 認証を自動化しているはずで,
全く気付かないうちにパスワード情報をぶっこ抜かれている可能性もある。
この攻撃によってパスワードを知られてしまうことによりメールサーバへの不正アクセスを許してしまうのはもちろんだが
(POP 認証と SMTP 認証では同じパスワードになっていることが多いが,
そうすると取得したパスワードを使って spam をばら撒くこともできそうだ),
そのパスワードを他のサービスでも使っている場合,
まとめて侵入を許してしまうことにもなりかねない。
これは<a href="http://twitter.g.hatena.ne.jp/worris/20070417">「Twitterとソーシャルハッキング」</a>で書かれているような話と構図としては同じで,
いわゆる「クラスブレイク」が発生している状況である。
</p><p>
ここまでが APOP の脆弱性によって予想される脅威(ハザード)。
しかし私たちが知りたいのは脅威ではなくリスクだ。
<a href="http://www.ipa.go.jp/security/vuln/documents/2007/JVN_19445002.html">JVN のレポート</a>によると,
<a href="https://baldanders.info/blog/000290/">CVSS</a> の基本値は 4.0 でそれほど高くない。
現状値や環境値は状況によって違うと思うので各自で確かめて欲しいが
(一応 <a href="https://baldanders.info/spiegel/archive/cvss/cvss.html">JavaScript によるデモ</a>がある),
そんなに酷い値にはならないと思う。
これは Man-in-the-middle 攻撃自体の実現性がそれほど高くないからだと思う
(Base Metrics の Access Complexity も high だもんな)。
とはいえ放置できるほど軽微でもないので,
ユーザやメールサーバの管理者(ISP を含む)は何らかの手を打つ必要がある。
</p><p>
APOP 自体は標準のプロトコルであり,
これを変更することはコストがかかりすぎる。
MUA 側でできる手っ取り早い(ただし消極的な)対応としては,
送られてくるチャレンジコードをチェックしバイナリ値を含む場合には認証を中断するというものだ。
いっそ POP を捨てて IMAP にすれば CRAM-MD5 等の認証プロトコルが使える
(CRAM-MD5 では HMAC を使う)。
可能であればこういった方法に切り替える手もあるだろう。
</p><p>
IPA/ISEC のレポートでは POP over SSL や Web メールを利用する方法が紹介されている。
SSL/TLS で通信を暗号化した上で認証を行うというわけだ。
しかし,
個人的な印象では(Web メールはともかく) SSL/TLS をメールサーバにアクセスするためだけに使うには高価すぎる気がする。
現在の SSL/TLS は X.509 ベースの PKI を構築している。
X.509 は多対多または1対多での証明には向いているが(例えば Web),
1対1の証明に使うにはコスト(特にランニングコスト)がかかりすぎる。
<a href="http://takagi-hiromitsu.jp/diary/20070419.html#p01">「APOP終焉で「POP over オレオレSSL」の撲滅運動が可能に」</a>では
</p><blockquote>
「それにしても、上のオレオレ事業者たちは、なぜ普通にサーバ証明書を買わないのだろうか?」
</blockquote><p>
と書かれているが,
そんなのは簡単な話で,
メールサーバだけのために証明書を調達する(ランニング)コストに比べて,
(それによってもたらされる)リスク・ベネフィットのバランスの改善が小さくて見合わないと思っているからだ。
<a href="http://spiegel.vox.com/library/book/6a00c22527e6f3604a00d09e60a0dabe2b.html">“Beyond Fear”</a> 風に言うなら「トレードオフ」による判断であり,
<a href="http://spiegel.vox.com/library/book/6a00c22527e6f3604a00c22529aeeef219.html">『環境リスク学』</a>風に言うなら「意思決定のためのリスク」評価だ。
この辺の状況は電子メールだけじゃなくて Jabber なんかでも同じ。
(4/30 訂正あり。文末の追記を参照)
</p><p>
(念のために書いておくが,
私はオレオレ証明書を容認しているわけではない。
SSL/TLS が X.509 ベースの PKI で運用されている限り,
規模の大小に関わらず,
オレオレ証明書を使うことは SSL/TLS の信用モデルを根底から覆す。
まぁ <a href="http://www.gnu.org/software/gnutls/openpgp.html">“GnuTLS OpenPGP key support”</a> が標準になれば状況も変わるかもしれないが)
</p><p>
しかし,
まぁ,
これが5年前くらいの話だったらもう少し真剣に考えるところだろうけど,
電子メールなんて今ほとんど使わないからなぁ。
プライベートなやり取りなら IM や mixi 等の SNS についてるメッセージ機能のほうが手軽で使いやすいし。
どうしてもメールのやり取りが必要なら Gmail 使えばいいし。
</p>
<p>
(4/30 追記)
</p><p>
Twitter で指摘されたのですが,
サーバ証明書でワイルドカードが使えることを完全に失念していました。
つまり<a href="http://www.sakura.ne.jp/">さくらインターネット</a>が提供しているような共用レンタルサーバでもそれほどコストをかけずにサーバ証明書を導入することは可能であるということですね。
指摘してくださった方に感謝&申し訳ないです。
</p>
<div class="hreview"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797322977/baldandersinf-22/"><img src="http://ec1.images-amazon.com/images/P/4797322977.09._SCMZZZZZZZ_V45380603_.jpg" alt="photo" class="photo"/></a><dl><dt class="fn"><a class="item url" href="https://www.amazon.co.jp/exec/obidos/ASIN/4797322977/baldandersinf-22/">暗号技術入門-秘密の国のアリス</a></dt><dd>結城 浩 </dd><dd>ソフトバンククリエイティブ 2003-09-30</dd><dd>評価<abbr class="rating" title="5"><img src="https://images-fe.ssl-images-amazon.com/images/G/01/detail/stars-5-0.gif" alt=""/></abbr> </dd></dl><p class="similar"><a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797329734/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797329734.09._SCTHUMBZZZ_.jpg" alt="プログラマの数学"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4797319119/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4797319119.09._SCTHUMBZZZ_.jpg" alt="暗号技術大全"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4756145485/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4756145485.09._SCTHUMBZZZ_.jpg" alt="Winnyの技術"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4839919844/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4839919844.09._SCTHUMBZZZ_.jpg" alt="30日でできる! OS自作入門"/></a> <a href="https://www.amazon.co.jp/exec/obidos/ASIN/4873112885/baldandersinf-22/" target="_top"><img src="https://images-fe.ssl-images-amazon.com/images/P/4873112885.09._SCTHUMBZZZ_.jpg" alt="Binary Hacks ―ハッカー秘伝のテクニック100選"/></a> </p><p class="gtools">by <a href="http://www.goodpic.com/mt/aws/index.html">G-Tools</a> , <abbr class="dtreviewed" title="2007/04/21">2007/04/21</abbr></p></div>
"NIST's Plan for New Cryptographic Hash Functions"
tag:Baldanders.info,2007-01-27:/blog/000267/
2007-01-27T09:00:00+00:00
2007-01-27T09:00:00+00:00
ちうわけで,前々から予告のあったハッシュアルゴリズム・コンテストがいよいよ行われるらしい。
Spiegel
/profile/
<p>
ちうわけで,
前々から予告のあったハッシュアルゴリズム・コンテストがいよいよ行われるらしい。
</p><ul>
<li><a href="http://www.csrc.nist.gov/pki/HashWorkshop/index.html">NIST's Plan for New Cryptographic Hash Functions</a></li>
<li><a href="http://itpro.nikkeibp.co.jp/article/NEWS/20070125/259640/">NIST,新ハッシュ関数アルゴリズムの公募コンテストを開催へ</a></li>
</ul><p>
ところで,
FIPS 186-3 (Digital Signature Standard; DSS)はどうなったんだろうと思ったら,
<a href="http://csrc.nist.gov/CryptoToolkit/tkdigsigs.html">「2/23 までにコメント頂戴」</a>(かなり意訳)と書かれていた。
問題なさそうなら今年の春くらいには正式リリースかな?
</p>