Consider an outsourced database to an untrusted cloud (think CryptDb), the question is how to compute a function $f(.)$ on the data.
I think I understand how (fully or partially) homomorphic encryption works in this situation:
- Encrypt the input.
- Outsource both the ciphertexts and the (public) function.
- The cloud evaluates the functions on ciphertexts, results are also in ciphertexts.
How would garbled circuit (GC) be used in this case? Is it:
- Garble the circuit and upload to the cloud.
- Garble the inputs and upload to the cloud (ciphertexts).
- The cloud evaluates the circuit. Results are in plaintext.
What are the trade-offs between these two approaches, supposing I don't care whether the results are in the clear or encrypted? It looks like both can be used to compute arbitrary functions over ciphertexts.
But if GC can be used only once (true?), is it possible to use the same garbled inputs for more than one GC, or one needs to construct a (GC,garbled input) pair for every single evaluation of the function $f(.)$?