-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi, I'm trying to compile to mpc on the mpc_aws branch and noticed that the division operator sometimes does not work as expected with some of the options for --selection-scheme (for example "smart_lp").
Here is an example (a is set to 1 in the input txt file):
int main(__attribute__((private(0))) int a) {
return 42 / (1 + (a - a)); // or (a * 2), (a * a) etc
}Build command (run from the CirC root dir):
export CARGO_MANIFEST_DIR="$PWD"; ./target/release/examples/circ --parties 2 examples/C/mpc/program.c mpc --cost-model "empirical" --selection-scheme "smart_lp"
Execution:
/path/to/ABY/build/bin/aby_interpreter -m mpc -f ./scripts/aby_tests/tests/program_c -t ./scripts/aby_tests/test_inputs/program.txt -r 0 & /path/to/ABY/build/bin/aby_interpreter -m mpc -f ./scripts/aby_tests/tests/program_c -t ./scripts/aby_tests/test_inputs/program.txt -r 1
This results in a seemingly random number (a different one on every execution).
The error seems to only occur if the right operand involves a computation with a runtime value.
I also tried different selection schemes. It works with e.g. "lp", but fails with others such as "css" or "smart_glp".
Are some selection schemes not safe to use with certain operations, or am I using the toolchain wrong?
Thank you for looking into this!
Metadata
Metadata
Assignees
Labels
No labels