The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Crypt::Ctr::FullWidth - Like Crypt::Ctr but works at the blocksize, not word size.

SYNOPSIS

        use Crypt::Ctr::FullWidth;

        my $cipher = new Crypt::Ctr::FullWidth $key, 'Crypt::Rijndael';

        my $ciphertext = $cipher->encrypt($plaintext);
        my $plaintext = $cipher->decrypt($ciphertext);

        my $cipher2 = new Crypt::Ctr::FullWidth $key, 'Digest::MD5';

        $ciphertext = $cipher->encrypt($plaintext);
        $plaintext = $cipher->decrypt($ciphertext);

DESCRIPTION

See Crypt::Ctr for the API. It is unchanged.

The difference is in the block processing. Instead of incrementing the counter and xoring per each byte of input, this mode works with the native size of the underlying block cipher.

This module was written to support Crypt::EAX, whose specification mandates a different implementation of the counter mode.