{
  "id": "2012/684",
  "url": "https://opencryptology.org/2012/684",
  "original_url": "https://eprint.iacr.org/2012/684",
  "title": "Generic Related-key Attacks for HMAC",
  "authors": [
    "Thomas Peyrin",
    "Yu Sasaki",
    "Lei Wang"
  ],
  "affiliations": null,
  "abstract": "In this article we describe new generic distinguishing and forgery attacks in the related-key scenario (using only a single related-key) for the HMAC construction. When HMAC uses a k-bit key, outputs an n-bit MAC, and is instantiated with an l-bit inner iterative hash function processing m-bit message blocks where m=k, our distinguishing-R attack requires about 2^{n/2} queries which improves over the currently best known generic attack complexity 2^{l/2} as soon as l>n. This means that contrary to the general belief, using wide-pipe hash functions as internal primitive will not increase the overall security of HMAC in the related-key model when the key size is equal to the message block size.\nWe also present generic related-key distinguishing-H, internal state recovery and forgery attacks. Our method is new and elegant, and uses a simple cycle-size detection criterion. The issue in the HMAC construction (not present in the NMAC construction) comes from the non-independence of the two inner hash layers and we provide a simple patch in order to avoid this generic attack. Our work finally shows that the choice of the opad and ipad constants value in HMAC is important.",
  "category": "Secret-key cryptography",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Generic Related-key Attacks for HMAC” by Thomas Peyrin, Yu Sasaki, Lei Wang, Cryptology ePrint Archive, Paper 2012/684, https://eprint.iacr.org/2012/684. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2012-12-10T10:43:40Z",
    "updated": "2013-07-18T04:30:31Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2012/684.pdf",
    "sha256": "78547242501cc3804b57e5b248649ada96383a1a53c202d42068d61d50cbf455",
    "size": 456520,
    "source": "github-mirror",
    "source_date": "2019-02-25T16:37:15Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2012/684/versions/20190225T163715Z.pdf",
      "captured_at": "2019-02-25T16:37:15Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2012/684.pdf",
      "size": 456520,
      "sha256": "78547242501cc3804b57e5b248649ada96383a1a53c202d42068d61d50cbf455",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2012/684/versions/20130108T014840Z.pdf",
      "captured_at": "2013-01-08T01:48:40Z",
      "label": "copy captured 2013-01-08",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20130108014840id_/http://eprint.iacr.org/2012/684.pdf",
      "size": 401282,
      "sha256": "076cac4ddc18ac0cb0d3956352246c230802c0a86b44ab000c9811ce4c431398",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260605233855id_/https://eprint.iacr.org/2012/684.pdf",
      "captured_at": "2026-06-05T23:38:55Z",
      "size": 426478
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2012/684.pdf",
      "captured_at": "2019-02-25T16:37:15Z",
      "size": 456520
    }
  ],
  "bibtex": "@misc{cryptoeprint:2012/684,\n      author = {Thomas Peyrin and Yu Sasaki and Lei Wang},\n      title = {Generic Related-key Attacks for HMAC},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2012/684},\n      year = {2012},\n      url = {https://eprint.iacr.org/2012/684}\n}"
}
