International Association for Cryptologic Research

International Association
for Cryptologic Research

Transactions on Symmetric Cryptology, Volume 2024

Fast AES-Based Universal Hash Functions and MACs :

Featuring LeMac and PetitMac


Augustin Bariant
Inria, Paris, France; ANSSI, Paris, France

Jules Baudrin
Inria, Paris, France

Gaëtan Leurent
Inria, Paris, France

Clara Pernot
Inria, Paris, France

Léo Perrin
Inria, Paris, France

Thomas Peyrin
Nanyang Technological University, Singapore, Singapore


Keywords: Universal hash function, MAC, AES, authentication


Abstract

Ultra-fast AES round-based software cryptographic authentication/encryption primitives have recently seen important developments, fuelled by the authenticated encryption competition CAESAR and the prospect of future high-profile applications such as post-5G telecommunication technology security standards. In particular, Universal Hash Functions (UHF) are crucial primitives used as core components in many popular modes of operation for various use-cases, such as Message Authentication Codes (MACs), authenticated encryption, wide block ciphers, etc. In this paper, we extend and improve upon existing design approaches and present a general framework for the construction of UHFs, relying only on the AES round function and 128-bit word-wide XORs. This framework, drawing inspiration from tweakable block ciphers design, allows both strong security arguments and extremely high throughput. The security with regards to differential cryptanalysis is guaranteed thanks to an optimized MILP modelling strategy, while performances are pushed to their limits with a deep study of the details of AES-NI software implementations. In particular, our framework not only takes into account the number of AES-round calls per message block, but also the very important role of XOR operations and the overall scheduling of the computations. We instantiate our findings with two concrete UHF candidates, both requiring only 2 AES rounds per 128-bit message block, and each used to construct two MACs. First, LeMac, a large-state primitive that is the fastest MAC as of today on modern Intel processors, reaching performances of 0.068 c/B on Intel Ice Lake (an improvement of 60% in throughput compared to the state-of-the-art). The second MAC construction, PetitMac, provides an interesting memory/throughput tradeoff, allowing good performances on many platforms.

Publication

Transactions on Symmetric Cryptology, Volume 2024, Issue 2

Paper

Artifact

Artifact number
tosc/2024/a1

Artifact published
September 5, 2025

Badge
IACR FSE Artifacts Functional

README

XZ (60588 Bytes)  

View on Github

License
This work is licensed under the MIT License.

Some files in this archive are licensed under a different license. See the contents of this archive for more information.

Note that license information is supplied by the authors and has not been confirmed by the IACR.


BibTeX How to cite

Bariant, A., Baudrin, J., Leurent, G., Pernot, C., Perrin, L., & Peyrin, T. (2024). Fast AES-Based Universal Hash Functions and MACs: Featuring LeMac and PetitMac. IACR Transactions on Symmetric Cryptology, 2024(2), 35-67. https://doi.org/10.46586/tosc.v2024.i2.35-67. Artifact available at https://artifacts.iacr.org/tosc/2025/a1