Ken Thompson: ‘Reflections on Trusting Trust’

A classic essay from computer science titan Ken Thompson, back in 1984, explaining how to create a compromised C compiler that would be undetectable by an examination of its own source code:

The moral is obvious. You can’t trust code that you did not totally create yourself. (Especially code from companies that employ people like me.) No amount of source-level verification or scrutiny will protect you from using untrusted code. In demonstrating the possibility of this kind of attack, I picked on the C compiler. I could have picked on any program-handling program such as an assembler, a loader, or even hardware microcode. As the level of program gets lower, these bugs will be harder and harder to detect. A well installed microcode bug will be almost impossible to detect.

Tuesday, 10 March 2015