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

fix(integer): handle trivial ct in if_then_else #620

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

tmontaigu
Copy link
Contributor

@tmontaigu tmontaigu commented Oct 10, 2023

if_then_else uses two calls to zero_out_if.

In zero_out_if, if the condition block given has a degree of 0
then it would return 0, without calling the predicate function.

This is not correct, as its the predicate function that
gives whether the output should be 0 or the original ciphertext.

Which meant that if if_then_else received a condition with a
degree of 0, it would always return 0.

Check-list:

  • Tests for the changes have been added (for bug fixes / features)

@cla-bot cla-bot bot added the cla-signed label Oct 10, 2023
@github-actions
Copy link

@slab-ci cpu_fast_test

if_then_else uses two calls to zero_out_if.

In zero_out_if, if the condition block given has a degree of 0
then it would return 0, without calling the predicate function.

This is not correct, as its the predicate function that
gives whether the output should be 0 or the original ciphertext.

Which meant that if if_then_else received a condition with a
degree of 0, it would always return 0.
@tmontaigu tmontaigu force-pushed the fix-trivial-if-then-else branch from 31e7875 to 7e1a1ba Compare October 10, 2023 10:54
@github-actions
Copy link

@slab-ci cpu_fast_test

Copy link
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@github-actions
Copy link

Pull Request has been approved 🎉
Launching full test suite...
@slab-ci cpu_test
@slab-ci cpu_integer_test
@slab-ci cpu_multi_bit_test
@slab-ci cpu_wasm_test
@slab-ci csprng_randomness_testing

@tmontaigu tmontaigu merged commit cab7439 into main Oct 10, 2023
18 checks passed
@tmontaigu tmontaigu deleted the fix-trivial-if-then-else branch October 10, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants