esonghori / TinyGarble

TinyGarble: Logic Synthesis and Sequential Descriptions for Yao's Garbled Circuits
GNU General Public License v3.0
119 stars 29 forks source link

Example not working #14

Open jagsousa opened 5 years ago

jagsousa commented 5 years ago

Hi,

I just tried compiling/running the code, but the provided example fails.

./TinyGarble --alice --scd_file bin/scd/netlists/hamming_32bit_32cc.scd --input FF55AA77 --log2std

garbled_circuit_main.cpp:268 INFO: Open Alice's server on port: 1234
scd.cpp:49 ERROR: can't open bin/scd/netlists/hamming_32bit_32cc.scd
garbled_circuit.cpp:64 ERROR: Error while reading scd file: bin/scd/netlists/hamming_32bit_32cc.scd
garbled_circuit_main.cpp:279 ERROR: GarbleStr(scd_file_address, p_init_str, p_input_str, init_str, input_str, clock_cycles, output_mask, terminate_period, output_mode, disable_OT, low_mem_foot, &output_str, connfd) failed

Note The ctest -Vworks!

Any idea what could be the problem?

siamumar commented 5 years ago

The relative location for the SCD file is wrong. If you are running it as "./TinyGarble", that means you are in the "bin/garbled_circuit" directory. So the correct location is "../scd/netlists/hamming_32bit_32cc.scd".

Also, as the name suggests, this scd file needs to be run for 32 cycles. Please use "-c 32".

./TinyGarble --alice --scd_file ../scd/netlists/hamming_32bit_32cc.scd --input FF55AA77 -c 32 --log2std