use Crypt::Rijndael; # keysize() is 32, but 24 and 16 are also possible # blocksize() is 16 $cipher = Crypt::Rijndael->new( "a" x 32, Crypt::Rijndael::MODE_CBC() ); # <-- key and CBC-MODE $cipher->set_iv($iv); # <-- here's your I-Vector $crypted = $cipher->encrypt($plaintext); # - OR - $plaintext = $cipher->decrypt($crypted);