{
  "id": "2021/774",
  "url": "https://opencryptology.org/2021/774",
  "original_url": "https://eprint.iacr.org/2021/774",
  "title": "On Tight Quantum Security of HMAC and NMAC in the Quantum Random Oracle Model",
  "authors": [
    "Akinori Hosoyamada",
    "Tetsu Iwata"
  ],
  "affiliations": null,
  "abstract": "HMAC and NMAC are the most basic and important constructions to convert Merkle-Damgård hash functions into message authentication codes (MACs) or pseudorandom functions (PRFs).\nIn the quantum setting, at CRYPTO 2017, Song and Yun showed that HMAC and NMAC are quantum pseudorandom functions (qPRFs) under the standard assumption that the underlying compression function is a qPRF.\nTheir proof guarantees security up to $O(2^{n/5})$ or $O(2^{n/8})$ quantum queries when the output length of HMAC and NMAC is $n$ bits.\nHowever, there is a gap between the provable security bound and a simple distinguishing attack that uses $O(2^{n/3})$ quantum queries.\nThis paper settles the problem of closing the gap.\nWe show that the tight bound of the number of\nquantum queries to distinguish HMAC or NMAC from a random function\nis $\\Theta(2^{n/3})$ in the quantum random oracle model,\nwhere compression functions are modeled as quantum random oracles.\nTo give the tight quantum bound,\nbased on an alternative formalization of Zhandry's compressed oracle technique,\nwe introduce a new proof technique focusing on the symmetry of quantum query records.",
  "category": "Secret-key cryptography",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“On Tight Quantum Security of HMAC and NMAC in the Quantum Random Oracle Model” by Akinori Hosoyamada, Tetsu Iwata, Cryptology ePrint Archive, Paper 2021/774, https://eprint.iacr.org/2021/774. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2021-06-09T06:31:01Z",
    "updated": "2021-06-09T06:31:01Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2021/774.pdf",
    "sha256": "a110cba9afe38525cf9fbaac29fa690b880376b3637cb5f6a1103063be60bca4",
    "size": 2580105,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:28Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2021/774/versions/20240114T061328Z.pdf",
      "captured_at": "2024-01-14T06:13:28Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2021/774.pdf",
      "size": 2580105,
      "sha256": "a110cba9afe38525cf9fbaac29fa690b880376b3637cb5f6a1103063be60bca4",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260220111456id_/https://eprint.iacr.org/2021/774.pdf",
      "captured_at": "2026-02-20T11:14:56Z",
      "size": 2573388
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2021/774.pdf",
      "captured_at": "2024-01-14T06:13:28Z",
      "size": 2580105
    }
  ],
  "bibtex": "@misc{cryptoeprint:2021/774,\n      author = {Akinori Hosoyamada and Tetsu Iwata},\n      title = {On Tight Quantum Security of HMAC and NMAC in the Quantum Random Oracle Model},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2021/774},\n      year = {2021},\n      url = {https://eprint.iacr.org/2021/774}\n}"
}
