Comparison without Private key

I am working on a project that involves implementing a database for homomorphic encryption. Are there methods available to compare ciphertexts without using the private key to decrypt the result?

Yes, there are quite a few. Read these papers and (their counterparts in the related work section) for some examples.

  1. Efficient Homomorphic Comparison Methods with Optimal Complexity
  2. Faster homomorphic comparison operations for BGV and BFV
  3. Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping

Thank you so much for your response. It seems that the OpenFHE library allows for comparison operations between ciphertexts. However, to obtain and interpret the result of the comparison, you still need to use the private key to decrypt it. Is that correct?

You do not have to immediately decrypt the result of the comparison, but you can use it further in encrypted computations. But at the very end, you do need to perform decryption in order to see the result.

If you are referring to performing operations over ciphertexts and directly obtaining the result in the clear, read more about Functional Encryption. However, the functionalities that can be practically obtained with current results of functional encryption are not as general as what can be achieved with FHE, and are not implemented in OpenFHE.

Thank you so much for your time and help. I really appreciate it.