Skip to content

Conversation

@themighty1
Copy link
Collaborator

This PR adds the three-halves garbling scheme which (compared to the half-gates scheme) improves communication complexity by ~25% at the cost of computational overhead.

Native evaluator shows ~10% slowdown:

half-gates:

evaluator/st/1M         time:   [208.63 ms 208.81 ms 208.99 ms]
                        thrpt:  [4.8080 Melem/s 4.8120 Melem/s 4.8162 Melem/s]

evaluator/mt/1M         time:   [48.138 ms 49.133 ms 49.820 ms]
                        thrpt:  [20.169 Melem/s 20.451 Melem/s 20.873 Melem/s]
three-halves:

evaluator/st/1M         time:   [226.17 ms 226.28 ms 226.40 ms]
                        thrpt:  [4.4382 Melem/s 4.4405 Melem/s 4.4427 Melem/s]
                
evaluator/mt/1M         time:   [52.164 ms 52.895 ms 53.831 ms]
                        thrpt:  [18.666 Melem/s 18.996 Melem/s 19.262 Melem/s]

WASM garbler shows ~30% slowdown:

=== garble ===
Name                                      Median (ms)  Per-iter (us)  AND gates/s
----------------------------------------------------------------------------------
garble/half_gates_garbler_1m                 31159.06      308661.15       3.26M
garble/three_halves_garbler_1m               43586.99      437999.43       2.29M

@sinui0
Copy link
Collaborator

sinui0 commented Jan 5, 2026

This is a very large PR. Can we start with just the core crate?

@themighty1
Copy link
Collaborator Author

superceded by #367

@themighty1 themighty1 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants