3 ms·
> As a practical matter, how do you go about getting the trusted compiler for DDC? Does this include an audit of the source for that compiler and/or the path th
by throwaway7767 11y ago
> As a practical matter, how do you go about getting the trusted compiler for DDC? Does this include an audit of the source for that compiler and/or the path that the compiler source or compiler binaries take to their destination?
No, the important bit to realise about DDC is that you don't need a compiler you know to be trusted (otherwise, of course, there would be no point). You take two different compilers, and you just have to trust that they don't both contain the same backdoor.
The most concise description I've seen is in Bruce Schneier's writeup. Quoting him:
Suppose we have two completely independent compilers: A and T. More specifically, we have source code SA of compiler A, and executable code EA and ET. We want to determine if the binary of compiler A -- EA -- contains this trusting trust attack.
Step 1: Compile SA with EA, yielding new executable X.
Step 2: Compile SA with ET, yielding new executable Y.
Since X and Y were generated by two different compilers, they should have different binary code but be functionally equivalent. So far, so good. Now:
Step 3: Compile SA with X, yielding new executable V.
Step 4: Compile SA with Y, yielding new executable W.
Since X and Y are functionally equivalent, V and W should be bit-for-bit equivalent.
- wyldfire 11y agoThe first I'd heard of DDC was here, so I might misunderstand some parts of the concept. But Wheeler seems to state it pretty plainly in this summary: > In the DDC technique, source code is compiled twice: once with a second (trusted) compiler (using the source code of the compiler’s parent), and then the compiler source code is compiled using the result of the first compilation. If the result is bit-for-bit identical with the untrusted executable, then the source code accurately represents the executable. I'd speculate that you need at least one of the compilers to be trusted otherwise they could both be subverted to produce X, Y that would produce matching V, W binaries with the attack still in place on both.
- throwaway7767 11y ago> I'd speculate that you need at least one of the compilers to be trusted otherwise they could both be subverted to produce X, Y that would produce matching V, W binaries with the attack still in place on both. Ideally one of them is not compromised. But if both are compromised but by different backdoors, the resulting binary will not be bit-for-bit identical (as they include different backdoors). So you can still detect it, and that's really all DDC can do. The only way to get a bit-for-bit identical binary from two compromised compilers is if they both have the same backdoor.