-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more examles? #16
Comments
Due to some force majeure factors,I cannot download the source code of Tinygarble . |
To compare two n-bit numbers we need to execute GC for n cycles. Here, your inputs are 16 bits (inputs are in HEX format). So we need to execute GC for 16 cycles by adding the argument Following are the correct commands:
For the second example:
Note that by default, Bob always receives the output. If you want Alice to receive the outputs, you should configure the |
can u give more examples about how to use all the functions of tinygarble, like compare, sum, aes, etc
i run the hamming example, and get the right result. but when i run compare, bob always get 01:
[ TinyGarble-master]# bin/garbled_circuit/TinyGarble --bob -p 1234 --log2std --scd_file bin/scd/netlists/compare_nbit_ncc.scd --input 0000
garbled_circuit_main.cpp:304 INFO: Connect Bob's client to Alice's server on 127.0.0.1:1234
garbled_circuit_high_mem.cpp:118 INFO: Bob transfer labels time (cc) = 52467460 (cc/bit) = 5.24675e+07
garbled_circuit_high_mem.cpp:705 INFO: Bob communication time (cc) = 8348
garbled_circuit_high_mem.cpp:706 INFO: Bob evaluation time (cc) = 11216
garbled_circuit_main.cpp:319 INFO: Bob's output = 01
garbled_circuit_main.cpp:320 INFO: Total Bob time (cc) = 52879668
01
[ TinyGarble-master]# bin/garbled_circuit/TinyGarble --alice -p 1234 --log2std --scd_file bin/scd/netlists/compare_nbit_ncc.scd --input 0001
garbled_circuit_main.cpp:268 INFO: Open Alice's server on port: 1234
garbled_circuit_high_mem.cpp:75 INFO: Alice transfer labels time (cc) = 53173668 (cc/bit) = 5.31737e+07
garbled_circuit_high_mem.cpp:421 INFO: Non-secret skipped non-XOR gates = 0 out of 1 (0%)
garbled_circuit_high_mem.cpp:427 INFO: Total garbled non-XOR gates = 1
garbled_circuit_high_mem.cpp:430 INFO: Alice communication time (cc) = 29092
garbled_circuit_high_mem.cpp:431 INFO: Alice garbling time (cc) = 17328
garbled_circuit_main.cpp:282 INFO: Alice's output = 0
garbled_circuit_main.cpp:283 INFO: Total Alice time (cc) = 53772364
0
[ TinyGarble-master]# bin/garbled_circuit/TinyGarble --bob -p 1234 --log2std --scd_file bin/scd/netlists/compare_nbit_ncc.scd --input 0002
garbled_circuit_main.cpp:304 INFO: Connect Bob's client to Alice's server on 127.0.0.1:1234
garbled_circuit_high_mem.cpp:118 INFO: Bob transfer labels time (cc) = 100081704 (cc/bit) = 1.00082e+08
garbled_circuit_high_mem.cpp:705 INFO: Bob communication time (cc) = 8056
garbled_circuit_high_mem.cpp:706 INFO: Bob evaluation time (cc) = 9036
garbled_circuit_main.cpp:319 INFO: Bob's output = 01
garbled_circuit_main.cpp:320 INFO: Total Bob time (cc) = 100558580
01
[ TinyGarble-master]# bin/garbled_circuit/TinyGarble --alice -p 1234 --log2std --scd_file bin/scd/netlists/compare_nbit_ncc.scd --input 0001
garbled_circuit_main.cpp:268 INFO: Open Alice's server on port: 1234
garbled_circuit_high_mem.cpp:75 INFO: Alice transfer labels time (cc) = 100223568 (cc/bit) = 1.00224e+08
garbled_circuit_high_mem.cpp:421 INFO: Non-secret skipped non-XOR gates = 0 out of 1 (0%)
garbled_circuit_high_mem.cpp:427 INFO: Total garbled non-XOR gates = 1
garbled_circuit_high_mem.cpp:430 INFO: Alice communication time (cc) = 23780
garbled_circuit_high_mem.cpp:431 INFO: Alice garbling time (cc) = 15428
garbled_circuit_main.cpp:282 INFO: Alice's output = 0
garbled_circuit_main.cpp:283 INFO: Total Alice time (cc) = 100782820
0
The text was updated successfully, but these errors were encountered: