{
  "id": "2006/187",
  "url": "https://opencryptology.org/2006/187",
  "original_url": "https://eprint.iacr.org/2006/187",
  "title": "On the Security of HMAC and NMAC Based on HAVAL, MD4, MD5, SHA-0 and SHA-1",
  "authors": [
    "Jongsung Kim",
    "Alex Biryukov",
    "Bart Preneel",
    "Seokhie Hong"
  ],
  "affiliations": null,
  "abstract": "HMAC is a widely used message authentication code and a\npseudorandom function generator based on cryptographic hash\nfunctions such as MD5 and SHA-1. It has been standardized by ANSI,\nIETF, ISO and NIST. HMAC is proved to be secure as long as the\ncompression function of the underlying hash function is a\npseudorandom function. In this paper we devise two new\ndistinguishers of the structure of HMAC, called {\\em differential}\nand {\\em rectangle distinguishers}, and use them to discuss the\nsecurity of HMAC based on HAVAL, MD4, MD5, SHA-0 and SHA-1. We\nshow how to distinguish HMAC with reduced or full versions of\nthese cryptographic hash functions from a random function or from\nHMAC with a random function. We also show how to use our\ndifferential distinguisher to devise a forgery attack on HMAC. Our\ndistinguishing and forgery attacks can also be mounted on NMAC\nbased on HAVAL, MD4, MD5, SHA-0 and SHA-1. Furthermore, we show\nthat our differential and rectangle distinguishers can lead to\nsecond-preimage attacks on 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": "“On the Security of HMAC and NMAC Based on HAVAL, MD4, MD5, SHA-0 and SHA-1” by Jongsung Kim, Alex Biryukov, Bart Preneel, Seokhie Hong, Cryptology ePrint Archive, Paper 2006/187, https://eprint.iacr.org/2006/187. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2006-06-19T21:11:01Z",
    "updated": "2006-06-19T21:11:01Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2006/187.pdf",
    "sha256": "56f8f33e54fc7e6b1860f95fe52a9959693000e275d336f8f4c8d718f5a916d6",
    "size": 280830,
    "source": "github-mirror",
    "source_date": "2019-02-25T16:06:57Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2006/187/versions/20190225T160657Z.pdf",
      "captured_at": "2019-02-25T16:06:57Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2006/187.pdf",
      "size": 280830,
      "sha256": "56f8f33e54fc7e6b1860f95fe52a9959693000e275d336f8f4c8d718f5a916d6",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260404160522id_/https://eprint.iacr.org/2006/187.pdf",
      "captured_at": "2026-04-04T16:05:22Z",
      "size": 251685
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2006/187.pdf",
      "captured_at": "2019-02-25T16:06:57Z",
      "size": 280830
    }
  ],
  "bibtex": "@misc{cryptoeprint:2006/187,\n      author = {Jongsung Kim and Alex Biryukov and Bart Preneel and Seokhie Hong},\n      title = {On the Security of HMAC and NMAC Based on HAVAL, MD4, MD5, SHA-0 and SHA-1},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2006/187},\n      year = {2006},\n      url = {https://eprint.iacr.org/2006/187}\n}"
}
