3 ms·
> If you have the source then you can see what it does. What if it exploits a compiler bug to do something different than it looks? What if the compiler recogn
by PeCaN 11y ago
> If you have the source then you can see what it does.
What if it exploits a compiler bug to do something different than it looks? What if the compiler recognizes the code and instruments it with its backdoor? Sure, GCC probably doesn't, but what if the code was meant for Windows and only builds under MSCV which you can't audit? What if the code exploits an undocumented “feature” in Intel x86 processors? What if it uses a backdoor in Intel's randomness hardware? Modern Intel processors have many undocumented features and essentially can do whatever the hell they want with your code. The NSA almost certainly has a backdoor in Intel's RDRAND[1]. x86(_64) is impossible to trust; even VIA CPUs may be compromised (though they lack the “management engine” of Intel and AMD—if I were to 100% audit a crypto-related program that only runs on x86, I would use a VIA system and intercept any instructions that use the hardware RNG).
Point is, open source makes some things vastly easier, but the point is you _need_ to audit the binary anyway. That's the _only_ way to trust it. You _cannot_ trust the source code. You cannot even trust a machine other than POWER, RISC-V, or SuperH/JCore.
If you're not going to be paranoid as all hell, auditing crypto is pointless.
1. http://arstechnica.com/security/2013/12/we-cannot-trust-intel-and-vias-chip-based-crypto-freebsd-developers-say/ http://arstechnica.com/security/2013/12/we-cannot-trust-inte...
- dave2000 11y agoYou compile with various compilers and you decompile them with different decompilers. This is trivial today. Randomness hardware? There are already perfectly good PRNG routines available as used by currently available strong encryption. I understand the criticisms of just relying on the fact that something is open source but the alternative - closed source - has exactly 100% of those problems, plus a whole other lot of new ones too.
- tptacek 11y ago"Perfectly good PRNG routines"? No, that is not at all true. Serious cryptographic software uses the OS's random number generator. There are not in fact "perfectly good PRNG routines" ready to take off the shelf and plug into crypto software.
- PeCaN 11y ago> Randomness hardware? There are already perfectly good PRNG routines available as used by currently available strong encryption. Yeah. How do you seed those with a good source of entropy? That's what RDRAND etc are for.