ECHO: Efficient Covertly-Secure Three-party Computation with Applications to Private Machine Learning
This repository contains the experimental code for the paper ''ECHO: Efficient Covertly-Secure Three-party Computation with Applications to Private Machine Learning.'' It provides implementations and benchmarking harnesses for the protocols evaluated in the paper across arithmetic and binary settings, optimized for different network and end-to-end objectives.
-
Semi-honest protocols:
- ABY3
- ASTRA
-
Covert protocols:
- Covert MAC (Arithmetic, optimized for end-to-end)
- Covert MAC (Arithmetic, optimized for online)
- Covert DZKP (Arithmetic, optimized for WAN)
- Covert ABFL (Binary, optimized for end-to-end)
- Covert FLNW (Binary, optimized for online)
- Covert DZKP (Binary, optimized for WAN)
-
Malicious protocols:
- SpdzWise Ring (Arithmetic, E2E optimal)
- FLNW17+SPDZ2k (Arithmetic, Online optimal)
- LEDH+24 (Arithmetic, WAN optimal)
- FLNW17 (Binary, E2E optimal)
- ABFL+17 (Binary, Online optimal)
- LDHH+23 (Binary, WAN optimal)
First, set up the MP-SPDZ environment as described in README-MP_SPDZ.md.
Note: when running WAN benchmarks, you can use the traffic-control.sh script to simulate the network condition.
# Add a new network condition
./traffic-control.sh add <bandwidth> <latency>
# Remove a network condition
./traffic-control.sh clearUse make to compile the benchmark executables:
make mul-benchmark.x and-benchmark.x and-benchmark2.x -jmake replicated-ring-party.x sy-rep-ring-party.x echo-prep-party.x echo-party.x covert-mac-party.x astra-prep-party.x astra-party.x -jUse the Python runner to orchestrate experiments and collect logs/averages with one command.
Single machine (spawns all required parties per experiment):
python3 run-NN.py # run all default experimentsCommon flags:
--round,--num_gates,--batch_size,--binary_batch_size: override global parameters--host,--port: network host/port passed into the benchmark binaries--repeats: number of runs per experiment (default: 3)--outdir: output directory (default:logs/<timestamp>)
The commands below illustrate how to benchmark each protocol family. Replace the environment variables as needed:
ROUNDS: number of protocol iterations/roundsHOST: hostname or IP of the party 0 processPORT_BASE: base port number (ports will be derived per party)BATCH_SIZE: arithmetic batch sizeBINARY_BATCH_SIZE: binary batch size
Run each command with party id 0/1/2 in separate terminals or machines as appropriate.
- ABY3
./mul-benchmark.x 0 semi -r $ROUNDS -h $HOST -pn $PORT_BASE- ASTRA
./mul-benchmark.x 0 astra -r $ROUNDS -h $HOST -pn $PORT_BASE (on Machine 0, 1, 2)
./mul-benchmark.x 0 astra-on -r $ROUNDS -h $HOST -pn $PORT_BASE (on Machine 1, 2. Where machine 1 uses party id=0 and machine 2 uses party id=1)- Covert MAC (Arithmetic, E2E)
./mul-benchmark.x 0 spdz -r $ROUNDS -h $HOST -pn $PORT_BASE -S 12 -b $BATCH_SIZE- Covert MAC (Arithmetic, Online)
./mul-benchmark.x 0 offline -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE -q 16 -lm 2
./mul-benchmark.x 0 online -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE- Covert DZKP (Arithmetic, WAN)
./mul-benchmark.x 0 cov-dzkp -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE -q 16 -lm 2This protocol automatically uses a 12-bit CCS ring gap.
- Covert ABFL (Binary, E2E)
./and-benchmark.x 0 cov-trip -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- Covert FLNW (Binary, Online)
./and-benchmark2.x 0 offline -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE
./and-benchmark2.x 0 online -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- Covert DZKP (Binary, WAN)
./and-benchmark.x 0 cov-dzkp -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- SpdzWise Ring (Arithmetic, E2E optimal)
./mul-benchmark.x 0 spdz -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE- FLNW17 (Arithmetic, Online optimal)
./mul-benchmark.x 0 mal -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE- LEDH+24 (Arithmetic, WAN optimal)
./mul-benchmark.x 0 ccs -r $ROUNDS -h $HOST -pn $PORT_BASE -b $BATCH_SIZE -lm 40 -q 16This protocol automatically uses a 64-bit CCS ring gap.
- FLNW17 (Binary, E2E optimal)
./and-benchmark.x 0 mal -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- ABFL+17 (Binary, Online optimal)
./and-benchmark.x 0 abfl -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- LDHH+23 (Binary, WAN optimal)
./and-benchmark.x 0 uss -r $ROUNDS -h $HOST -pn $PORT_BASE -bb $BINARY_BATCH_SIZE- The
0in the example commands denotes the party id (0/1/2). Launch one instance per party. - Some protocols require parameter tuning (
-S,-q,-lm) and small source edits as noted above inProtocols/Ccs24MC.h. - Ensure networking between parties is configured (firewall, NAT traversal) according to your deployment.