NAME
Crypt::DES_PP - Perl extension for DES encryption
SYNOPSIS
use Crypt::DES_PP;
$des = Crypt::DES_PP->new ($key);
$cipher = $des->encrypt ($plain);
$plain = $des->decrypt ($cipher);
$blocksize = $des->blocksize;
$keysize = $des->keysize;
DESCRIPTION
The Data Encryption Standard (DES), also known as Data Encryption Algorithm (DEA) is a semi-strong encryption and decryption algorithm.
The module is 100 % compatible to Crypt::DES but is implemented entirely in Perl. That means that you do not need a C compiler to build and install this extension. However, you will need a C preprocessor, notably cpp(1), to hack on the module sources because for performance reasons the module is run through the preprocessor to inline some function calls. There is no effort made to find out how the preprocessor is run on your system. If you want to hack on the module, make sure that a cpp that writes to stdout is the first cpp that is found in your PATH. is not really Perl, you need to run it through the preprocessor. is of no concern if you just want to use the extension because the preprocessor output is included in the distribution.
The module implements the Crypt::CBC interface. You are encouraged to read the documentation for Crypt::CBC if you intend to use this module for Cipher Block Chaining.
The minimum (and maximum) key size is 8 bytes. Shorter keys will cause an exception, longer keys will get silently truncated. Data is encrypted and decrypted in blocks of 8 bytes.
The module implements the Ultra-Fast-Crypt (UFC) algorithm as found for example in the GNU libc.
BUGS
Nothing known. The module has not been tested on 64 bit or big-endian architectures.
CAVEATS
The XS version of DES Crypt::DES(3) outperforms this pure Perl version by approximately factor 35 (with cached keys) resp. factor 13 (with non-cached keys). In Cipher Block Chaining mode, while encrypting a large plaintext, the XS version outperforms Crypt::DES_PP by approxymately factor 20 here, but only by factor 9 when encrypting 128 byte blocks with varying keys. Judge yourself.
AUTHOR
is not really Perl, you need to run it through the preprocessor. implementation was written by Guido Flohr (guido@imperia.net). It is available under the terms of the Lesser GNU General Public License (LGPL) version 2 or - at your choice - any later version, see the file ``COPYING.LIB''.
The original C implementation of the Ultra-Fast-Crypt algorithm was written by Michael Glad (glad@daimi.aau.dk) and has been donated to the Free Software Foundation, Inc. It is covered by the GNU library license version 2, see the file ``COPYING.LIB''.
SEE ALSO
Crypt::CBC(3), Crypt::DES(3), perl(1).