This is a post in COSIC’s Guide to Crypto! In this series, researchers from COSIC will be informally writing about different concepts in cryptography. Our aim is to introduce the reader to these concepts with explanations, illustrations and examples; so let’s get started!
What is obfuscation?
Informally speaking, an obfuscator should be something that takes as input the code of a program and outputs a new code, that is functionally equivalent, but does not reveal anything about the behavior of the program. A concrete example where you might want to use program obfuscation is the following scenario. You would like to provide some users with a program able to decrypt some encrypted ciphertexts, without revealing the secret key used for the decryption. A way to do that would be to obfuscate the decryption algorithm, with the secret key hard-coded in the program. This should produce a new program with the same functionality, i.e., a program decrypting the encrypted messages. As it has been obfuscated, this new program should not reveal anything about the secret key and you can then distribute it safely.
What is a program?
Before going any further into the formal definition of program obfuscation, let’s start by the important question of the representation of a program: is it a C/Python/assembly/… code, some pseudo-code, a Turing machine, etc? For us in this blog post, a program will be a circuit with binary input/output, and made of AND/OR/NOT gates. This is of course not the only way to represent a program, but this is the one that is commonly used in program obfuscation (a few works also consider Turing machines instead of circuits).
Virtual Black Box Obfuscation
We can now formally define what is a program obfuscator. An obfuscator \(\mathcal{O}\) is a probabilistic polynomial time algorithm that takes as input a circuit \(C\) and outputs a new circuit \(\mathcal{O}(C)\) such that
- (efficiency) the number of gates of \(\mathcal{O}(C)\) is not much larger than the number of gates of \(C\) (we want our obfuscated circuit to be almost as efficient as the original circuit);
- (functionality) for any input x, it holds that \(C(x) = \mathcal{O}(C)(x)\) (the obfuscated circuit computes the same function as the input circuit);
- (Virtual Black Box security) everything that an attacker can learn from \(\mathcal{O}(C)\) should also be learnable simply by making black box queries to the circuit (i.e., you are only allowed to send some \(x_i\)’s to a challenger and you get back the \(C(x_i)\)).

This definition is quite natural with the intuitive definition we gave at the beginning. The first two properties ensure that our obfuscated program is still efficient and still behaves as the input program. The third property is the security requirement, called Virtual Black Box (VBB) security. As the name suggests, this security notion ensures that the obfuscated circuit behaves as a black box, i.e., you should learn nothing more than the input/output behavior of your circuit. Going back to our introductory example, this is exactly what we wanted: the obfuscated circuit hides everything about the implementation of the circuit, including the hard-coded secret key.
Unfortunately for us, Barak et al. [BGI+01] showed in 2001 that VBB obfuscation is impossible to achieve. In other words, for any algorithm \(\mathcal{O}\), there will always exist a circuit \(C\) for which \(\mathcal{O}(C)\) reveals more than a black box access to the functionality (in particular, \(\mathcal{O}(C)\) always reveals a circuit computing the same function as \(C\), which is not the case of a black box access: this is the key observation of the impossibility proof of Barak et al.).
Are we done then? Obfuscation is not possible, that’s the end of this blog post?
You probably already guessed that the answer is no, not yet. First of all, the impossibility result of Barak et al. proceeds by constructing a class of circuits which they show cannot be obfuscated. However, if you are interested in another class of circuits which does not intersect with this class of “impossible to VBB-obfuscate circuits”, then you might still be able to obfuscate them. This is for instance the case of point functions (functions that are always zero, except at one point): we do have VBB obfuscators for this class of functions [Can97, Wee05]. We also have VBB obfuscators for some more sophisticated classes of functions, but all these classes share a common property: they are evasive, meaning that the functions of the classes almost always output \(0\), and that given a random function of the class, an attacker should not be able to find an input for which the output of the function is \(1\). In fact, all the VBB obfuscators we have so far we can be broken if the adversary succeeds in finding an input of the function for which the output is \(1\) (this does not contradicts the security of the obfuscator since we purposely chose classes of circuits for which this is hard to do).
In the rest of this blog post, we will be interested in obfuscation for all circuits and we will then consider VBB obfuscation to be impossible to achieve (but keep in mind that this might not be the case for some specific classes of functions).
Indistinguishability Obfuscation
The second reason why we are not yet done is because Barak et al. [BGI+01], after proving that VBB obfuscation was impossible, proposed a new notion of security for obfuscators that is not known to be impossible yet. This notion is called indistinguishability Obfuscation (iO for short). An iO satisfies the same efficiency and functionality requirements as before (there is no need to change them), but the security requirement now becomes
- (iO security) For any two circuits \(C_1\) and \(C_2\) computing the same function (i.e., \(C_1(x) = C_2(x)\) for all input \(x\)), it holds that no one can distinguish between \(\mathcal{O}(C_1)\) and \(\mathcal{O}(C_2)\) in a reasonable amount of time.

