Encryption Using Crypt::CBC
Lincoln Stein's Crypt::CBC module is a pure Perl implementation of Cipher Block Chaining. I'll illustrate how Crypt::CBC works in two Perl scripts. The first, khazad, shows how to encrypt simple messages. The second illustrates the use of Serpent, a 128-bit block cipher that uses a 128-bit key.
February, 2004: Encryption Using Crypt::CBC
Figure 3: Padding of partial block using PKCS #5.