Skip to content

Ruby C extension for the AES-CMAC keyed hash function (RFC 4493)

License

Notifications You must be signed in to change notification settings

louismullie/cmac-rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##cmac-rb

This gem implements the CMAC keyed hash function as described in RFC 4493. The CMAC function is written as a low-level C extension on top of OpenSSL, for speed and compatibility.

AES-CMAC provides stronger assurance of data integrity than a checksum or an error-detecting code. The verification of a checksum or an error-detecting code detects only accidental modifications of the data, while CMAC is designed to detect intentional, unauthorized modifications of the data, as well as accidental modifications.

AES-CMAC achieves a security goal similar to that of HMAC. Since AES-CMAC is based on a symmetric key block cipher, AES, and HMAC is based on a hash function, such as SHA-1, AES-CMAC is appropriate for information systems in which AES is more readily available than a hash function.

###Install

gem install cmac-rb

###Usage

require 'cmac-rb'

digest = CMAC::Digest.new(key)
tag = digest.update(plaintext)

###Reference

###License

This program is released under the GNU Affero General Public License.

About

Ruby C extension for the AES-CMAC keyed hash function (RFC 4493)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published