Search code examples
cencryptioncryptographycbc-modecbc-mac

CBC-MAC implementation in C


I'm hoping to do some benchmarking of CBC-MAC in C. Does anyone know of a robust C implementation? I've looked around but CBC-MAC implementations (in almost any language) seem to be quite rare. Does anyone know why beside its rather restrictive (desired) use cases, e.g., fixed-length input.

Thanks


Solution

  • If you encrypt a message with a block cipher in CBC mode with a zero Initialization Vector, then the last encrypted block, is the CBC-MAC.

    So if you have a block cipher implementation that supports CBC mode, you basically have support for CBC-MAC.