Skip to content
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

[EzPC] Substraction with secret signed datatypes returns wrong result #233

Open
sebw42 opened this issue Feb 18, 2025 · 0 comments
Open

Comments

@sebw42
Copy link

sebw42 commented Feb 18, 2025

Hello, I've noticed some weird behaviour when using the secret signed datatypes.
Here is an example:

def void main(){
	int32_al x = 0;
	int32_al y = 42;
	int32_al z = x - y;
	output(CLIENT, z);
}

This prints Value of z: 4294967254.
If we use the public signed type int32_pl, we get the expected result -42.
The error also occurs when using boolean shares (int32_bl).

These are my compilation and execution steps:

./ezpc.sh test_programs/program.ezpc --bitlen 32
./compile_aby.sh test_programs/program0.cpp
./program0 -r 0 & ./program0 -r 1

Is this behaviour expected?
Thank you for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant