Crypt::TEA - Tiny Encryption Algorithm
$cipher = Crypt::TEA->new($key);
$ciphertext = $cipher->encrypt($plaintext);
$plaintext = $cipher->decrypt($ciphertext);
TEA is a 64-bit symmetric block cipher with a 128-bit key and a variable number of rounds (32 is recommended). It has a low setup time, and depends on a large number of rounds for security, rather than a complex algorithm. It was developed by David J. Wheeler and Roger M. Needham, and is described at https://web-beta.archive.org/web/20131226114205/http://www.ftp.cl.cam.ac.uk:80/ftp/papers/djw-rmn/djw-rmn-tea.html
This module implements TEA encryption. It supports the Crypt::CBC interface, with the following functions.
Returns the size (in bytes) of the block (8, in this case).
Returns the size (in bytes) of the key (16, in this case).
This creates a new Crypt::TEA object with the specified key. The optional rounds parameter specifies the number of rounds of encryption to perform, and defaults to 32.
Encrypts blocksize() bytes of $data and returns the corresponding ciphertext.
Decrypts blocksize() bytes of $data and returns the corresponding plaintext.
For taking the time to discuss and review the initial version of this module, making several useful suggestions, and contributing tests.
For testing under Windows.
For making the module work under Activeperl, testing on several platforms, and suggesting that I probe for features via %Config.
Abhijit Menon-Sen <email@example.com>
Copyright 2001 Abhijit Menon-Sen. All rights reserved.
This software is distributed under the terms of the Artistic License https://dev.perl.org/licenses/artistic.html