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



Universal hash function, MAC, AES, authentication


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.







How to Cite

Fast AES-Based Universal Hash Functions and MACs: Featuring LeMac and PetitMac. (2024). IACR Transactions on Symmetric Cryptology, 2024(2), 35-67.