Skip to main content
1 of 2
Post Made Community Wiki
Scott Aaronson
  • 9.8k
  • 5
  • 65
  • 71

One of my favorite "simple ingenious constructions" in theoretical computer science from the past few decades is Barak et al.'s construction of a computer program that can never be "obfuscated": that is, for which having the code of the program is always more useful than just being able to run the program as a black box.

Such a program is constructed as follows. First, choose three "secret" n-bit strings a,b,c uniformly at random (I'll assume they're all nonzero). Then consider a program P with the following behavior:

P(0,x) = b if x=a, or 0n otherwise

P(1,<Q>) = c if Q(0,a)=b, or 0n otherwise (where Q is some other program and <Q> is its code)

Now suppose you want to learn the secret string c. If all you can do is feed various inputs to P and observe the outputs, then it's not hard to see that the best you can possibly do is "brute-force search": on average, you'll have to try ~2n inputs to P before you see any output other than 0n. By contrast, if someone gives you the actual code for P, then no matter how badly they've "obfuscated" that code, you can always learn c with just a single access. The trick, much like in Turing's original proof of the unsolvability of the halting program, is to feed P its own code as input:

P(1,<P>) = c.

Scott Aaronson
  • 9.8k
  • 5
  • 65
  • 71