SHA-3 が正式リリース: あれから10年も...
結城浩さんの tweet 経由で
FIPS 202がドラフトではなくなった模様。ギリギリで私の『暗号技術入門 第3版』に反映できそうだ。 / "http://t.co/gTmr6dekCX - Computer Security Division - Comput..." http://t.co/7PqEIt76Lg
— 結城浩 (@hyuki) 2015, 8月 6
おおっ! ついに SHA-3 が正式リリースですか。
- SHA-3 Standardization
- 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
- FIPS PUB 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions
- FIPS PUB 180-4: Secure Hash Standard (SHS)
そもそもの始まりは,2004年に SHA-1 の脆弱性が見つかったことである。
例えば SHA-1 のハッシュ値のサイズは160ビットなので,確率は 2 の 80 乗分の 1,つまり 2 の 80 乗回試せばひとつは同じハッシュ値を持つデータの組を見つけることができる(これをハッシュ値の衝突(Collision)と呼びます)ということになります。 しかし件の論文によると,それよりも大きな 2 の 69 乗分の 1 の確率で衝突を起こす攻略方法があるらしいのです。 この論文の内容については現在も検証が行われていますが,専門家の間では概ね正しいだろうと言われています。
暗号の危殆化と新しいアルゴリズム -- 戯れ言++より
もともと SHA-1 は2010年までに運用を終了する予定(いわゆる2010年問題)だったが,この問題は SHA-2 (SHA-2 は SHA-1 の改良版。両方共 NSA が関わっていることで知られている)まで波及しそうな勢いだったため,早急に SHA-2 に代わる新しい hash 関数が求められるようになった。
- "NIST's Plan for New Cryptographic Hash Functions" -- Baldanders.info
- SHA-3 が決まった -- Baldanders.info
- FIPS PUB 202 (SHA-3 Standard) Draft -- Baldanders.info
ところがこの competition のあいだに SHA-3 の位置づけが変わってきた。
もともと SHA-3 は SHA-1 の危殆化に伴い SHA-1/SHA-2 に代わる新しいアルゴリズムをコンペ形式で選定しようというものだった。 SHA-3 のコンペは現在も続いているが(だよね?),その位置づけが変わってきているようなのだ。
たとえば FIPS PUB 180-4 のドラフトでは64ビット CPU 向けの実装(SHA-512/224, SHA-512/256, SHA-512)が示されている。 これは SHA-1 の危殆化が2005年当時に言われていたほどではないのではないか,という判断があるらしい(実際, SHA-1 のハッシュの衝突例も見つかっていない)。 上述の「2010年問題」の期限延長も,この辺の判断が働いたのではないかという気がする。
『暗号をめぐる最近の話題』 -- Baldanders.infoより
というわけで,イマイチ不遇な感じの SHA-3 だが,決まったからには緩々と実装が始まると思われる。 OpenPGP にもそのうち組み込まれるだろう(現在,次期仕様について議論中)。
SP800-57 によると暗号強度と hash 関数の組み合わせは以下のようになっている。
Security Strength |
Digital Signatures and hash-only applications |
HMAC | Key Derivation Functions |
Random Number Generation |
---|---|---|---|---|
80 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 |
112 | SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 |
128 | SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-1, SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 |
192 | SHA-384, SHA-512 | SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-224, SHA-512/224, SHA-256, SHA-512/256, SHA-384, SHA-512 |
256 | SHA-512 | SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-256, SHA-512/256, SHA-384, SHA-512 | SHA-256, SHA-512/256, SHA-384, SHA-512 |
SP800-57 Part 1 (Revision 3))
ちなみに2030年を超えて Acceptable なのは 128bits 以上の暗号強度である。
Security Strength | 2011 through 2013 | 2014 through 2030 | 2031 and Beyond | |
---|---|---|---|---|
80 | Applying | Deprecated | Disallowed | |
Processing | Legacy use | |||
112 | Applying | Acceptable | Acceptable | Disallowed |
Processing | Legacy use | |||
128 | Applying/Processing | Acceptable | Acceptable | Acceptable |
192 | Acceptable | Acceptable | Acceptable | |
256 | Acceptable | Acceptable | Acceptable |
SP800-57 Part 1 (Revision 3))
他の暗号アルゴリズムで言うと 128bits 以上の暗号強度は
- DSA, ElGamal, RSA なら 3072bits 以上
- ECDSA なら 256bits 以上
- 共通鍵暗号なら AES-128 以上
に相当する。