-
Notifications
You must be signed in to change notification settings - Fork 146
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: comparison less or equal then #1775
base: main
Are you sure you want to change the base?
Conversation
Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @Tuditi on file. In order for us to review and merge your code, please sign:
If you already signed one of this document, just wait to be added to the bot config. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs
Outdated
Show resolved
Hide resolved
tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs
Outdated
Show resolved
Hide resolved
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tuditi.
|
let (cks, sks) = KEY_CACHE.get_from_params(param, IntegerKeyKind::Radix); | ||
|
||
let scalar = 0 as u64; | ||
let ct: BaseRadixCiphertext<Ciphertext> = sks.create_trivial_radix(scalar, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ct: RadixCiphetext
instead
@@ -398,6 +398,38 @@ fn integer_unchecked_scalar_comparisons_edge(param: ClassicPBSParameters) { | |||
} | |||
} | |||
|
|||
// Tests whether equality holds for greater/less or equal than, but fails for greater/lesser than. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is no longer really valid
fn integer_comparisons_for_empty_blocks(param: ClassicPBSParameters) { | ||
let (cks, sks) = KEY_CACHE.get_from_params(param, IntegerKeyKind::Radix); | ||
|
||
let scalar = 0 as u64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scalar should be picked at random, and in the assert compare the decrypted value with the clear comparison result e.g. scalar < 0
create_parametrized_test!(integer_comparisons_for_empty_blocks { | ||
PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create_parametrized_test!(integer_comparisons_for_empty_blocks { | |
PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, | |
}); | |
create_parametrized_test!(integer_comparisons_for_empty_blocks) |
PR content/description
There was an equality sign missing in the scalar comparisons.
Check-list: