🔐 Garbled Circuits: Yao's Secure Two-Party Computation (2D)
2D garbled-circuit lab: real per-wire keys, a hash-based cipher, and a shuffled truth table the evaluator decrypts row by row — pick a gate and real input bits and watch exactly one row succeed while every other value stays opaque.
This 2D companion runs the exact same garbling math as the 3D version — random 32-bit wire labels, a hash-based cipher, a shuffled four-row truth table and a checksum-tag decryption check — through a flat diagram built for reading the protocol rather than orbiting a scene: pick a gate and the two parties' real secret bits, then watch the evaluator try each shuffled row in turn, with hex ciphertexts on screen, until exactly one row decrypts and the output label lights up, while every other row and every unused label stays visibly opaque.
2D garbled-circuit lab with real per-wire keys, a hash-based cipher, and a shuffled truth table the evaluator decrypts row by row — pick a gate and real input bits and watch exactly one row succeed.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install