I have been reading the question "What is a white-box implementation of a cryptographic algorithm?" and it led to this short article / Q&A which states in question 2:

Q2: What is the difference with code obfuscation?

Related and complementary techniques for protecting software implementations but with different security goals include code obfuscation and software tamper- resistance. Code obfuscation is aimed at protecting against the reverse engineering of a (cryptographic) algorithm while software tamper-resistance is aimed at protecting against modifications of the code. All these techniques have however in common that the resulting implementation must remain directly executable.

Now, it shows the differences between obfuscation and temper-resistance, but it says nothing about the difference between white-box cryptography and code obfuscation.

So I guess my question is: are those two completely different things? Or is code obfuscation a way to achieve white-box cryptography? If the second is true, are there other ways to achieve it?


3 Answers 3


As you suspected, there's a very close relationship between white-box cryptography and obfuscation. (Good instincts!) White-box cryptography is basically all about obfuscating an encryption implementation.

White-box cryptography is obfuscation of crypto code. Imagine that you took an AES implementation, picked a random AES key, and then hardcoded that AES key into the code. Obviously, publishing this code would be insecure, because it would immediately reveal the AES secret key. It might be nice if we could obfuscate the resulting code, hardcoded key and all, in a way that preserves its function but hides the encryption key. In other words, the result should be obfuscated code, which still computes the same function, but no longer reveals the AES key. This is exactly what "white-box cryptography" does -- or, at least, what it tries to achieve.

So you can view white-box cryptography as a special-purpose obfuscation method, designed for obfuscating a very specific kind of code.

More background. There's a lot more that can be said about white-box cryptography. For instance, many published methods for white-box cryptography have been broken; both white-box AES and white-box DES have been cryptanalyzed and are now known to be insecure. As far as I know, every published approach to white-box cryptography has subsequently been broken, so it is not known whether it is possible to achieve the goals of white-box cryptography securely.

Here is an outstanding overview and introduction to white-box cryptography:

Marc Joye, On White-Box Cryptography. Security of Information and Networks, 2008.

  • 2
    $\begingroup$ do you mean white-box cryptography is not a specific method, but some approach? Or some key hiding methods will be considered white-box cryptography and some won't? $\endgroup$
    – MByD
    Aug 12, 2011 at 20:31
  • $\begingroup$ @MbyD, yes, that seems about right. In the broadest sense, white-box cryptography is a goal (a security notion we might want to achieve). There have also been some proposed schemes/algorithms for achieving this goal. I'm frequently guilty of conflating "goal" and "scheme", partly because the original papers introducing the concept both defined the general goal and then proposed some schemes intended to achieve that goal. I suspect I've caused confusion by my sloppy use of "white-box cryptography" for both goal and a particular scheme intended to achieve that goal; sorry about that. $\endgroup$
    – D.W.
    Aug 12, 2011 at 22:15
  • $\begingroup$ BTW, regarding the last link - that's exactly where my question came from... $\endgroup$
    – MByD
    Aug 14, 2011 at 9:20
  • $\begingroup$ @D.W. - It's 4.5 years later. Does your answer need any updating or has the state basically stayed the same? Thanks! $\endgroup$ Dec 22, 2015 at 20:25
  • $\begingroup$ @NeilSmithline, everything I wrote still seems valid. There have of course been new results and new developments in obfuscation since then, but nothing that invalidates my answer, as far as I know. For instance, you might enjoy reading about indistinguishability obfuscation. $\endgroup$
    – D.W.
    Dec 22, 2015 at 20:37

White-box cryptography is aimed at protecting secret keys from being disclosed in a software implementation.

A cryptography algorithm gets the key and plaintext(encryption mode)/ciphertext(decryption mode) as input and outputs the ciphertext/plaintext. A white box implementation of the cryptography algorithm gets just plaintext/ciphertext as input and outputs the ciphertext/plaintext. The key embedded in the algorithm(merged on S-boxes or something else).

White-Box Cryptography and an AES Implementation is a way to implement a white-box implementation of AES.

In code obfuscation we should protect some parts of the code. For example to protecting an algorithm, we can encrypt the algorithm or some key features of the algorithm. Now, the query is, how can we protect the encryption key? Because if someone have the key can decrypt the algorithm. white-box implementation is the Answer.

So, code obfuscation is NOT a way to achieve white-box cryptography. White-box cryptography used in code obfuscation.

  • $\begingroup$ Thanks for the answer, I need some time before I fully understand to really comment, could you please re-phrase the first sentence of the last section? It is not clear to me what you are saying there... Thanks! $\endgroup$
    – MByD
    Aug 12, 2011 at 20:10
  • $\begingroup$ Excuse me. I re-phrased it. $\endgroup$
    – ir01
    Aug 13, 2011 at 1:07
  • 2
    $\begingroup$ the first paragraph of this answer is really good however the last sentence is just confusing for me $\endgroup$
    – laycat
    Jan 19, 2015 at 12:04
  • $\begingroup$ Do you mean that code obfuscation is not a way to achieve white-box cryptography. This is because in code obfuscation, the key is not necessary embedded in the function? $\endgroup$
    – laycat
    Jan 19, 2015 at 12:25

White-box cryptography techniques are aimed at protecting software implementations of cryptographic algorithms against key recovery.

Code obfuscation is aimed at protecting against the reverse engineering of a (cryptographic) algorithm.

First of all, obfuscation methods can be divided into engineering (code) obfuscation and cryptographic obfuscation.

Similarly, the community seeks solutions to achieve the white-box goal both in theoretical and practical approaches. And both of these two ways are related to obfuscation techniques in their field.

On one hand, theoretically, there is neither possibility proof for WBC nor proven secure constructions. But it seems WBC is strongly related to the cryptographic obfuscation notion, which has been proven impossible for general programs in the virtual black-box model. However, a weaker notion called indistinguishable obfuscation (iO) seems to exist and has been extensively studied in the literature. Unfortunately, the theorist has not like WBC with iO so far.

On the other hand, practically, all the public construction has been broken by some generic analyses (e.g., differential computation analysis and fault attacks). The market can not wait for the results from the academic side, hence, a numerous of "home-made" WBC implementations designed secretly have been deployed in applications, such as mobile payment, password protection, and digital distribution. These so-called WBC implementations are usually composed of the broken techniques and some code obfuscation. But a motivated and skilled attacker can always break them with enough time.


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.