sundeep has asked for the wisdom of the Perl Monks concerning the following question:

Hi,i wanted to use the modules under Crypt:: , like the AES, RC5, RC6 etc.. but the key size used is not greater than 32 bits. Where as the original algorithm works with 128 bit key size or higher. So, what should i do, if i wanted to go for higher key sizes..??

Replies are listed 'Best First'.
Re: Crypto Module
by moritz (Cardinal) on Oct 15, 2010 at 06:16 UTC
    Crypt::CBC is a convenience wrapper that takes care of the key setup and padding for you. It should be much easier to use than for example the AES module directly.
    Perl 6 - links to (nearly) everything that is Perl 6.

      I agree fully. It handles at least three important jobs:

      • Padding: Adjusting the length of the message so it can be encrypted, and removing the adjustments when decrypting.
      • Salting: Using a different key for each message.
      • Chaining: Using a different key for each block of the message.
Re: Crypto Module
by ikegami (Patriarch) on Oct 15, 2010 at 04:11 UTC
    Crypt::Rijndael (AES) takes a 32 byte (256 bit) key. (Sounds like it will also take 16 byte and 24 byte keys.)