=encoding euc-jp =head1 名前 Crypt::DES - PerlのDES暗号モジュール =head1 概要 use Crypt::DES; =head1 説明 このモジュールはCrypt::CBCインターフェースを実装し、以下の メソッドを持っています。 =over 4 =item blocksize =item keysize =item encrypt =item decrypt =back =head1 関数 =over 4 =item blocksize 暗号ブロックの大きさ(バイト数)を返します。 =item keysize キーサイズ(バイト数)を返します。最適な大きさは8バイトです。 =item new my $cipher = new Crypt::DES $key; $keyを使って、新しいCrypt::DES BlockCipherオブジェクトを作成します。 $keyのところにはCバイトのキーになります。 =item encrypt my $cipher = new Crypt::DES $key; my $ciphertext = $cipher->encrypt($plaintext); この関数は$plaintextを暗号化し、$ciphertextを返します。 $plaintextと$ciphertextはCバイトになるはずです。 =item decrypt my $cipher = new Crypt::DES $key; my $plaintext = $cipher->decrypt($ciphertext); この関数は$ciphertextを復号化し、$plaintextを返します。 $plaintextと$ciphertextはCバイトになるはずです。 =back =head1 使用例 my $key = pack("H16", "0123456789ABCDEF"); my $cipher = new Crypt::DES $key; my $ciphertext = $cipher->encrypt("plaintex"); # NB - 8 バイト print unpack("H16", $ciphertext), "\n"; =head1 注意 DESは8バイトのキーだけを使い、8バイトのデータブロックに対してのみ 機能することにどうか注意してください。より大きなブロックやファイル全体を 暗号化するつもりならば、このモジュールと一緒にCrypt::CBCを使うように してください。適切な文法や使い方についてはCrypt::CBCのドキュメントを ご覧ください。 DESアルゴリズムが現在の水準では弱い暗号方法であることにも注意してください。 強い暗号化と速いアルゴリズムを使うことに興味があるのならば、Crypt::Blowfishを 強くお勧めします。 =head1 参考資料 Crypt::Blowfish Crypt::IDEA Bruce Schneier, I, 1995, Second Edition, published by John Wiley & Sons, Inc. =head1 著作権(COPYRIGHT) The implementation of the DES algorithm was developed by, and is copyright of, Eric Young (eay@mincom.oz.au). Other parts of the perl extension and module are copyright of Systemics Ltd ( http://www.systemics.com/ ). Cross-platform work and packaging for single algorithm distribution is copyright of W3Works, LLC. =head1 メンテナ この単一のアルゴリズムパッケージとクロスプラットホームなコードは Dave Paris によって維持されています。 =head1 翻訳者 川合孝典 (GCD00051@nifty.ne.jp)