Home▸Cryptography▸Garbled Circuits: Yao's Secure Two-Party Computation (2D)

🔐 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.

Cryptography2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-garbled-circuits-yao-lab ↗ Open standalone

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.

⚙ Under the hood

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.

cryptographysecure computationyao protocolgarbled circuitsoblivious transfermpc

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)