Blowfish Cipher Tutorials - Herong's Tutorial Examples - v2.04, by Herong Yang
Installing Crypt::Blowfish 2.14 with ActivePerl
A tutorial is provided to show how to install Crypt-Blowfish 2.14 module originally developed by A.M. Kuchling with ActivePerl 5.18 on Windows.
Once we know what is Crypt::Blowfish, 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-Blowfish - 2.14", right-mouse click on it and select "Install..." command to mark it for installation.
4. Press "Ctrl-Enter" to run installation. Crypt-Blowfish - 2.14 will be downloaded and installed automatically.
5. Exit "ppm".
6. Enter a simple test script, Blowfish-Perl-Hello.pl, with a text editor:
#- Blowfish-Perl-Hello.pl use Crypt::Blowfish; my $key = pack("H16", "0123456789ABCDEF"); my $cipher = new Crypt::Blowfish $key; my $ciphertext = $cipher->encrypt("plaintex"); print unpack("H16", $ciphertext), "\n";
7. Run the test script in a command window:
C:\herong>perl Blowfish-Perl-Hello.pl ea03e67434315a63
Cool! I have correctly installed "Crypt-Blowfish 2.14", which is a Perl implementation of Blowfish originally done by A.M. Kuchling. I can write more Perl scripts to play with Blowfish now. See next tutorials.
Table of Contents
►Installing Crypt::Blowfish 2.14 with ActivePerl
Crypt::Blowfish Behavior Tests
Secret Keys with Repeating Pattern
Crypt::Blowfish Verification with Test Vectors
Blowfish Test Vectors with 16-Byte Keys
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