Documentation ¶
Overview ¶
Package cmac implements the fast CMAC MAC based on a block cipher. This mode of operation fixes security deficiencies of CBC-MAC (CBC-MAC is secure only for fixed-length messages). CMAC is equal to OMAC1. This implementations supports block ciphers with a block size of:
- 64 bit
- 128 bit
- 256 bit
- 512 bit
- 1024 bit
Common ciphers like AES, Serpent etc. operate on 128 bit blocks. 256, 512 and 1024 are supported for the Threefish tweakable block cipher. Ciphers with 64 bit blocks are supported, but not recommened. CMAC (with AES) is specified in RFC 4493 and RFC 4494.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithTagSize ¶
NewWithTagSize returns a hash.Hash computing the CMAC checksum with the given tag size. The tag size must between the 1 and the cipher's block size.
Types ¶
This section is empty.