Blowfish Cipher Tutorials - Herong's Tutorial Examples - v2.03, by Herong Yang
Installing Crypt::ECB 1.45 with ActivePerl
A tutorial is provided to show how to install Crypt-ECB 1.45 module, that can be used together with Crypt::Blowfish (installed previously) to encrypt plaintext of any size.
Once we know what is Crypt::ECB, we may want to get it installed and try it. Here what I did to install it with ActivePerl 5.18 on my Windows system:
1. Run "ppm", the Perl Package Manager.
2. Click menu View > All Packages, to see all packages.
3. Find "Crypt-ECB - 1.45", right-mouse click on it and select "Install..." command to mark it for installation.
4. Press "Ctrl-Enter" to run installation. Crypt-ECB - 1.45 will be downloaded and installed automatically.
5. Exit "ppm".
6. Enter a simple test script, Crypt-ECB-Blowfish-Hello.pl, with a text editor:
#- Crypt-ECB-Blowfish-Hello.pl use Crypt::ECB; $cipher = Crypt::ECB->new('my secret key', 'Blowfish'); $ciphertext = $cipher->encrypt("The data is hush"); print unpack("H*", $ciphertext), "\n";
7. Run the test script in a command window:
C:\Herong>perl Crypt-ECB-Blowfish-Hello.pl 8b14104c181950f2dedf554f9709eda3
Cool! I have correctly installed "Crypt-ECB 1.45", which is a Perl implementation of the ECB (Electronic CodeBook) block cipher operation mode. It can be used together with Crypt::Blowfish (installed previously) to encrypt plaintext of any size. I can write more Perl scripts to play with Blowfish cipher in ECB mode now. See next tutorials.
Table of Contents
►Installing Crypt::ECB 1.45 with ActivePerl
Crypt::ECB Encryption with No Padding
Crypt::ECB Encryption Test Cases
OpenSSL "enc -bf-ecb" for Blowfish/ECB Encryption
OpenSSL "enc -bf-cbc" for Blowfish/CBC Encryption
OpenSSL "enc -bf-cfb" for Blowfish/CFB Encryption
OpenSSL "enc -bf-ofb" for Blowfish/OFB Encryption