Earlier quoted context omitted.
How would you distinguish actual randomness from the output of a CSPRNG with a known or weak seed? Patterns won't be apparent in either output.
The gist of the argument as I understand it is that some people think Intel's chip (at the chip level) is taking a look at data that the RDRAND result will be used as an XOR against and using that to mess with the result RDRAND returns in some way to weaken the overall random number. If this were true and you set up a repeatable test situation in which you force the other parts of the RNG to generate the same numbers…
Linus on /dev/random: "We actually know what we are doing. You don't."
21–30 of 77 posts
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#22If I remember right, the original reasoning why this could be a problem was something along the lines: You are using sources s1, s2, s3. Then final result is combination c(s1,s2,s3). Now somebody screws up something and the sources s1 and s2 start returning just constant values. If you were just using s1 and s2 you would immediately notice this. However since you are combining all three, you are getting something tha…
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#23If you think RDRAND is examining the L1 and registers in order to derandomise it, why wouldn't the evil chip just skip bothering with RDRAND and instead just attack that random buffer it knows how to find...?
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#24It could be summed up as is: either you have a test that shows that rdrand has got problematic behavior or you shut up. Backdooring rdrand is of little to no interest given how PRNGs are built.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#25We allow the wild web to have access to our closed source GPU driver blobs but we elaborate tinfoil hat theories about rdrand. This is insane. Regarding "(I'm not sure I agree with Linus that mixing in a known-tainted RDRAND stream would nevertheless invariably improve randomness, but on the surface, it shouldn't reduce it.)": I think it's fair to say it would, in practice. Even if the NSA knows how to predict the ou…
It is worth noting that police used to be able to exploit firewire DMA to bypass disk encryption and copy encryption keys out of memory from any system with a firewire port. This has been fixed and a CPU-level exploit for crypto seems unlikely to me because making something that not only worked consistently but didn't slow down general purpose programming when it worked, would be an engineering marvel.
This being said, having clear, unimpeachable code in these areas is a good start because it helps ensure that other problems are not lurking under the surface.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#26But no, Intel made a sluggish hardware PRNG that occasionally eats some thermal bits just to make crypto guys happy -- and bang, now everybody thinks it is an NSA backdoor.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#27If you think RDRAND is examining the L1 and registers in order to derandomise it, why wouldn't the evil chip just skip bothering with RDRAND and instead just attack that random buffer it knows how to find...?
Mucking with RDRAND can easily be done in such a way that it's provably impossible to detect any differences in behaviour. It's much harder to guarantee that if you start mucking with buffers in memory, since there are so many clever ways a developer could check their work and catch you out.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#28Please do not submit professional troll articles.
That being said, I have more confidence in Linus's knowledge regarding /dev/random. Mostly because XOR in this context is secure:
1. XOR is an incredibly powerful encryption algorithm (not primitive); one of the best we have. The problem with XOR is that you MUST use a UNIQUE one time pad (that is the length of the data) for every message AND you need to be able to securely transmit that one time pad. AES CTR is effectively using AES to create a one time pad for XOR encryption, as an example.
2. The prior steps are effectively creating a irrecoverable OTP meaning that any malicious intent in RRAND is effectively encrypted away.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#29I'd want to hear Linus responding to both the OP and Taylor. But quick thought: do people like Bruce Schneier ever read this file? I think in the next year or two we will see a huge number of research going into finding "backdoor", suggesting implementation weaknesses. I am not going to speculate too much about who is NSA mole or why certain code got into the codebase. I'm more interested in researchers to find more…
Bruce Schneier I have all the respect for the guy, really, but then I read his guardian article "how to keep your data safe and secure" and mentions keeping "air gap" between computers with sensitive data but then he himself admits after all his methods and safeguards for the leaks he is working with, he uses Windows and usb-sticks to transfer (encrypted) files between them. He uses Windows. He uses Windows. And he w…
Bruce Schneier can be presumed to have evaluated his risks; he's a very well known author on exactly that.
Re: Linus on /dev/random: "We actually know what we are doing. You don't."
#30We allow the wild web to have access to our closed source GPU driver blobs but we elaborate tinfoil hat theories about rdrand. This is insane. Regarding "(I'm not sure I agree with Linus that mixing in a known-tainted RDRAND stream would nevertheless invariably improve randomness, but on the surface, it shouldn't reduce it.)": I think it's fair to say it would, in practice. Even if the NSA knows how to predict the ou…
This is true. I think it is unlikely that rdrand is this deeply backdoored. However, I do think for something this critical the comments should match the code better and working on fixing the problems identified in the article is probably prudent. It is worth noting that police used to be able to exploit firewire DMA to bypass disk encryption and copy encryption keys out of memory from any system with a firewire port…
If it's ain't broke...
Or in this case:
If you can't prove it's broke...
EDIT: I would also remind everybody that if they really don't trust rdrand for any reason they can just add the "nordrand" boot kernel param and disable this code. It's a non-issue.