Digest-CMAC
view release on metacpan or search on metacpan
--- #YAML:1.0
name: Digest-CMAC
version: 0.04
abstract: The One-key CBC MAC message authentication code.
license: ~
author:
- Hiroyuki OYAMA <oyama@module.jp>
generated_by: ExtUtils::MakeMaker version 6.44
distribution_type: module
requires:
Crypt::Rijndael: 0
MIME::Base64: 0
Test::More: 0
meta-spec:
lib/Digest/CMAC.pm view on Meta::CPAN
sub _lu2 {
my ( $self, $blocksize, $L, $Lu ) = @_;
$self->_lu( $blocksize, $Lu );
}
1;
__END__
=head1 NAME
Digest::CMAC - The One-key CBC MAC message authentication code.
=head1 SYNOPSIS
use Digest::CMAC;
my $omac1 = Digest::CMAC->new($key);
$omac1->add($data);
my $binary_tag = $omac1->digest;
my $hex_tag = $omac1->hexdigest;
my $base64_tag = $omac1->b64digest;
=head1 DESCRIPTION
This module implements OMAC1 blockcipher-based message authentication code for perl. For OMAC1/OMAC. Check http://www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html. Here is an excerpt of that page
=over 4
OMAC is a blockcipher-based message authentication code designed and analyzed by me and Kaoru Kurosawa.
OMAC is a simple variant of the CBC MAC (Cipher Block Chaining Message Authentication Code). OMAC stands for One-Key CBC MAC.
OMAC allows and is secure for messages of any bit length (while the CBC MAC is only secure on messages of one fixed length, and the length must be a multiple of the block length). Also, the efficiency of OMAC is highly optimized. It is almost as effi...
"NIST Special Publication 800-38B Recommendation for Block Cipher Modes of Operation: the CMAC Mode for Authentication" has been finalized on May 18, 2005. This Recommendation specifies CMAC, which is equivalent to OMAC (OMAC1).
=back 4
Like many block-cipher's Crypt:: modules like L<Crypt::Rijndael>, and L<MIME::Base64>.
=head1 METHODS
=over 4
lib/Digest/OMAC/Base.pm view on Meta::CPAN
croak 'Number of bits must be multiple of 8 for this algorithm';
}
return $self->add(substr $bits, 0, $nbits/8);
}
1;
__END__
=head1 NAME
Digest::OMAC::Base - The One-key CBC MAC message authentication code (base
class for OMAC hashes)
=head1 SYNOPSIS
use base qw(Digest::OMAC::Base);
=head1 DESCRIPTION
This module is used internally by L<Digest::CMAC>/L<Digest::OMAC1> and
L<Digest::OMAC2> (which does different shifting than OMAC1 but is otherwise the
( run in 0.647 second using v1.01-cache-2.11-cpan-e1769b4cff6 )