One-key MAC (OMAC) is a family of message authentication codes constructed from a block cipher much like the CBC-MAC algorithm. It may be used to provide assurance of the authenticity and, hence, the integrity of data. Two versions are defined:
OMAC is free for all uses: it is not covered by any patents.
The core of the CMAC algorithm is a variation of CBC-MAC that Black and Rogaway proposed and analyzed under the name "XCBC" and submitted to NIST. The XCBC algorithm efficiently addresses the security deficiencies of CBC-MAC, but requires three keys.
Iwata and Kurosawa proposed an improvement of XCBC that requires less key material (just one key) and named the resulting algorithm One-Key CBC-MAC (OMAC) in their papers. They later submitted the OMAC1 (= CMAC), a refinement of OMAC, and additional security analysis.
To generate an -bit CMAC tag (t) of a message (m) using a b-bit block cipher (E) and a secret key (k), one first generates two b-bit sub-keys (k<sub>1</sub> and k<sub>2</sub>) using the following algorithm (this is equivalent to multiplication by x and x<sup>2</sup> in a finite field GF(2<sup>b</sup>)). Let ⪠denote the standard left-shift operator and â denote bit-wise exclusive or:
As a small example, suppose , , and . Then and .
The CMAC tag generation process is as follows:
The verification process is as follows:
CMAC-C1 is a variant of CMAC that provides additional commitment and context-discovery security guarantees.