# Extracting/learning info from fully homomorphic schemes

On the BFV fully homomorphic scheme, given a polynomial secret key, we can encrypt polynomial plaintexts and generate polynomial ciphertexts.

So, for example, if we have 2 ciphertexts, we can compare them with the less than function, which is 1 if the left polynomial coefficient is less than or equal to the right one, and 0 otherwise. HOWEVER, the result is also an encrypted polynomial, which when decrypted, gives these 0 and 1 numbers.

The question is: how to extract information? How to learn from encrypted data without decrypting it?

Suppose I want to store encrypted latitudes of clients, and learn if they traveled more than 100km in one day. How would I extract such information? I can certainly calculate the difference between the 2 latitudes, but it would be an encrypted difference. Then what?

• No, you cannot, to learn you have to decrypt. If you look at the FHE Circuits you can see that one has to use the encrypted information to construct the circuits and finally decrypt. It makes the circuits larger, and nearly impossible to build sorting algorithms like Quicksort. In the end, this is the nice property of the FHE that we wanted... Jan 21, 2022 at 8:47
• If you can learn without decrypting, aren't you breaking the scheme? Then what? What do you want to achieve? Jan 21, 2022 at 8:48
• @kelalaka indeed, but I've seen machine learning stuff. Is it such that the server learns in encrypted form (which is useless for him) but deliver a learned stuff for the client to decrypt? Jan 21, 2022 at 11:39
• Yes, you encrypt and send the server and the server operates and gives you the result in the encrypted form. Jan 21, 2022 at 11:44
• No for AI to learn, the ciphertexts are indistinguishable from random. Cryptography is more ready against AI years ago. Jan 21, 2022 at 16:43