{
  "id": "2025/2260",
  "url": "https://opencryptology.org/2025/2260",
  "original_url": "https://eprint.iacr.org/2025/2260",
  "title": "Tight Generic PRF Security of HMAC and NMAC",
  "authors": [
    "Yaobin Shen",
    "Xiangyang Zhang",
    "Lei Wang",
    "Dawu Gu"
  ],
  "affiliations": null,
  "abstract": "HMAC and its variant NMAC are among the most widely used methods for keying a cryptographic hash function to obtain a PRF or a MAC. Yet, even after nearly three decades of research, their generic PRF security still remains poorly understood, where the compression function of the underlying hash function is treated as a black box and accessible to the adversary. Although a series of works have exploited  compression function queries to mount generic attacks, proving tight bounds on the generic PRF security of HMAC and NMAC remains a challenging open question until now. \n\nIn this paper, we establish tight bounds on the generic PRF security of HMAC and NMAC. Our bounds capture the influence of the number of construction queries, the number of compression function queries, and the maximal block length of a message on their security. The proofs are carried out in the multi-user setting and the bounds hold regardless of the number of users. In addition, we present matching attacks to demonstrate that our bounds are essentially tight. Taken together, our results close a longstanding gap in the generic PRF security analysis of HMAC and NMAC.",
  "category": "Secret-key cryptography",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Tight Generic PRF Security of HMAC and NMAC” by Yaobin Shen, Xiangyang Zhang, Lei Wang, Dawu Gu, Cryptology ePrint Archive, Paper 2025/2260, https://eprint.iacr.org/2025/2260. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2025-12-16T14:29:00Z",
    "updated": "2025-12-16T14:29:00Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/2260.pdf",
    "sha256": "7b7f49da8e627688bc9b4bd69a8a006e39d9b1a3ac2ffe8e986db80f531d2159",
    "size": 351597,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/2260/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/2260.pdf",
      "size": 351597,
      "sha256": "7b7f49da8e627688bc9b4bd69a8a006e39d9b1a3ac2ffe8e986db80f531d2159",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260527052620id_/https://eprint.iacr.org/2025/2260.pdf",
      "captured_at": "2026-05-27T05:26:20Z",
      "size": 314382
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/2260.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 351597
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/2260,\n      author = {Yaobin Shen and Xiangyang Zhang and Lei Wang and Dawu Gu},\n      title = {Tight Generic PRF Security of HMAC and NMAC},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/2260},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/2260}\n}"
}
