White-box cryptography combines methods of encryption and obfuscation to embed secret keys within application code. The goal is to combine code and keys in such a way that the two are indistinguishable to an attacker, and the new "white-box" program can be safely run in an insecure environment.
In penetration testing, white-box testing is where the testers (or attackers) have access to the source code and internal workings of the system.
Passing a "white-box" test is harder and requires a higher standard of security than a "black-box" test where the attacker only gets a look at the system from the outside.
White-box cryptography is appropriately named because attackers have access to the compiled code where the keys exist. The difficult problem that it aims to solve is how to keep those keys safe while using them in execution.
Kerckhoffs's principle revolutionized the way we think about cryptography. It states that we should allow the attacker to know everything about a crypto implementation, except the key. If a cryptosystem can stand up to that level of scrutiny it will be the better for it.
White-box crypto kind-of takes this one step further. That is, we technically give the attacker access to the key, we just hide/encrypt it well enough that they can't find it.
In order to secure a program using white-box cryptography, we assume the attacker has complete access to the system. This includes:
In order to successfully hide the keys given this scenario, according to Brecht Wyseur, we can take the following steps assuming we are trying to white-box a block cipher:
Well, it depends. Security through obscurity is a well-known bad-practice in the cryptography industry, but there is an argument to be made that white-box crypto is more than just obfuscation. A recent 2018 paper on cracking white-box may be insightful.
White box practices have certainly been used, but not many time-tested open-source solutions currently exist. That said, you may be interested in one of the larger (still small) repositories on Github which white-boxes AES in C++: https://github.com/ph4r05/Whitebox-crypto-AES
Intertrust recently claimed to launch the first enterprise-ready solution. Reading more on that may give some insight.
Hopefully this gives you a basic understanding of the purpose of white-box crypto, and even a spoiler of how it works from a 1,000 foot level.
Brecht Wyseur's Thesis on White-Box Crypto: https://www.esat.kuleuven.be/cosic/publications/thesis-152.pdf
Previously published at https://qvault.io/2020/04/27/very-basic-intro-to-white-box-cryptography/