# Is there such a concept as „encrypted operations“ on cyphertext? [duplicate]

Homomorphic encryption allows computation of (arithmetic or boolean) operations on ciphertext with the result being another ciphertext.

In that case...

• client A encrypts p_in
• A sends encrypted data c_in to the computer C
• C performs a set of known (from perspective of C) operations f_p(c_in) = c_out
• A is able to decrypt c_out to p_out
• due to the homomorphic property f_p(c_in) = c_out => f_p(p_in) = p_out

Is there a concept that would allow computation of "encrypted" operations on ciphertext?

• client A encrypts p_in to c_in and f_p to f_c
• A sends encrypted data c_in and encrypted operations f_c to the computer C
• C performs a set of (semantically) unknown (from perspective of C) operations f_c(c_in)
• now from here there are two options:
1. f_c(c_in) = c_out: the result is a ciphertext as well
2. f_c(c_in) = p_out: the result is a plaintext

While 1. is a strict "enhancement" to homomorphic encryption, 2. has different implications and limitations.

• the encrypted operations ENC_f(f_p, s) = f_c should not be (too) dependent on p_in or c_in
• instead ENC_f(f_p, s) = f_c and ENC_p(p_in, s) = c_in should (somehow) have a shared secret s
• the whole concept becomes less useful the more conditions for p_in / c_in are in f_c
• the plaintext result of f_c(c_in)is known to C so f_c should not reveal too much about its input, e.g.
• if f_c would be a SUM or AVG function it could be abused by C to find out more about other c* =/= c_in
• on the other hand if f_c is something like f_c(c_in) = p_in < 1300 since the only output is either true or false and neither (semantics of the) operation nor (semantics of the) input is known to C there seems to be no issue with C obtaining more information that they should

Is there any concept known with any type of operations (logic gates...) that would allow for such an application (either 1. or 2.)? Or is it maybe proven that such a concept can or cannot exist?

• – kelalaka Apr 20 '20 at 16:12
• Thanks, I was not aware of those concepts. – Dejan Apr 20 '20 at 20:42
• @Dejan Please respond to the last request. If it does fully answer your question then please indicate that. Otherwise please comment on why it doesn't. – Maarten Bodewes Apr 20 '20 at 23:16
• Yes, thank you. That does indeed answer my question. – Dejan Apr 22 '20 at 7:29