cryptonite-0.23: Cryptography Primitives sink

LicenseBSD-style
MaintainerKei Hibino <ex8k.hibino@gmail.com>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.MAC.CMAC

Description

provide the CMAC (Cipher based Message Authentification Code) base algorithm. http://en.wikipedia.org/wiki/CMAC http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf

Synopsis

Documentation

cmac Source #

Arguments

:: (ByteArrayAccess bin, BlockCipher cipher) 
=> cipher

key to compute CMAC with

-> bin

input message

-> CMAC cipher

output tag

compute a MAC using the supplied cipher

data CMAC a Source #

Authentication code

Instances

Eq (CMAC a) Source # 

Methods

(==) :: CMAC a -> CMAC a -> Bool #

(/=) :: CMAC a -> CMAC a -> Bool #

ByteArrayAccess (CMAC a) Source # 

Methods

length :: CMAC a -> Int #

withByteArray :: CMAC a -> (Ptr p -> IO a) -> IO a #

subKeys Source #

Arguments

:: (BlockCipher k, ByteArray ba) 
=> k

key to compute CMAC with

-> (ba, ba)

sub-keys to compute CMAC

make sub-keys used in CMAC