{"id":51578762,"url":"https://github.com/systemslibrarian/crypto-lab-rsa-educational","last_synced_at":"2026-07-11T03:32:25.550Z","repository":{"id":368181114,"uuid":"1283205427","full_name":"systemslibrarian/crypto-lab-rsa-educational","owner":"systemslibrarian","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-29T10:42:02.000Z","size":2712,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T12:23:32.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-06-28T17:00:04.000Z","updated_at":"2026-06-29T10:42:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/crypto-lab-rsa-educational","commit_stats":null,"previous_names":["systemslibrarian/crypto-lab-rsa-educational"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/crypto-lab-rsa-educational","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-rsa-educational","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-rsa-educational/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-rsa-educational/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-rsa-educational/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/crypto-lab-rsa-educational/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-rsa-educational/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35350133,"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-07-11T02:00:05.354Z","response_time":104,"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":[],"created_at":"2026-07-11T03:32:24.845Z","updated_at":"2026-07-11T03:32:25.543Z","avatar_url":"https://github.com/systemslibrarian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Educational RSA\n\n## What It Is\n\nEducational RSA is an interactive, browser-based walkthrough of the **RSA public-key cryptosystem** — key generation, encryption/decryption, and digital signatures — performed on real (deliberately small) numbers using native JavaScript `BigInt`. RSA solves the problem of communicating securely and authenticating messages without a pre-shared secret: anyone can encrypt to you or verify your signature with your public key `(n, e)`, while only you, holding the private exponent `d`, can decrypt or sign. It is an **asymmetric** scheme whose security rests on the practical difficulty of factoring the product of two large primes. The textbook (unpadded) math is shown transparently for teaching; the demo is explicit that raw RSA is insecure and that real systems use OAEP padding (encryption) and PSS (signatures).\n\n## When to Use It\n\n- **Establishing keys / encrypting a symmetric key over an untrusted channel** — RSA-OAEP lets a sender encrypt a short secret to a recipient's public key with no prior shared secret.\n- **Digital signatures and code/document signing** — RSA-PSS signatures let anyone verify authenticity and integrity using only the signer's public key.\n- **Interoperability with existing PKI** — RSA is ubiquitous in TLS certificates, S/MIME, and legacy systems, so it is the right choice when you must fit established standards.\n- **Teaching public-key cryptography** — RSA's arithmetic is simple enough to compute by hand on small numbers, making the easy-to-multiply / hard-to-factor \"trapdoor\" idea concrete.\n- **When NOT to use it:** do not use **textbook (unpadded) RSA** for anything real — it is deterministic and malleable. For new systems prefer elliptic-curve schemes (Ed25519/X25519) for smaller keys and faster operations, and never roll your own padding.\n\n## Live Demo\n\n**[systemslibrarian.github.io/crypto-lab-rsa-educational](https://systemslibrarian.github.io/crypto-lab-rsa-educational/)**\n\nGenerate a keypair from two small primes (or roll random ones) and watch every step — `n`, `φ(n)`, `e`, and `d` — derived in the open. **Encrypt and decrypt** a short message with the square-and-multiply math expanded, **sign and verify** with a tamper toggle that makes verification fail, then **factor a weak key** in milliseconds and contrast it with a 2048-bit key that does not break. A final panel shows why real RSA adds randomized OAEP padding by comparing deterministic textbook ciphertext against WebCrypto RSA-OAEP. Controls include the two primes, the public exponent `e`, the message, the signature tamper switch, and the factoring launcher.\n\n## How to Run Locally\n\n```bash\ngit clone https://github.com/systemslibrarian/crypto-lab-rsa-educational\ncd crypto-lab-rsa-educational\nnpm install\nnpm run dev\n```\n\nNo environment variables are required. Run the test suite with `npm test`.\n\n## Part of the Crypto-Lab Suite\n\n\u003e One of 60+ live browser demos at\n\u003e [systemslibrarian.github.io/crypto-lab](https://systemslibrarian.github.io/crypto-lab/)\n\u003e — spanning Atbash (600 BCE) through NIST FIPS 203/204/205 (2024).\n\n---\n\n*\"Whether you eat or drink, or whatever you do, do all to the glory of God.\" — 1 Corinthians 10:31*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-rsa-educational","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-rsa-educational","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-rsa-educational/lists"}