{"id":16931399,"url":"https://github.com/honno/sts-pylib","last_synced_at":"2025-04-11T18:33:47.656Z","repository":{"id":41963980,"uuid":"288978695","full_name":"honno/sts-pylib","owner":"honno","description":"Python interface to the NIST statistical tests for randomness","archived":false,"fork":false,"pushed_at":"2022-04-21T21:20:38.000Z","size":3774,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T09:17:34.425Z","etag":null,"topics":["nist","randomness","rng","sts"],"latest_commit_sha":null,"homepage":"https://sts-pylib.readthedocs.io","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/honno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["Honno"],"ko_fi":"honno"}},"created_at":"2020-08-20T10:41:07.000Z","updated_at":"2024-03-21T16:32:24.000Z","dependencies_parsed_at":"2022-08-12T00:50:18.592Z","dependency_job_id":null,"html_url":"https://github.com/honno/sts-pylib","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honno%2Fsts-pylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honno%2Fsts-pylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honno%2Fsts-pylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honno%2Fsts-pylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/honno","download_url":"https://codeload.github.com/honno/sts-pylib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008624,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nist","randomness","rng","sts"],"created_at":"2024-10-13T20:43:53.128Z","updated_at":"2025-04-11T18:33:47.625Z","avatar_url":"https://github.com/honno.png","language":"C","funding_links":["https://github.com/sponsors/Honno","https://ko-fi.com/honno"],"categories":[],"sub_categories":[],"readme":"# sts-pylib\r\n\r\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Honno/sts-pylib/Test%20package)\r\n![Read the Docs](https://img.shields.io/readthedocs/sts-pylib)\r\n![License](https://img.shields.io/badge/license-public%20domain-informational)\r\n![PyPI](https://img.shields.io/pypi/v/sts-pylib)\r\n![Python Version](https://img.shields.io/badge/python-3.6%2B-informational)\r\n\r\nA functional Python interface to the NIST Statistical Test Suite.\r\n\r\n## Quickstart\r\n\r\nYou can install `sts-pylib` via `pip`:\r\n\r\n```console\r\n$ pip install sts-pylib\r\n```\r\n\r\nThis will install a package `sts` into your system,\r\nwhich contains NIST's statistical tests for randomness.\r\nA complete reference is available in the [docs](https://sts-pylib.readthedocs.io/en/latest/).\r\n\r\n```pycon\r\n\u003e\u003e\u003e import sts\r\n\u003e\u003e\u003e p_value = sts.frequency([1, 0, 1, 1, 0, 1, 0, 1, 0, 1])\r\n\t      FREQUENCY TEST\r\n---------------------------------------------\r\nCOMPUTATIONAL INFORMATION:\r\n(a) The nth partial sum = 2\r\n(b) S_n/n               = 0.200000\r\n---------------------------------------------\r\np_value = 0.527089\r\n\u003e\u003e\u003e print(p_value)\r\n0.5270892568655381\r\n```\r\n\r\nNote that all the tests take the input sequence `epsilon`\r\n(a sample of RNG output)\r\nas an array of `0` and `1` integers.\r\n\r\nA more thorough demonstration of `sts-pylib` is available on\r\n[Kaggle](https://www.kaggle.com/justhonno/overly-simplistic-randomness-testing-demo).\r\n\r\n## Contributors\r\n\r\nThe [original sts C program](https://csrc.nist.gov/Projects/Random-Bit-Generation/Documentation-and-Software),\r\nalongside its corresponding [SP800-22 paper](https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final),\r\nwere authored by the following at [NIST](https://www.nist.gov/):\r\n\r\n* Andrew Rukhin\r\n* Juan Soto\r\n* James Nechvatal\r\n* Miles Smid\r\n* Elaine Barker\r\n* Stefan Leigh\r\n* Mark Levenson\r\n* Mark Vangel\r\n* David Banks,\r\n* Alan Heckert\r\n* James Dray\r\n* San Vo\r\n* Lawrence E Bassham III\r\n\r\nAdditional work to improve Windows compatibility was done by\r\nPaweł Krawczyk ([@kravietz](https://github.com/kravietz)),\r\nwith a bug fix by [@ZZMarquis](https://github.com/ZZMarquis).\r\n\r\nI ([@Honno](https://github.com/Honno)) am responsible for\r\nconverting sts into a functional interface,\r\nand providing a Python wrapper on-top of it.\r\nYou can check out my own randomness testing suite [coinflip](https://github.com/Honno/coinflip/),\r\nwhere I am creating a robust and user-friendly\r\nversion of NIST's sts in Python.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhonno%2Fsts-pylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhonno%2Fsts-pylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhonno%2Fsts-pylib/lists"}