{"id":50487014,"url":"https://github.com/systemslibrarian/crypto-lab-corrupted-oracle","last_synced_at":"2026-06-01T23:03:33.830Z","repository":{"id":349078802,"uuid":"1200973140","full_name":"systemslibrarian/crypto-lab-corrupted-oracle","owner":"systemslibrarian","description":"Browser-based demo of the Dual_EC_DRBG backdoor — the NSA-planted vulnerability confirmed by Snowden. The standard was compromised. Here's the proof.","archived":false,"fork":false,"pushed_at":"2026-04-06T21:47:06.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-06T23:21:49.017Z","etag":null,"topics":["backdoor","chacha20-drbg","crypto-compare","csprng","drbg","dual-ec-drbg","elliptic-curve-cryptography","hmac-drbg","nsa"],"latest_commit_sha":null,"homepage":"https://systemslibrarian.github.io/crypto-lab-corrupted-oracle/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemslibrarian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T03:41:47.000Z","updated_at":"2026-04-06T21:47:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/crypto-lab-corrupted-oracle","commit_stats":null,"previous_names":["systemslibrarian/corrupted-oracle","systemslibrarian/crypto-lab-corrupted-oracle"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/crypto-lab-corrupted-oracle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-corrupted-oracle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-corrupted-oracle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-corrupted-oracle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-corrupted-oracle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/crypto-lab-corrupted-oracle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-corrupted-oracle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33797128,"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-01T02:00:06.963Z","response_time":115,"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":["backdoor","chacha20-drbg","crypto-compare","csprng","drbg","dual-ec-drbg","elliptic-curve-cryptography","hmac-drbg","nsa"],"created_at":"2026-06-01T23:03:30.333Z","updated_at":"2026-06-01T23:03:33.821Z","avatar_url":"https://github.com/systemslibrarian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Corrupted Oracle\n\n**The standard was compromised. Here's the proof.**\n\n---\n\n## What It Is\n\nCorrupted Oracle is a browser-based demonstration of three deterministic random bit generators (DRBGs): **HMAC-DRBG** (NIST SP 800-90A §10.1.2), **ChaCha20-DRBG** (RFC 8439-based), and **Dual\\_EC\\_DRBG** (SP 800-90A Appendix A.1) — including a live implementation of the Dual\\_EC\\_DRBG backdoor using P-256 elliptic curve arithmetic. It shows that a structurally backdoored CSPRNG can pass all standard statistical randomness tests while an attacker with knowledge of the secret relationship between the curve points P and Q can recover internal state and predict all future output. The security model is symmetric-key DRBG construction, with the backdoor exploiting an asymmetric (elliptic curve) trapdoor embedded in the generator constants.\n\n## When to Use It\n\n- **Teaching the Dual\\_EC\\_DRBG backdoor** — the demo runs real EC math in the browser so students can see state recovery happen live, not just read about it.\n- **Demonstrating why statistical tests are insufficient** — all four NIST SP 800-22 tests (Frequency, Block Frequency, Runs, Longest Run) pass on backdoored output, proving that passing tests does not mean a generator is safe.\n- **Comparing DRBG constructions side by side** — HMAC-DRBG, ChaCha20-DRBG, and Dual\\_EC\\_DRBG generate output in parallel so you can see identical statistical profiles with fundamentally different security properties.\n- **Illustrating supply-chain trust in cryptographic standards** — the demo makes concrete what it means for a standards body to publish compromised constants.\n- **Do not use any code from this project in production** — the Dual\\_EC\\_DRBG implementation is intentionally backdoored for educational purposes and the demo DRBGs are not hardened for real-world use.\n\n## Live Demo\n\n**[Live Demo →](https://systemslibrarian.github.io/crypto-lab-corrupted-oracle/)**\n\nGenerate random output from all three DRBGs, run NIST SP 800-22 statistical tests against each, and trigger the Dual\\_EC\\_DRBG backdoor attack to watch the attacker brute-force 2¹⁶ candidates and recover internal state. You can reseed any generator and view bit heatmaps comparing output from all three algorithms.\n\n## How to Run Locally\n\n```bash\ngit clone https://github.com/systemslibrarian/crypto-lab-corrupted-oracle.git\ncd crypto-lab-corrupted-oracle\nnpm install\nnpm run dev\n```\n\n## Part of the Crypto-Lab Suite\n\nThis project is one module in the Crypto-Lab collection — see all demos at [systemslibrarian.github.io/crypto-lab/](https://systemslibrarian.github.io/crypto-lab/).\n\n---\n\n*So whether you eat or drink or whatever you do, do it all for the glory of God. — 1 Corinthians 10:31*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-corrupted-oracle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-corrupted-oracle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-corrupted-oracle/lists"}