NAME Crypt::Twofish - The Twofish Encryption Algorithm SYNOPSIS use Crypt::Twofish; $two = Crypt::Twofish->new($key); $ciphertext = $two->encrypt($plaintext); $plaintext = $two->decrypt($ciphertext); DESCRIPTION Twofish is a 128-bit symmetric block cipher with a variable length (128, 192, or 256-bit) key, developed by Counterpane Labs. It is unpatented and free for all uses, as described at . This module implements Twofish encryption. It supports the Crypt::CBC interface, with the functions described below. It also provides an interface that is call- compatible with Crypt::Twofish 1.0, but its use is strongly discouraged. Functions blocksize Returns the size (in bytes) of the block (16, in this case). keysize Returns the size (in bytes) of the key. Although the module understands 128, 192, and 256-bit keys, it returns 16 for compatibility with Crypt::CBC. new($key, $rounds) This creates a new Crypt::Twofish object with the specified key (which should be 16, 24, or 32 bytes long). encrypt($data) Encrypts blocksize() bytes of $data and returns the corresponding ciphertext. decrypt($data) Decrypts blocksize() bytes of $data and returns the corresponding plaintext. SEE ALSO Crypt::CBC, Crypt::Blowfish, Crypt::TEA ACKNOWLEDGEMENTS Nishant Kakani wrote the first version of Crypt::Twofish (this version is a complete reimplementation). AUTHOR Abhijit Menon-Sen Copyright 2001 Abhijit Menon-Sen. All rights reserved. This software is distributed under the terms of the Artistic License .