プリントスタック TOKYO

データベースとセキュリティの世界から離れて早数年。過去の記憶を探しています。

ZIP暗号って何?

過去までに、DES3やAES、ストリーム暗号など暗号アルゴリズムについて、話したり、聞いたりしていました。


業種や接する業界が変わった途端に「ZIP暗号」って暗号ですか?という質問を受けたりするようになるのですが....今まで、パスワード付きのZIP圧縮というものを "暗号" とは思っていませんでした。


そこで、少しだけ自分なりに調べてみた結果を掲載します。


ZIPで用いられる暗号アルゴリズムは、「zipcrypto」と呼ばれるものだそうです。
パスワードベースの共通鍵暗号方式が用いられています。
※ZIPのバージョン5.2以降は、AESやDES3、RC2、RC4も利用できるようです。


それでは、何故、バージョン5.2以降に対応している「AES」や「DES3」のアルゴリズムが実装されて普及していないのでしょうか?

PKWARE社がZIPに対して特許を保有しているため、他のソフトウエア開発者が自由に使えないということらしいです。(最後尾に引用を掲載)


そうとは言っても、ZIP形式は、社会的に普及しており、UnixLinux、Windows(※1)、Macintosh とマルチOSで利用できるフォーマットです。

※1 Windows Vistaからは標準でZIP圧縮できません。

企業では、ZIP圧縮して、パスワードを付けて、メールでZIPファイルを送り、パスワードを別送するというルールが普通になっています。
これは、誰でもZIPファイルを作成して、展開できることが理由の一つです。特別なソフトウエアやメールクライアントに依存せずに出来る対策として選ばれた方法なのでしょう。

追記(2013年11月29日)
まとめると、ZIP暗号は、多くのOSで扱えるための標準の「zipcrypto」を利用しています。
この暗号アルゴリズムの強度は、前述にもある通り、辞書攻撃による総当たりが可能であるため決してセキュリティレベルが高いわけではありません。
そのため、パスワードのランダム性が必要になり、少なくとも「半角英数字混在の8~16文字」(文字列は多い方が良い)のパスワードを利用すべきだと思います。


PKWARE社のAPPNOTE.TXTより

4.1.4 Data encryption MAY be used to protect files within a ZIP file.
Keying methods supported for encryption within this format include
passwords and public/private keys. Either MAY be used individually
or in combination. Encryption MAY be applied to individual files.
Additional security MAY be used through the encryption of ZIP file
metadata stored within the Central Directory. See the section on the
Strong Encryption Specification for information. Refer to the section
in this document entitled "Incorporating PKWARE Proprietary Technology
into Your Product" for more information.

7.0 Strong Encryption Specification

7.0.1 Portions of the Strong Encryption technology defined in this
specification are covered under patents and pending patent applications.
Refer to the section in this document entitled "Incorporating
PKWARE Proprietary Technology into Your Product" for more information.

10.1 The Use or Implementation in a product of APPNOTE technological
components pertaining to either strong encryption or patching requires
a separate, executed license agreement from PKWARE. Please contact
PKWARE at zipformat@pkware.com or +1-414-289-9788 with regard to
acquiring such a license.

10.2 Additional information regarding PKWARE proprietray technology is
available at http://www.pkware.com/appnote.