I don't know enough about Twofish_PP (or other modules or conventions associated with this algorithm) to say what sort of formatting issues are assumed. Does the fact that it only deals with 16 bytes at a time mean that the output should be structured as lines of 16 characters terminated by newlines? Does this matter?
There are a number of ciphers that fall into the category of block ciphers. They encrypt a chunk (block) of plain text at a time. To encrypt a plaintext string that is longer than this block size you chunkify the plain text into chunks of the correct length, encrypt each chunk and join the resultant ciphertext blocks together. This is called cipher block chaining and is implemented in Crypt::CBC. You do need to pad a plaintext string less than block size to encrypt it. There are a number of different ways to pad. Read the Crypt::CBC docs for a nice discussion.
Crypt::DES, Crypt::DES_EDE3, Crypt::IDEA, Crypt::Blowfish, Crypt::Twofish and Crypt::Rijndael are all modules that implement block ciphers and need Crypt::CBC or the equivalent to encode arbitratily long plaintexts.
cheers
tachyon
In reply to Re: Re: Twofish_PP.pm
by tachyon
in thread Twofish_PP.pm
by Baratski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |