[Say I want to outsource the computation of $y=f(x)$ without revealing information about $x$, $y$, or $f$. I thought I'd have to combine homomorphic encryption with some obfuscation $\mathcal{O}$, passing along encrypted data $\mathsf{enc}(x)$ and obfuscated program $\mathcal{O}(f)$ to be homomorphically evaluated $\mathsf{eval}(\mathsf{enc}(x),\mathcal{O}(f))$.
However, the following comment from Section 1.3.1 of Computing on the edge of chaos: Structure
and randomness in encrypted computation
In addition to encrypting my data, I can encrypt my query f (under the same pk). More
broadly, I can encrypt a program P , so that the cloud can execute P on unencrypted data
or data encrypted under the same pk, and output the encrypted result. At first, this fact may
seem surprising, but it is just an application of Turing’s idea that a program can be viewed
just another type of data to be processed by a universal Turing machine. (In more modern
terms, a program can be read and executed by an interpreter program.)
makes it clear that at least in theory one could encrypt a program (e.g. my_prog.py
) and homomorphically evaluate an interpreter/processor/compiler (e.g. python
) on the encrypted source.
My question (assuming everything above makes sense) is whether or not this has been done in some form, either abstractly or more concretely. For instance encrypt the string 2*3+5
and homomorphically evaluate a calculator that takes the input string 2*3+5
, parses, evaluates, and outputs 11
.
[Edit: I guess the calculator example in the Google transpilier does something along these lines.]