NAME
Crypt::Cipher::Khazad - Symmetric cipher Khazad, key size: 128 bits
SYNOPSIS
my $key = '...' ;
my $iv = '...' ;
my $cbc = Crypt::Mode::CBC->new( 'Khazad' );
my $ciphertext = $cbc ->encrypt( "secret data" , $key , $iv );
my $key = '...' ;
my $iv = '...' ;
my $cbc = Crypt::CBC->new( -cipher => 'Cipher::Khazad' , -key => $key , -iv => $iv );
my $ciphertext = $cbc ->encrypt( "secret data" );
|
DESCRIPTION
This module implements the Khazad cipher. Provided interface is compliant with Crypt::CBC module.
BEWARE: This module implements just elementary "one-block-(en|de)cryption" operation - if you want to encrypt/decrypt generic data you have to use some of the cipher block modes - check for example Crypt::Mode::CBC, Crypt::Mode::CTR or Crypt::CBC (which will be slower).
METHODS
new
$c = Crypt::Cipher::Khazad->new( $key );
$c = Crypt::Cipher::Khazad->new( $key , $rounds );
|
encrypt
$ciphertext = $c ->encrypt( $plaintext );
|
decrypt
$plaintext = $c ->decrypt( $ciphertext );
|
keysize
$c ->keysize;
Crypt::Cipher::Khazad->keysize;
Crypt::Cipher::Khazad::keysize;
|
blocksize
$c ->blocksize;
Crypt::Cipher::Khazad->blocksize;
Crypt::Cipher::Khazad::blocksize;
|
max_keysize
$c ->max_keysize;
Crypt::Cipher::Khazad->max_keysize;
Crypt::Cipher::Khazad::max_keysize;
|
min_keysize
$c ->min_keysize;
Crypt::Cipher::Khazad->min_keysize;
Crypt::Cipher::Khazad::min_keysize;
|
default_rounds
$c ->default_rounds;
Crypt::Cipher::Khazad->default_rounds;
Crypt::Cipher::Khazad::default_rounds;
|
SEE ALSO