In other words, an iO obfuscator does not guarantee that secret information about the circuit will be hidden, but it guarantees that all the information one can obtain from \(\mathcal{O}(C)\) would have also been obtained from any other circuit \(C’\) computing the same function. Indeed, from \(C’\) one could compute \(\mathcal{O}(C’)\) (the algorithm \(\mathcal{O}\) is public) and by iO security, this would be indistinguishable from \(\mathcal{O}(C)\), meaning that \(\mathcal{O}(C’)\) should leak the same information as \(\mathcal{O}(C)\). In a sense, an iO provides “best-possible” obfuscation, i.e., it outputs the best of all equivalent circuits computing the same function (which might be not safe at all).
In the rest of this post, obfuscation will always refer to indistinguishability obfuscation (iO), as we have seen that the more natural notion of VBB obfuscation is impossible to achieve.
Is iO useful?
We have seen that iO is not known to be impossible, which is already a good start. But is iO any useful, as VBB obfuscation was? It’s not that clear at a first sight. If we come back to our example with the obfuscated decryption circuit, it is possible that any decryption circuit leaks the value of the secret key. In this case, obfuscating these circuits will never provide confidentiality of the secret key.
However, even if the definition might seem a bit strange and not super useful, it does have a huge amount of applications. For example, it has been shown that iO could be used to build witness encryption [GGSW13], functional encryption [GGH+13], deniable encryption [SW14], oblivious transfer [SW14], traitor tracing [BZ17], graded encoding schemes [FHHL18], and so on. There are so many primitives which can be constructed from iO that iO is sometimes called “crypto-complete”.
To be fair, iO alone does not imply all these constructions: we also need the existence of a one-way function (i.e., a function that is easy to compute and hard to invert). As one way functions can be obtained from standard assumptions (for instance assuming that factoring is hard, or under LWE), we usually forget about this part of the assumption and associate all the nice applications to iO.
Does iO exist?
Well…that’s the tricky question.
Let’s start with an easy case. If P = NP, then yes, iO provably exists. All other crypto would be broken, the world would be in chaos, but iO would exists!
Ok, so right now you should be wondering “Hold on, you said that iO was crypto-complete, but now you say that if P = NP, all crypto is broken but iO exists, that does not make sense”. That’s because, now, the discrete one-way function is becoming super important. If P = NP, this means one-way functions do not exist, and so all nice applications of iO will disappear with the one-way functions. We would be left with iO, and only iO.
Now that we have treated the easy case, let’s consider the more reasonable case where we don’t assume that P = NP. Then, the question of the existence of iO becomes much more complicated. The state of the art so far is that we have multiple candidate constructions, but none of them is based on standard assumptions (again, these assumptions are for instance the LWE assumption, the RSA assumption, the discrete logarithm assumption, etc).
The first candidate construction has been proposed in 2013 by Garg, Gentry, Halevi, Raykova, Sahai and Waters [GGH+13]. Since then, multiple other candidates have been proposed; some of them have been broken; some of them have been fixed; some of them have been improved; some of them have been broken again; and so on.
So the conclusion so far is that we have not found the ultimate iO construction yet. We are still experimenting a lot with this concept, trying to understand what seems safe and what is not. We did make some progress in the following three directions:
- We have some candidate constructions (from non standard assumptions) that are not yet known to be broken
- We have identified seemingly weaker cryptographic primitives that imply iO in a provable way (but we don’t know how to instantiate these primitives from standard assumptions) [Lin16, Agr19, AJLMS19]
- We have some weaker notions of obfuscation (i.e., the “iO security” requirement is replaced by a weaker requirement) which we can construct from standard assumptions and which still have some applications (even if not as many as iO would have) [WZ17, GKW17].
[Edit (08/09/2020): in the past weeks, we have seen a lot of very nice articles appearing on ePrint, constructing iO for all circuits from relatively standard assumptions (which has been, at least for me, a very big surprise). For instance, this article builds iO from the learning with errors (LWE) assumption, and some circular security assumptions. Even though circular security assumptions are not always considered standard assumptions, they have been widely used in the last 10 years to construct fully homomorphic encryption scheme.]
Do we have practical iO?
Something to keep in mind is that all candidate obfuscators we have for the moment are highly impractical (at least if we want them to work for any kind of circuit). This is not so surprising given the fact that we are already struggling to have something secure: efficiency is usually something we care about once we have a secure construction.
There have been a few attempts at implementing some candidate obfuscators. If we are interested in obfuscating some specific simple functions, we can have relatively practical obfuscators. This is the case, for instance, if we want to obfuscate conjunctions over 32 bits (see the table below). If we want to obfuscate more sophisticated circuits however, like for instance the AES circuit, the question becomes more about doability rather than practicability.
| Function obfuscated | Security level (bits) | Size obfuscated program | Obfuscation time | Evaluation time | References |
|---|---|---|---|---|---|
| \(x_1 \wedge x_4 \wedge\)\( \cdots \wedge x_{32}\) | 80 | 11.6 GB | 23.5 min | 77 ms | [CGM+17] |
| AES | 128 | 18 000 TB | \(10^{10}\) mult. of \(10^8\) bits integers (roughly 272 years on my laptop) |
[YLX17] |
Related topics
Obfuscation is an important concept that has been around in different areas of crypto. The point of view that was adopted in this blog post reflects the preoccupations of theoretic public-key cryptographers. Similar questions also arise in the context of symmetric key cryptography, where the name “white box crypto” is usually preferred to “obfuscation” (even though the concept behind is essentially the same). Finally, there are practical situations where we need to hide the code of a program, even though the theory tells us that we cannot do it in a provable way. In these cases, researchers have developed different tricks and techniques, and do whatever they can to try to render the code of the program as unintelligible as possible.
More on obfuscation
Obfuscation is still a recent area in cryptography, and there are no reference textbooks yet, but there are some surveys. If you want to know more about iO and the theoretic side of obfuscation, you can have a look at this survey by Horváth and Buttyán. If you are more interested into the practical aspects of obfuscation, have a look at this survey, by Xu, Zhou, Kang and Lyu.
References
[AJLMS19] Prabhanjan Ananth, Aayush Jain, Huijia Lin, Christian Matt and Amit Sahai. Indistinguishability Obfuscation Without Multilinear Maps: New Paradigms via Low Degree Weak Pseudorandomness and Security Amplification. CRYPTO, pages 284-332. Springer, 2019.
[Agr19] Shweta Agrawal. Indistinguishability obfuscation without multilinear maps: New methods for bootstrapping and instantiation. EUROCRYPT. Springer, 2019.
[BGI+01] Boaz Barak, Oded Goldreich, Rusell Impagliazzo, Steven Rudich, Amit Sahai, Salil Vadhan, and Ke Yang. On the (im) possibility of obfuscating programs. CRYPTO, pages 1–18. Springer, 2001.
[BZ17] Dan Boneh and Mark Zhandry. Multiparty key exchange, efficient traitor tracing, and more from indistinguishability obfuscation. Algorithmica, 79(4):1233–1285, 2017.
[Can97] Ran Canetti. Towards realizing random oracles: Hash functions that hide all partial information. CRYPTO, pages 455–469. Springer, 1997.
[CGM+17] Cheng Chen, Nicholas Genise, Daniele Micciancio, Yuriy Polyakov, and Kurt Rohloff. Implementing Token-Based Obfuscation under (Ring) LWE. ePrint, 2018.
[FHHL18] Pooya Farshim, Julia Hesse, Dennis Hofheinz, and Enrique Larraia. Graded encoding schemes from obfuscation. PKC, pages 371–400. Springer, 2018.
[GGH+13] Sanjam Garg, Craig Gentry, Shai Halevi, Mariana Raykova, Amit Sahai, and Brent Waters. Candidate indistinguishability obfuscation and functional encryption for all circuits. SIAM Journal on Computing, 45(3), 882-929, 2016.
[GGSW13] Sanjam Garg, Craig Gentry, Amit Sahai, and Brent Waters. Witness encryption and its applications. STOC, pages 467–476. ACM, 2013.
[GKW17] Rishab Goyal, Venkata Koppula, and Brent Waters. Lockable obfuscation. FOCS, pages 612–621. IEEE, 2017.
[Lin16] Huijia Lin. Indistinguishability obfuscation from constant-degree graded encoding schemes. EUROCRYPT, pages 28–57. Springer, 2016.
[SW14] Amit Sahai and Brent Waters. How to use indistinguishability obfuscation: deniable encryption, and more. STOC, pages 475–484. ACM, 2014.
[Wee05] Hoeteck Wee. On obfuscating point functions. STOC, pages 523–532. ACM, 2005.
[WZ17] Daniel Wichs and Giorgos Zirdelis. Obfuscating compute-and-compare programs under LWE. FOCS, pages 600–611. IEEE, 2017.
[YLX17] Dingfeng Ye, Peng Liu, and Jun Xu. How fast can we obfuscate using ideal graded encoding schemes. ePrint, 2017.




