Crypt-Present
view release on metacpan or search on metacpan
lib/Crypt/Present.pm view on Meta::CPAN
Crypt::Present - Perl extension for Ultra-Lightweight PRESENT 64 bit block encryption module
=head1 SYNOPSIS
use Crypt::Present;
my $cipher = new Crypt::Present $key;
my $ciphertext = $cipher->encrypt($plaintext);
my $plaintext = $cipher->decrypt($ciphertext);
You probably want to use this in conjunction with
a block chaining module like Crypt::CBC.
=head1 DESCRIPTION
Present is a ultra lightweight block encryption and can use key sizes of
80 or 128 bit (10 or 16 byte key). It is developed for use in RFID hardware
with minimum numer of cricuits.
Crypt::Present has the following methods:
=over 4
lib/Crypt/Present.pm view on Meta::CPAN
my $cipher = new Crypt::Present $key;
my $ciphertext = $cipher->encrypt("plaintex"); # SEE NOTES
print unpack("H16", $ciphertext), "\n";
=head1 PLATFORMS
Since this is non endianess pure perl code, it will run under all plattforms.
=head1 NOTES
The module is capable of being used with Crypt::CBC. You're
encouraged to read the perldoc for Crypt::CBC if you intend to
use this module for Cipher Block Chaining modes. In fact, if
you have any intentions of encrypting more than eight bytes of
data with this, or any other block cipher, you're going to need
B<some> type of block chaining help. Crypt::CBC tends to be
very good at this. If you're not going to encrypt more than
eight bytes, your data B<must> be B<exactly> eight bytes long.
If need be, do your own padding. "\0" as a null byte is perfectly
valid to use for this.
=head1 SEE ALSO
PRESENT: An Ultra-Lightweight Block Cipher
A. Bogdanov1, L.R. Knudsen2 , G. Leander1 , C. Paar1, A. Poschmann1,
M.J.B. Robshaw3 , Y. Seurin3 , and C. Vikkelsoe2
1 Horst-Görtz-Institute for IT-Security, Ruhr-University Bochum, Germany
2 Technical University Denmark, DK-2800 Kgs. Lyngby, Denmark
3 France Telecom R&D, Issy les Moulineaux, France
leander@rub.de, {abogdanov,cpaar,poschmann}@crypto.rub.de
lars@ramkilde.com, chv@mat.dtu.dk
{matt.robshaw,yannick.seurin}@orange-ftgroup.com
http://www.emsec.rub.de/media/crypto/attachments/files/2010/04/present_ches2007.pdf
Crypt::CBC
=head1 COPYRIGHT
The implementation of the Present algorithm was developed by,
and is copyright of, Eduard Gode.
=head1 AUTHOR
Original algorithm, A. Bogdanov1, L.R. Knudsen2 , G. Leander1 , C. Paar1, A. Poschmann1,
M.J.B. Robshaw3 , Y. Seurin3 , and C. Vikkelsoe2.
( run in 1.144 second using v1.01-cache-2.11-cpan-df04353d9ac )