Apex › Cryptography

Compute on secrets (Yao garbled circuits)

How two parties compute f(a,b) without revealing a or b. The garbler gives each wire two random keys (one for 0, one for 1) and, for each of a gate’s four input combinations, encrypts the output key under the two matching input keys — then shuffles the rows. The evaluator holds one key per input wire (its own via oblivious transfer), tries all four rows, and exactly one decrypts to the output key, which a final table decodes to the answer. Verified in node: over AND/OR/XOR/NAND and every input the decoded output equals the plaintext truth table and exactly one row opens (48000 evals, 0 mismatch). Pick a gate and the two secret bits.

More in Cryptography