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.

  • 1
    $\begingroup$ 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}$?) $\endgroup$
    – poncho
    Jun 30, 2023 at 22:09
  • $\begingroup$ 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. $\endgroup$
    – James
    Jun 30, 2023 at 22:14
  • 2
    $\begingroup$ 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$. $\endgroup$ Jul 1, 2023 at 2:48

1 Answer 1


I believe you are describing Functional Encryption. I'm not very familiar with the literature, but the linked Wikipedia page and a search on ePrint might be good starting points.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.