{
  "id": "2014/031",
  "url": "https://opencryptology.org/2014/031",
  "original_url": "https://eprint.iacr.org/2014/031",
  "title": "On the Design of LIL Tests for (Pseudo) Random Generators and Some Experimental Results",
  "authors": [
    "Yongge Wang"
  ],
  "affiliations": null,
  "abstract": "Random numbers have been one of the most useful\nobjects in statistics, computer science, cryptography, modeling,\nsimulation, and other applications though it is very difficult to\nconstruct true randomness. Many solutions (e.g., cryptographic\npseudorandom generators) have been proposed to harness or\nsimulate randomness and many statistical testing techniques have\nbeen proposed to determine whether a pseudorandom generator\nproduces high quality randomness. NIST SP800-22 (2010) proposes\nthe state of art testing suite for (pseudo) random generators\nto detect deviations of a binary sequence from randomness. On\nthe one hand, as a counter example to NIST SP800-22 test suite,\nit is easy to construct functions that are considered as GOOD\npseudorandom generators by NIST SP800-22 test suite though\nthe output of these functions are easily distinguishable from the\nuniform distribution. Thus these functions are not pseudorandom\ngenerators by definition. On the other hand, NIST SP800-22\ndoes not cover some of the important laws for randomness. Two\nfundamental limit theorems about random binary strings are\nthe central limit theorem and the law of the iterated logarithm\n(LIL). Several frequency related tests in NIST SP800-22 cover\nthe central limit theorem while no NIST SP800-22 test covers\nLIL.\n\nThis paper proposes techniques to address the above challenges\nthat NIST SP800-22 testing suite faces. Firstly, we propose\nstatistical distance based testing techniques for (pseudo) random\ngenerators to reduce the above mentioned Type II errors in NIST\nSP800-22 test suite. Secondly, we propose LIL based statistical\ntesting techniques, calculate the probabilities, and carry out\nexperimental tests on widely used pseudorandom generators\nby generating around 30TB of pseudorandom sequences. The\nexperimental results show that for a sample size of 1000 sequences\n(2TB), the statistical distance between the generated sequences\nand the uniform distribution is around 0.07 (with 0 for statistically\nindistinguishable and 1 for completely distinguishable)\nand the root-mean-square deviation is around 0.005. Though the\nstatistical distance 0.07 and RMSD 0.005 are acceptable for some\napplications, for a cryptographic \"random oracle\", the preferred\nstatistical distance should be smaller than 0.03 and RMSD be\nsmaller than 0.001 at the sample size 1000. These results justify\nthe importance of LIL testing techniques designed in this paper.\nThe experimental results in this paper are reproducible and the\nraw experimental data are available at author's website.",
  "category": "Foundations",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“On the Design of LIL Tests for (Pseudo) Random Generators and Some Experimental Results” by Yongge Wang, Cryptology ePrint Archive, Paper 2014/031, https://eprint.iacr.org/2014/031. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2014-01-12T13:25:46Z",
    "updated": "2014-01-12T13:25:46Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2014/031.pdf",
    "sha256": "4497e6f6c058c97102b96026e904a98e8f99ee99f040e3fdf15f4a336ed88152",
    "size": 615185,
    "source": "github-mirror",
    "source_date": "2019-02-25T16:55:32Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2014/031/versions/20190225T165532Z.pdf",
      "captured_at": "2019-02-25T16:55:32Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2014/031.pdf",
      "size": 615185,
      "sha256": "4497e6f6c058c97102b96026e904a98e8f99ee99f040e3fdf15f4a336ed88152",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260429071615id_/https://eprint.iacr.org/2014/031.pdf",
      "captured_at": "2026-04-29T07:16:15Z",
      "size": 591097
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2014/031.pdf",
      "captured_at": "2019-02-25T16:55:32Z",
      "size": 615185
    }
  ],
  "bibtex": "@misc{cryptoeprint:2014/031,\n      author = {Yongge Wang},\n      title = {On the Design of LIL Tests for (Pseudo) Random Generators and Some Experimental Results},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2014/031},\n      year = {2014},\n      url = {https://eprint.iacr.org/2014/031}\n}"
}
