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

Less-than / Greater-than Comparisons #706

Open
schummd opened this issue Oct 2, 2024 · 1 comment
Open

Less-than / Greater-than Comparisons #706

schummd opened this issue Oct 2, 2024 · 1 comment

Comments

@schummd
Copy link

schummd commented Oct 2, 2024

It seems to be impossible to find a working solution for less-than / greater-than comparison for HE and SEAL does not seem to provide such functionality. Is there a working example exists anywhere using SEAL library that compares two ciphertexts? that is, produces something as simple as Enc(x1) < Enc(x2) ? true : false.

Related issues: #162, #397.

Papers considered:
Ilia Iliashenko and Vincent Zucca, Faster homomorphic comparison operations for BGV and BFV
Ayantika Chatterjee and Indranil Sengupta, Searching and Sorting of Fully Homomorphic Encrypted Data on Cloud
Florian Bourse, Olivier Sanders, and Jacques Traore, Improved Secure Integer Comparison via Homomorphic Encryption
Juan Garay, Berry Schoenmakers, and Jose Villegas, Practical and Secure Solutions for Integer Comparison

@kimlaine
Copy link
Contributor

kimlaine commented Oct 5, 2024

There is no obvious definite best way to implement a comparison. How to do it depends greatly on the parameters and our error tolerance. Therefore, it seemed prudent to leave this out from the core library and instead leave it for higher-level code. There is no example showing this because it is a pain to do and in my personal opinion in almost all cases doesn't make sense due to low accuracy and high noise cost. So if you find yourself needing a comparison, I would recommend considering all kinds of other options first before trying to implement it.

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

2 participants