{
  "id": "2016/1103",
  "url": "https://opencryptology.org/2016/1103",
  "original_url": "https://eprint.iacr.org/2016/1103",
  "title": "A Fast Single-Key Two-Level Universal Hash Function",
  "authors": [
    "Debrup Chakraborty",
    "Sebati Ghosh",
    "Palash Sarkar"
  ],
  "affiliations": null,
  "abstract": "Universal hash functions based on univariate polynomials are well known, e.g. \\sym{Poly1305} and \\sym{GHASH}. Using\nHorner's rule to evaluate such hash functions require $\\ell-1$ field multiplications for hashing a message consisting of $\\ell$\nblocks where each block is one field element. A faster method is based on the class of Bernstein-Rabin-Winograd (BRW) polynomials\nwhich require $\\lfloor\\ell/2\\rfloor$ multiplications and $\\lfloor\\lg\\ell\\rfloor$ squarings for $\\ell\\geq 3$ blocks.\nThough this is significantly smaller than Horner's rule based hashing, implementation of BRW polynomials for variable length\nmessages present significant difficulties. In this work, we propose a two-level hash function where BRW polynomial based\nhashing is done at the lower level and Horner's rule based hashing is done at the higher level. The BRW polynomial based\nhashing is applied to a fixed number of blocks and hence the difficulties in handling variable length messages is avoided.\nEven though the hash function has two levels, we show that it is sufficient to use a single field element as the hash key. The\nbasic idea is instantiated to propose two new hash functions, one which hashes a single binary string and the other can hash a vector\nof binary strings. We describe two actual implementations, one over $\\mathbb{F}_{2^{128}}$ and the other over\n$\\mathbb{F}_{2^{256}}$ both using the {\\tt pclmulqdq} instruction available in modern Intel processors. On both the Haswell and\nSkylake processors, the implementation over $\\mathbb{F}_{2^{128}}$ is faster than the highly optimised implementation of \\sym{GHASH}\nby Gueron.\nWe further show that the Fast Fourier Transform based field multiplication over $\\mathbb{F}_{2^{256}}$ proposed by Bernstein and Chou\ncan be used to evaluate the new hash function at a cost of about at most 46 bit operations per bit of digest, but, unlike the\nBernstein-Chou analysis, there is no hidden cost of generating the hash key.\nMore generally, the new idea of building a two-level hash function having a single field element as the hash key can be applied to other\nfinite fields to build new hash functions.",
  "category": null,
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“A Fast Single-Key Two-Level Universal Hash Function” by Debrup Chakraborty, Sebati Ghosh, Palash Sarkar, Cryptology ePrint Archive, Paper 2016/1103, https://eprint.iacr.org/2016/1103. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2016-11-23T19:17:31Z",
    "updated": "2016-11-23T19:17:31Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2016/1103.pdf",
    "sha256": "f3a908522b53152aa0b304a86e115d62998deaf11b6edcffb5f706429333f5ea",
    "size": 377084,
    "source": "github-mirror",
    "source_date": "2019-02-25T17:24:56Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2016/1103/versions/20190225T172456Z.pdf",
      "captured_at": "2019-02-25T17:24:56Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2016/1103.pdf",
      "size": 377084,
      "sha256": "f3a908522b53152aa0b304a86e115d62998deaf11b6edcffb5f706429333f5ea",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20251113180843id_/https://eprint.iacr.org/2016/1103.pdf",
      "captured_at": "2025-11-13T18:08:43Z",
      "size": 374614
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2016/1103.pdf",
      "captured_at": "2019-02-25T17:24:56Z",
      "size": 377084
    }
  ],
  "bibtex": "@misc{cryptoeprint:2016/1103,\n      author = {Debrup Chakraborty and Sebati Ghosh and Palash Sarkar},\n      title = {A Fast Single-Key Two-Level Universal Hash Function},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2016/1103},\n      year = {2016},\n      url = {https://eprint.iacr.org/2016/1103}\n}"
}
