{"id":51133772,"url":"https://github.com/williamstaffordparsons/ghostscramble","last_synced_at":"2026-06-25T15:30:36.432Z","repository":{"id":327781103,"uuid":"1104447322","full_name":"williamstaffordparsons/ghostscramble","owner":"williamstaffordparsons","description":"GhostScramble is the hyper-efficient 64-bit PRNG.","archived":false,"fork":false,"pushed_at":"2026-06-21T18:58:10.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-21T20:20:03.400Z","etag":null,"topics":["128-bit","256-bit","64-bit","deterministic","fast","fastest","high-quality","memory-efficient","non-cryptographic","parallel","parallelism","prng","pseudorandomness"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamstaffordparsons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-26T08:19:58.000Z","updated_at":"2026-06-21T18:58:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/williamstaffordparsons/ghostscramble","commit_stats":null,"previous_names":["ghostproxies/blastcircuit","williamstaffordparsons/blastcircuit","williamstaffordparsons/ghostjumble","seedflurry/ghostscramble","williamstaffordparsons/ghostscramble"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/williamstaffordparsons/ghostscramble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamstaffordparsons%2Fghostscramble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamstaffordparsons%2Fghostscramble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamstaffordparsons%2Fghostscramble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamstaffordparsons%2Fghostscramble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamstaffordparsons","download_url":"https://codeload.github.com/williamstaffordparsons/ghostscramble/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamstaffordparsons%2Fghostscramble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34781455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["128-bit","256-bit","64-bit","deterministic","fast","fastest","high-quality","memory-efficient","non-cryptographic","parallel","parallelism","prng","pseudorandomness"],"created_at":"2026-06-25T15:30:35.911Z","updated_at":"2026-06-25T15:30:36.425Z","avatar_url":"https://github.com/williamstaffordparsons.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GhostScramble\n\n[![GhostScramble](ghostscramble.jpg)](https://github.com/williamstaffordparsons/ghostscramble)\n\n## Table of Contents\n\n- [Introduction](README.md?tab=readme-ov-file#introduction)\n- [Author](README.md?tab=readme-ov-file#author)\n- [License](README.md?tab=readme-ov-file#license)\n- [Implementation](README.md?tab=readme-ov-file#implementation)\n- [Parallelism](README.md?tab=readme-ov-file#parallelism)\n- [Randomness Test Results](README.md?tab=readme-ov-file#randomness-test-results)\n- [Speed Test Results](README.md?tab=readme-ov-file#speed-test-results)\n\n## Introduction\n\nGhostScramble is the hyper-efficient non-cryptographic PRNG (for 64-bit architecture) that has a minimum period of at least 2⁶⁴ (from a Weyl sequence), excellent randomness test results, hyper-fast speed, low-footprint implementation, parallelism and reversibility (state rewinding).\n\n## Author\n\nGhostScramble was created by [William Stafford Parsons](https://github.com/williamstaffordparsons).\n\n## License\n\nGhostScramble is licensed with the [BSD-3-Clause](LICENSE) license.\n\n## Implementation\n\nEach mention of GhostScramble refers to each of the 3 following variants individually (`ghostscramble64`, `ghostscramble128` and `ghostscramble256`) implemented in C (requiring the `stdint.h` header to define a 64-bit, unsigned integral type for `uint64_t`).\n\n[ghostscramble.c](ghostscramble.c)\n\n#### `ghostscramble64`\n\nThe `ghostscramble64` function modifies the state in a `struct ghostscramble64_state` instance to generate a pseudorandom `uint64_t` integer as the return value.\n\nEach variable (`a`, `b` and `c`) in a `struct ghostscramble64_state` instance must be seeded before generating a deterministic `ghostscramble64` sequence (that must discard the first few `ghostscramble64` results as a state warmup).\n\n#### `ghostscramble128`\n\nThe `ghostscramble128` function modifies the state in a `struct ghostscramble128_state` instance to generate 2 pseudorandom `uint64_t` integers in the `output` array.\n\nEach single-letter variable (`a`, `b` and `c`) in a `struct ghostscramble128_state` instance must be seeded before generating a deterministic `ghostscramble128` sequence (that must discard the first few `ghostscramble128` results as a state warmup).\n\n#### `ghostscramble256`\n\nThe `ghostscramble256` function modifies the state in a `struct ghostscramble256_state` instance to generate 4 pseudorandom `uint64_t` integers in the `output` array.\n\nEach single-letter variable (`a`, `b`, `c` and `d`) in a `struct ghostscramble256_state` instance must be seeded before generating a deterministic `ghostscramble256` sequence (that must discard the first few `ghostscramble256` results as a state warmup).\n\n## Parallelism\n\nGhostScramble enables a set of up to 2⁶⁴ parallel sequences (that each have non-probabilistic full state collision avoidance with each other for a period of at least 2⁶⁴) without Philox-style key variables (that could affect randomness quality consistency) or fixed-length jump-ahead functions (each parallel GhostScramble sequence has a minimum distance of 2⁶⁴ output results between each other).\n\nEach instance within a set of parallel GhostScramble instances must adhere to the following single-letter variable seeding rules before generating parallel GhostScramble sequences.\n\n1. `a` must be seeded with an integer that's unique among the set of parallel GhostScramble instances.\n2. `b` must be seeded with an integer that's consistent among the set of parallel GhostScramble instances.\n3. The remaining single-letter state variables must be seeded.\n\nAfter seeding a set of parallel GhostScramble instances, reseeding (or tampering with) either `a` or `b` voids the aforementioned parallelism segmentation properties.\n\n## Randomness Test Results\n\nGhostScramble yields excellent results (not tampering with GhostScramble state variables after seeding) from statistical test suites for randomness quality.\n\n#### PractRand 0.96\n\nGhostScramble had no `FAIL` results from `stdin -tlmax 32TB -tlmin 1KB` tests.\n\n#### Dieharder 3.31.1\n\nGhostScramble had no `FAILED` results from `dieharder -Y 1 -a -g 200 -k 2` tests.\n\n## Speed Test Results\n\nEach of the following results log the fastest process execution speed (in milliseconds) among several repetitions of a PRNG speed test (using `gcc -O3` from an AMD A4-9120C) that generates (and hashes) 1 billion pseudorandom `uint64_t` integers in a `#pragma GCC unroll 0` loop.\n\n| PRNG | Elapsed |\n| --- | --- |\n| **`ghostscramble256`** | **561ms** |\n| **`ghostscramble128`** | **743ms** |\n| ***`shishua_avx2` (`-mavx2`) | 866ms |\n| **`shishua_sse4` (`-msse4`) | 978ms |\n| **`ghostscramble64`** | **1072ms** |\n| **`shishua_sse3` (`-msse3`) | 1147ms |\n| **`shishua_sse2` (`-msse2`)| 1154ms |\n| `biski64` | 1292ms |\n| `sfc64` | 1320ms |\n| `xoshiro256_plus` | 1546ms |\n| `xorshiftr128_plus` | 1654ms |\n| `jsf64_2rotate` | 1718ms |\n| `xoroshiro128_plus` | 1733ms |\n| `mrsf64` | 1833ms |\n| `jsf64_3rotate` | 1841ms |\n| `mrc64` | 1862ms |\n| `romu_trio` | 1894ms |\n| `wob2m` | 1928ms |\n| `mwc192` | 1997ms |\n| `wyrand` | 2033ms |\n| `xorshift64` | 2135ms |\n| `shishua` | 2251ms |\n| `xorshift128_plus` | 2260ms |\n| *`xorwow` | 2882ms |\n| `romu_mono` | 2982ms |\n| *`pcg32_minimal` | 2983ms |\n| *`pcg_oneseq_64_xsh_rr_32` | 2987ms |\n| `mwc128` | 2998ms |\n| *`lehmer_mcg32` | 3402ms |\n| *`pcg_oneseq_64_xsh_rs_32` | 3404ms |\n| *`lcg32` | 3409ms |\n| `lehmer_mcg64` | 3413ms |\n| `lcg64` | 3416ms |\n| `pcg_oneseq_64_xsl_rr_rr_64` | 3928ms |\n| `splitmix64` | 4385ms |\n| `cwg64` | 4680ms |\n| `cwg128` | 4757ms |\n| **`sfmt` (`-msse2`) | 5525ms |\n| `pcg_oneseq_128_xsh_rr_64` | 6833ms |\n| `mt19937_64` | 7126ms |\n| *`squares32` | 7552ms |\n| `pcg64_dxsm` | 7604ms |\n| `pcg_oneseq_128_xsh_rs_64` | 7676ms |\n| `philox4x64` | 9171ms |\n| `squares64` | 9596ms |\n| `tinymt64` | 16081ms |\n| *`stdlib_rand` | 46083ms |\n\n\\* Each n-bit output integer was casted to a `uint64_t` integer.\n\n\\** Each 128-bit output integer was extracted as 2 `uint64_t` integers.\n\n\\*** Each 256-bit output integer was extracted as 4 `uint64_t` integers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamstaffordparsons%2Fghostscramble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamstaffordparsons%2Fghostscramble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamstaffordparsons%2Fghostscramble/lists"}