{"id":15398386,"url":"https://github.com/ototot/prngp","last_synced_at":"2025-07-14T18:15:13.298Z","repository":{"id":83335782,"uuid":"321088670","full_name":"oToToT/PRNGP","owner":"oToToT","description":"Collections of PRNG Predictions","archived":false,"fork":false,"pushed_at":"2022-03-25T09:41:53.000Z","size":26,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T01:38:49.322Z","etag":null,"topics":["crypto","ctf","ctf-tools","mt19937","mt19937-64","predictors","prng","prng-predictions","prng-predictor","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oToToT.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-13T14:50:45.000Z","updated_at":"2024-01-07T12:34:55.000Z","dependencies_parsed_at":"2023-10-14T23:23:43.982Z","dependency_job_id":null,"html_url":"https://github.com/oToToT/PRNGP","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.5,"last_synced_commit":"4150c45d63141aa2a4a4cf2dddddedecc48a399f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oToToT/PRNGP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FPRNGP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FPRNGP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FPRNGP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FPRNGP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oToToT","download_url":"https://codeload.github.com/oToToT/PRNGP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oToToT%2FPRNGP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265328338,"owners_count":23747883,"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":["crypto","ctf","ctf-tools","mt19937","mt19937-64","predictors","prng","prng-predictions","prng-predictor","python"],"created_at":"2024-10-01T15:42:59.990Z","updated_at":"2025-07-14T18:15:13.275Z","avatar_url":"https://github.com/oToToT.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PRNGP\n\nThe default (or widely used) PRNG implemented by most popular languages is not cryptographically secure. Here is some collections of some predictors. Feel free to send PR if you have some predictors not in this repo.\n\n## LCG (Java)\n\n[@giuliocandre/java-prng-predict](https://github.com/giuliocandre/java-prng-predict)\n\n**NOTICE**: I didn't check this repo yet\n\n## mt19937 (C++, Python, PHP)\n\nIf we have 624 output of mt19937, we could recover the whole state of mt19937.  \nAlso, if we have 0, 1, 397 -th output of mt19937, we could predict the 624-th output of mt19937.  \nFor PHP, if we have 0, 397 -th output of mt19937, we could recover the whole state of mt19937. See [this post](https://www.ambionics.io/blog/php-mt-rand-prediction).\n\nA predictor could be found in `mt19937/predictor.py`\n\n## mt19937_64 (C++)\n\nJust like mt19937, but we only need 312 output of mt19937_64 to recover the whole state of mt19937_64.  \nAlso, if we have 0, 1, 156 -th output of mt19937_64, we could predict the 312-th output of mt19937_64.\n\nA predictor could be found in `mt19937_64/predictor.py`\n\n## XorShift128+ (JavaScript in Chrome, Firefox, Node.js or any other V8 based platform)\n\nCheck [@TACIXAT/XorShift128Plus](https://github.com/TACIXAT/XorShift128Plus/blob/master/xs128p.py) for detail.\n\n## Misc\n\nLCGs are not secure at all: https://tailcall.net/blog/cracking-randomness-lcgs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fototot%2Fprngp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fototot%2Fprngp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fototot%2Fprngp/lists"}