{
  "id": "2023/861",
  "url": "https://opencryptology.org/2023/861",
  "original_url": "https://eprint.iacr.org/2023/861",
  "title": "When Messages are Keys: Is HMAC a dual-PRF?",
  "authors": [
    "Matilda Backendal",
    "Mihir Bellare",
    "Felix Günther",
    "Matteo Scarlata"
  ],
  "affiliations": null,
  "abstract": "In Internet security protocols including TLS 1.3, KEMTLS, MLS and Noise, HMAC is being assumed to be a dual-PRF, meaning a PRF not only when keyed conventionally (through its first input), but also when \"swapped\" and keyed (unconventionally) through its second (message) input. We give the first in-depth analysis of the dual-PRF assumption on HMAC.\n\nFor the swap case, we note that security does not hold in general, but completely characterize when it does; we show that HMAC is swap-PRF secure if and only if keys are restricted to sets satisfying a condition called feasibility, that we give, and that holds in applications. The sufficiency is shown by proof and the necessity by attacks. For the conventional PRF case, we fill a gap in the literature by proving PRF security of HMAC for keys of arbitrary length.\n\nOur proofs are in the standard model, make assumptions only on the compression function underlying the hash function, and give good bounds in the multi-user setting. The positive results are strengthened through achieving a new notion of variable key-length PRF security that guarantees security even if different users use keys of different lengths, as happens in practice.",
  "category": "Secret-key cryptography",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“When Messages are Keys: Is HMAC a dual-PRF?” by Matilda Backendal, Mihir Bellare, Felix Günther, Matteo Scarlata, Cryptology ePrint Archive, Paper 2023/861, https://eprint.iacr.org/2023/861. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2023-06-07T10:13:13Z",
    "updated": "2023-06-07T16:20:25Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2023/861.pdf",
    "sha256": "0edbbe08abcbef2442f324fe0deb615f68c43db9a30cfb2c3ae3e7feffd59075",
    "size": 744457,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:41Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2023/861/versions/20240114T061341Z.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/861.pdf",
      "size": 744457,
      "sha256": "0edbbe08abcbef2442f324fe0deb615f68c43db9a30cfb2c3ae3e7feffd59075",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260829145442id_/https://eprint.iacr.org/2023/861.pdf",
      "captured_at": "2026-08-29T14:54:42Z",
      "size": 745809
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/861.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "size": 744457
    }
  ],
  "bibtex": "@misc{cryptoeprint:2023/861,\n      author = {Matilda Backendal and Mihir Bellare and Felix Günther and Matteo Scarlata},\n      title = {When Messages are Keys: Is HMAC a dual-PRF?},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2023/861},\n      year = {2023},\n      url = {https://eprint.iacr.org/2023/861}\n}"
}
