{
  "id": "2016/560",
  "url": "https://opencryptology.org/2016/560",
  "original_url": "https://eprint.iacr.org/2016/560",
  "title": "Memory-Efficient Algorithms for Finding Needles in Haystacks",
  "authors": [
    "Itai Dinur",
    "Orr Dunkelman",
    "Nathan Keller",
    "Adi Shamir"
  ],
  "affiliations": null,
  "abstract": "One of the most common tasks in cryptography and cryptanalysis is to find\nsome interesting event (a needle) in an exponentially large collection (haystack) of\n$N=2^n$ possible events, or to demonstrate that no such event is likely to\nexist.  In particular, we are interested in finding needles which are defined as events that\nhappen with an unusually high probability of $p \\gg 1/N$ in a haystack which is an almost uniform\ndistribution on $N$ possible events. When the search algorithm can\nonly sample values from this distribution, the best known time/memory\ntradeoff for finding such an event requires $O(1/Mp^2)$ time given\n$O(M)$ memory.\n\nIn this paper we develop much faster needle searching algorithms in the common\ncryptographic setting in which the distribution is defined\nby applying some deterministic function $f$ to random inputs.\nSuch a distribution can be modelled by a random directed graph with $N$ vertices in\nwhich almost all the vertices have $O(1)$ predecessors while\nthe vertex we are looking for has an unusually large number of $O(pN)$ predecessors.\nWhen we are given only a constant amount of memory, we propose a new search methodology which we call\n\\textbf{NestedRho}. As $p$ increases, such random graphs undergo several subtle phase transitions,\nand thus the log-log dependence of the time complexity $T$ on $p$\nbecomes a piecewise linear curve which bends four times. Our new algorithm is faster than the\n$O(1/p^2)$ time complexity of the best previous algorithm in the full range of $1/N<p<1$, and in particular\nit improves the previous time complexity by a significant factor of $\\sqrt{N}$ for any $p$ in the range $N^{-0.75}<p< N^{-0.5}$. When we are given more memory, we show how to combine the \\textbf{NestedRho} technique with the parallel collision\nsearch technique in order to further reduce its time complexity. Finally, we show how to apply our new search\ntechnique to more complicated distributions with multiple peaks when we want to find all the peaks whose\nprobabilities are higher than $p$.",
  "category": null,
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Memory-Efficient Algorithms for Finding Needles in Haystacks” by Itai Dinur, Orr Dunkelman, Nathan Keller, Adi Shamir, Cryptology ePrint Archive, Paper 2016/560, https://eprint.iacr.org/2016/560. 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-06-03T16:21:28Z",
    "updated": "2016-06-03T16:21:28Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2016/560.pdf",
    "sha256": "ca786280ea2202ef3d9f17fcc091e726d2ed0e1542a04565d12376c97e906ceb",
    "size": 463148,
    "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/560/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/560.pdf",
      "size": 463148,
      "sha256": "ca786280ea2202ef3d9f17fcc091e726d2ed0e1542a04565d12376c97e906ceb",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20240804054819id_/https://eprint.iacr.org/2016/560.pdf",
      "captured_at": "2024-08-04T05:48:19Z",
      "size": 400811
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2016/560.pdf",
      "captured_at": "2019-02-25T17:24:56Z",
      "size": 463148
    }
  ],
  "bibtex": "@misc{cryptoeprint:2016/560,\n      author = {Itai Dinur and Orr Dunkelman and Nathan Keller and Adi Shamir},\n      title = {Memory-Efficient Algorithms for Finding Needles in Haystacks},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2016/560},\n      year = {2016},\n      url = {https://eprint.iacr.org/2016/560}\n}"
}
