-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi, I've noticed an issue with the MPC compiler on the mpc_aws branch.
A combination of bit shifts and multiplications leads to unexpected results in certain cases.
Here is an example program:
int main(__attribute__((private(0))) int x){
int y = (0 << 0);
// should be 0
return ((x * y) << 0);
}Executing this results in a seemingly random number if we use the css selection scheme.
Compilation command:
export CARGO_MANIFEST_DIR="$PWD"; ./target/release/examples/circ --parties 2 examples/C/mpc/program.c mpc --cost-model "empirical" --selection-scheme css
Execution command:
/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
Metadata
Metadata
Assignees
Labels
No labels