Pelican Mac

screenshot of Pelican Mac

An implementation of the Pelican MAC function using AESNI.

Overview

The Pelican 2.0 MAC function is a cryptographic tool that employs the Advanced Encryption Standard (AES) for message authentication. Designed for use on modern Intel and AMD CPUs with AES-NI support, this implementation promises to deliver efficient and secure message integrity checks. Ideal for developers looking for a straightforward way to secure their data, Pelican is notable for its simplicity and performance.

For those who came across the Pelican function while exploring the "Serious Cryptography" book, it represents an exciting addition to your cryptographic toolkit. The implementation is designed to handle multiple message authentication codes (MACs) efficiently without requiring constant reinitialization, making it both practical and versatile.

Features

  • Easy Initialization: Simply call pelican_init() with your key to prepare for MAC generation.
  • Multiple MAC Support: The pelican() function allows for generating multiple MACs from the same key without needing to reset the state, enhancing efficiency in cryptographic operations.
  • AES-NI Requirement: This implementation requires a modern Intel or AMD CPU with AES-NI support, ensuring optimal performance during execution.
  • Compiler Support: Use the -maes compiler flag to enable AES opcodes, ensuring your build is optimized for performance.
  • AES-128 & AES-256 Options: The default is AES-128, but you can easily switch to AES-256 by defining pelican_KEYBYTES=32, allowing for enhanced security if needed.
  • Performance Focus: Recommended compilation flags (-Ofast -maes -march=native) promote the best speed and efficiency for applications using this MAC function.