I frankly don't see how that problem can be solved. It's like the First Contact problem (Alice and Bob trying to prove themselves to each other without anything, even a Trent, in common between them). Basically, if you can't trust your environment, you can't trust your work in it, period. Meaning all the bad guys need to win is to install a perpetual paranoia.