4 ms·
High-assurance security products (eg Type 1 NSA stuff) have always relied on verifiable or dedicated RNG's. Typically TRNG's. Here's some reasons: 1. Easier to
by nickpsecurity 11y ago
High-assurance security products (eg Type 1 NSA stuff) have always relied on verifiable or dedicated RNG's. Typically TRNG's. Here's some reasons:
1. Easier to trust one based on physics with decades of verification of its behavior vs mathematical constructions with vastly less certainty or verification of correctness.
2. Bit-flips or EMI on internal state might affect a software algorithm's randomness. Won't happen with certain types of analog noise with carefully tuned and measured circuits.
3. Can verify the circuits do exactly what I expect by eye and hand with a logic analyzer. No speculation due to No 1. Can then trust that circuit as a pluggable component in any other system without further evaluation.
4. Building on above, a compromise of the host PC requires me to recover the host but not dedicated chips like the TRNG or proper HSM. I can still trust them if they have no firmware (eg analog TRNG) or it's not write-able.
5. Using Nizza Architecture, I can put Linux in an untrusted partition with crypto/CRNG/secure-storage directly on microkernel in dedicated, isolated partition. TRNG HW or dedicated crypto SOC gives me this plus benefits above.
So, the difference between high-assurance setup with HW support for security-critical functions and software on an untrustworthy box... probably x86 with its vPro backdoor circuitry... is pretty astounding in capabilities. Seeing the differences & how cheap you can do that stuff should make anyone wonder why it's not standard in security-focused projects.
- FiloSottile 11y agoI've never worked on state-level appliances, so thank you for the information, but just for the sake of stopping urandom-fear, let me spell out why this all does not apply to the 99% of us developing for consumer processor architectures (which I'm sure you realize): - the "uncertain mathematical constructions" are hashes. More precisely, in Linux case, SHA-1 preimage (not collision) security. No civilian cryptosystem would survive the fall of hashes. - all other points are void as soon as you use that randomness from a regular application running on regular CPUs, as all the bit-flips, compromises and backdoors can simply happen there. - having the keys on hardware DOES make compromise recovery much easier, but there we are speaking of HSM capable of doing the private key operations themselves, not simply providing randomness.
- nickpsecurity 11y ago"the "uncertain mathematical constructions" are hashes. More precisely, in Linux case, SHA-1 preimage (not collision) security. No civilian cryptosystem would survive the fall of hashes." The fall of a RNG by biasing its bits is more likely than a full, second-preimage attack on a hash. So, a failure of hash function in one app != failure in all apps. You're certainly right that it would have bigger implications but might still be useful as MD5 is if collisions are out of scope. "all other points are void as soon as you use that randomness from a regular application running on regular CPUs, as all the bit-flips, compromises and backdoors can simply happen there." There's a lot of CPU's to choose from to reduce that risk. There's systems like Gaisler's Leon3-FT that are open-source, have resistance to bitflips, support mods like TRNG's, and run Linux. At this point, they have to subvert your ASIC process, mask manufacturing, or supply chain. Harder than a purchasing a Linux 0-day if target has decent OPSEC and avoids spy-friendly jurisdictions. ;) If it's on Intel/AMD/IBM, your comment is true in most cases. "but there we are speaking of HSM capable of doing the private key operations themselves, not simply providing randomness." I was speaking of both. One problem I have is bootstrapping randomness. I do it by hand with cards whose entropy feeds into a CRNG unless I have a trustworthy TRNG. A plug-in, analog source with dumb, interface chip isn't going to be compromise by hackers... probably. Likewise, I can go further with a simple, coprocessor w/ ROM, memory protection, dumb interface, and onboard TRNG. Many available from many vendors of varying trustworthiness. Still safer than base system w/ kernel RNG and can even monitor (or restore) host system if I choose. "let me spell out why this all does not apply to the 99% of us developing for consumer processor architectures" I still agree with that, though. Main reason is nobody in 99% is going to use anything high-security because it will cost more, be inconvenient, and lack feature/app X, Y, or Z. Always was the case. :)
- recivorecivo 11y agoHave both of you considered taking with less ego?
- ashitlerferad 11y agoWhy can't high-security stuff get into the consumer world?