{"id":51578749,"url":"https://github.com/systemslibrarian/crypto-lab-aegis-gate","last_synced_at":"2026-07-11T03:32:25.160Z","repository":{"id":366721045,"uuid":"1214792554","full_name":"systemslibrarian/crypto-lab-aegis-gate","owner":"systemslibrarian","description":"Browser-based AEGIS-256 authenticated encryption demo (draft-irtf-cfrg-aegis-aead-18). AES round function, 6-state sponge update, and tag derivation implemented from scratch and verified against official test vectors.","archived":false,"fork":false,"pushed_at":"2026-07-10T23:42:42.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-11T01:13:28.659Z","etag":null,"topics":["aead","aegis-256","aes","authenticated-encryption","cfrg","crypto-lab","cryptography","fips-197","nonce-misuse-resistant","post-aes-gcm","rfc-draft","sponge-construction","symmetric-encryption"],"latest_commit_sha":null,"homepage":"https://systemslibrarian.github.io/crypto-lab-aegis-gate/","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-19T03:52:34.000Z","updated_at":"2026-07-10T23:42:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/crypto-lab-aegis-gate","commit_stats":null,"previous_names":["systemslibrarian/crypto-lab-aegis-gate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/crypto-lab-aegis-gate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-aegis-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-aegis-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-aegis-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-aegis-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/crypto-lab-aegis-gate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fcrypto-lab-aegis-gate/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":["aead","aegis-256","aes","authenticated-encryption","cfrg","crypto-lab","cryptography","fips-197","nonce-misuse-resistant","post-aes-gcm","rfc-draft","sponge-construction","symmetric-encryption"],"created_at":"2026-07-11T03:32:24.478Z","updated_at":"2026-07-11T03:32:25.156Z","avatar_url":"https://github.com/systemslibrarian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto-lab-aegis-gate\n\n## What It Is\nBrowser-based AEGIS-256 authenticated encryption demo implementing\ndraft-irtf-cfrg-aegis-aead-18 (CFRG, October 2025). AEGIS-256 is an\nAES-based AEAD designed for high-performance applications, using the AES\nround function directly to build a sponge-like construction with 768-bit\nstate and 256-bit nonces. All 6-state updates, AES round function, and\nthe authentication tag derivation are implemented from the draft spec\nand verified against the official JSON test vectors. Both the 128-bit and\n256-bit tag variants are supported. No external crypto libraries are used;\nthe AES S-box, ShiftRows, MixColumns, and GF(2^8) multiplication are\nimplemented from FIPS 197.\n\nThe page opens by replaying every official draft test vector through this\nimplementation's own encrypt path, in your browser, and showing the result\nbyte-for-byte — both the five encryption vectors (ciphertext, 128-bit tag,\n256-bit tag, and a decrypt round-trip) and the four must-reject forgery\nvectors, so \"verified against the official vectors\" is something you watch\nhappen rather than take on trust. The same vectors are exercised in the test\nsuite (`npm test`), and a guard test keeps the in-browser copy byte-identical\nto the authoritative fixture so the two cannot drift.\n\nSix interactive exhibits go beyond a byte dump:\n\n- **Encrypt / tamper (Exhibit 1)** — encrypt your own input with either tag\n  length, flip a single bit of ciphertext or tag and see exactly where it\n  landed, and watch the recomputed tag diverge in nearly every byte. Any\n  scenario is shareable as a URL, so a class can open one link in a known state.\n- **The state machine, live (Exhibit 2)** — step Init / Absorb / Enc / Finalize\n  on the real implementation, with an animated dataflow diagram, byte-level\n  diff highlighting between steps, the extracted keystream `Z`, and the\n  verbatim draft-18 pseudocode alongside, highlighting whichever function ran.\n  An avalanche heatmap shows one flipped nonce bit diffusing to ~50% of the\n  768-bit state across the 16 setup updates.\n- **The nonce-reuse catastrophe (Exhibit 3)** — encrypt two messages under the\n  same key+nonce and recover the secret from `C_A ⊕ C_B ⊕ A`, with the\n  genuinely-leaked prefix marked. Because AEGIS folds plaintext into its state\n  (it is not a pure stream cipher), the first two blocks always leak while the\n  tail is protected — an honest, more interesting picture than a full two-time pad.\n- **Birthday-bound explorer (Exhibit 4)** — a slider comparing random-nonce\n  collision probability for 96-bit vs 256-bit nonces, the reason AEGIS-256 exists.\n- **Live throughput benchmark (Exhibit 5)** and the **AEGIS family table\n  (Exhibit 6)** covering AEGIS-128L, 256, and the 128X/256X parallel variants.\n\n## When to Use It\n- Understanding AES-based AEADs beyond AES-GCM and how nonce size changes deployment risk\n- Teaching sponge-like AEAD construction with a 6-block update function\n- Comparing nonce handling: 96-bit (AES-GCM) vs 256-bit (AEGIS-256)\n- Evaluating AEGIS-256 ideas for high-throughput protocols and systems\n- Not for interoperability-critical TLS production paths today; AEGIS is not yet a TLS cipher suite\n- Do NOT rely on this pure-TypeScript build as production crypto — it is a teaching demo, not native-speed hardened code\n\n## Live Demo\n\n**[systemslibrarian.github.io/crypto-lab-aegis-gate](https://systemslibrarian.github.io/crypto-lab-aegis-gate/)**\n\nThe page replays every official draft test vector through its own encrypt path in your browser, showing each result byte-for-byte, lets you encrypt and authenticate your own inputs with both the 128-bit and 256-bit tag variants, steps the AEGIS state machine beside the draft pseudocode, and demonstrates the nonce-reuse catastrophe as a live known-plaintext recovery.\n\n## What Can Go Wrong\n- AEGIS is a CFRG Informational draft, not a finalized RFC standard\n- Nonce reuse is catastrophic: same key+nonce across messages leaks plaintext relationships and breaks security\n- This implementation is pure TypeScript for education, not native-speed production crypto\n- Key commitment details differ by variant; review draft security considerations for protocol-level assumptions\n\n## Real-World Usage\n- Designed by Hongjun Wu and Bart Preneel as a CAESAR competition finalist and specified in draft-irtf-cfrg-aegis-aead through October 2025\n- Implemented across the ecosystem, including libsodium and the Zig standard library\n- Of active interest for high-throughput protocols and networking environments where AES hardware acceleration is available\n- Because it is still a CFRG Informational draft rather than a finalized RFC, treat specific compliance or regulatory claims seen elsewhere as needing independent verification\n\n## How to Run Locally\n\n```bash\ngit clone https://github.com/systemslibrarian/crypto-lab-aegis-gate\ncd crypto-lab-aegis-gate\nnpm install\nnpm run dev\n```\n\n## Related Demos\n- [crypto-lab-aes-modes](https://systemslibrarian.github.io/crypto-lab-aes-modes/) — AES block cipher modes and AEAD (GCM/CCM) behavior.\n- [crypto-lab-ascon](https://systemslibrarian.github.io/crypto-lab-ascon/) — lightweight sponge-based AEAD, the NIST Lightweight Cryptography standard.\n- [crypto-lab-chacha20-stream](https://systemslibrarian.github.io/crypto-lab-chacha20-stream/) — ARX stream cipher and the danger of nonce reuse.\n- [crypto-lab-shadow-vault](https://systemslibrarian.github.io/crypto-lab-shadow-vault/) — ChaCha20-Poly1305 authenticated encryption.\n- [crypto-lab-nonce-guard](https://systemslibrarian.github.io/crypto-lab-nonce-guard/) — AES-GCM-SIV nonce-misuse-resistant AEAD.\n\n---\n\n*One of 120+ browser demos in the [Crypto Lab](https://crypto-lab.systemslibrarian.dev/) suite.*\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-aegis-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-aegis-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fcrypto-lab-aegis-gate/lists"}