Crypto.MAC.CMAC

crypton-1.0.1: Cryptography Primitives sink

License | BSD-style
Maintainer | Kei Hibino <ex8k.hibino@gmail.com>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

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

- cmac :: (ByteArrayAccess bin, BlockCipher cipher) => cipher -> bin -> CMAC cipher
- data CMAC a
- subKeys :: (BlockCipher k, ByteArray ba) => k -> (ba, ba)

# Documentation

cmac #

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 #

Authentication code

#### Instances

Instances details

Eq (CMAC a) # |
Instance details Defined in Crypto.MAC.CMAC Methods (==) :: CMAC a -> CMAC a -> Bool # (/=) :: CMAC a -> CMAC a -> Bool #
ByteArrayAccess (CMAC a) # |
Instance details Defined in Crypto.MAC.CMAC Methods length :: CMAC a -> Int # withByteArray :: CMAC a -> (Ptr p -> IO a0) -> IO a0 # copyByteArrayToPtr :: CMAC a -> Ptr p -> IO () #

subKeys #

Arguments

:: (BlockCipher k, ByteArray ba) |
=> k | key to compute CMAC with
-> (ba, ba) | sub-keys to compute CMAC

make sub-keys used in CMAC