Crypt::Vernam - Perl implementation of the Vernam cipher
use Crypt::Vernam; # mod26 mode my ($ciphertext, $key) = vernam_encrypt('mod26', 'Vernam'); my $plaintext = vernam_decrypt('mod26', $ciphertext, $key); # xor mode ($ciphertext, $key) = vernam_encrypt('xor', 'Vernam'); $plaintext = vernam_decrypt('xor', $ciphertext, $key);
The Crypt::Vernam module allows you to do a simple but robust encryption/decryption, with the algorithm of Gilbert Sandford, Vernam. This kind of encryption is truly unbreakable as long the key is maintained a secret.
See the README file that came with the Crypt::Vigenere package for more information.
The vernam_encrypt method is called to encrypt the $plaintext string, using $mode (mod26 or xor).
vernam_encrypt
The vernam_decrypt method is called to decrypt the $ciphertext string, using $mode (mod26 or xor) and decryption key $key.
vernam_decrypt
vernam_encrypt vernam_decrypt
Manuel Gebele, <forensixs[at]gmx.de>
Copyright (C) 2008 by Manuel Gebele.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Crypt::Vernam, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Vernam
CPAN shell
perl -MCPAN -e shell install Crypt::Vernam
For more information on module installation, please visit the detailed CPAN module installation guide.