Crypt::TC18 - Crypt::CBC compliant block cipher


Crypt-TC18 documentation  | view source Contained in the Crypt-TC18 distribution.

Index


NAME

Top

Crypt::TC18 - Crypt::CBC compliant block cipher

ABSTRACT

Top

TC18 is 128-bit block cipher that accepts a 64-bit key. TC18 is also known as XSM.

SYNOPSIS

Top

    use Crypt::TC18;

    $cipher = new Crypt::TC18 $key;

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

    $bs = $cipher->blocksize;
    $ks = $cipher->keysize;
    $r = $cipher->rounds;

DESCRIPTION

Top

TC18 is 128-bit block cipher that accepts a 64-bit key. It was designed by Tom St. Denis.

This module supports the Crypt::CBC interface, with the following functions.

Functions

blocksize

Returns the size (in bytes) of the block (16, in this case)

keysize

Returns the size (in bytes) of the key (8, in this case)

rounds

Returns the number of rounds used by TC18 (16, in this case)

encrypt($data)

Encrypts 16 bytes of $data and returns the corresponding ciphertext

decrypt($data)

Decrypts 16 bytes of $data and returns the corresponding plaintext

EXAMPLES

Top

See the "examples" directory for some examples

SEE ALSO

Top

Crypt::Anubis, Crypt::Camellia, Crypt::Khazad, Crypt::Loki97, Crypt::Misty1, Crypt::Noekeon, Crypt::Rainbow, Crypt::Shark, Crypt::Skipjack, and Crypt::Square

COPYRIGHT AND LICENSE

Top


Crypt-TC18 documentation  | view source Contained in the Crypt-TC18 distribution.