HomeCryptographyGarbled Circuits: Yao's Secure Two-Party Computation

🔐 Garbled Circuits: Yao's Secure Two-Party Computation

Explore how Yao's garbled circuit protocol lets two parties jointly compute a function over private inputs without revealing anything beyond the result, by encrypting a boolean circuit's truth tables gate by gate.

Cryptography3DModerate60 FPS
garbled-circuits-yao-lab ↗ Open standalone

The simulation shows a small boolean circuit being garbled gate by gate, with truth tables encrypted and shuffled, followed by an evaluator decrypting exactly one row per gate to compute a result while every intermediate wire value stays hidden.

🔬 What It Demonstrates

The simulation shows a small boolean circuit being garbled gate by gate, with truth tables encrypted and shuffled, followed by an evaluator decrypting exactly one row per gate to compute a result while every intermediate wire value stays hidden.

🎮 How to Use

Pick input bits for each party, click through garbling to see randomized ciphertexts appear on every gate, then step through evaluation to watch labels propagate until the final output is decoded.

💡 Did You Know?

The free-XOR optimization lets XOR gates be evaluated with zero encryption and zero communication, so real-world garbled circuits are often designed to push as much logic as possible into XOR gates and minimize the number of AND gates.

⚙ Under the hood

Explore how Yao's garbled circuit protocol lets two parties jointly compute a function over private inputs without revealing anything beyond the result, by encrypting a boolean circuit's truth tables gate by gate.

cryptographysecure computationyao protocolgarbled circuitsoblivious transfermpcboolean circuitsprivacy

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)