# Combining decryption function with transformation in a way that can't be reversed

I have a program implementing a function $$f$$, and want to find a pair of functions $$e$$ and $$h$$ such that $$h \circ e = f$$, but $$e^{-1}$$ cannot be recovered from $$h$$.

In other words, given some $$e$$-encrypted data, $$h$$ decrypts it and applies $$f$$. Knowing $$h$$ doesn't allow me to get back the unencrypted data, but rather only the result of $$f$$ applied to the unencrypted data.

• What you're asking is unclear - when I try to interpret it, what I get from the first paragraph appears to be contradicted by what's in the second. Perhaps you could clarify your question? BTW: are you asking about 'data security' (given the output $f(x)$, it is hard to compute...' or 'program objuscation' (for example: given a description of $f$ and $h$ is hard to write the program that computes $e^{-1}$?) Jun 30, 2023 at 22:09
• Obfuscation. I basically want to combine the decryption function $e^{-1}$ and program $f$ in a way that the decryption function can't be separated from it. Jun 30, 2023 at 22:14
• The problem as you stated it is trivially solved by $h(x)=x, e(x)=f(x)$. Even if you want $e$ to be invertible with a key you can do $e_k(x) = (\text{Enc}_k(x), f(x))$ and $h((c, x)) = x$. Jul 1, 2023 at 2:48