Dual_EC_DRBG Backdoor: a Proof of Concept
New submitter Reliable Windmill sends this followup to the report that RSA took money from the NSA to use backdoored tech for random number generation in encryption software. From the article:
"Dual_EC_DRBG is an pseudo-random number generator promoted by NIST in NIST SP 800-90A and created by NSA. This algorithm is problematic because it has been made mandatory by the FIPS norm (and should be implemented in every FIPS approved software) and some vendors even promoted this algorithm as first source of randomness in their applications. If you still believe Dual_EC_DRBG was not backdoored on purpose, please keep reading. ... It is quite obvious in light of the recent revelations from Snowden that this weakness was introduced by purpose by the NSA. It is very elegant and leaks its complete internal state in only 32 bytes of output, which is very impressive knowing it takes 32 bytes of input as a seed. It is obviously complete madness to use the reference implementation from NIST"
Who can you trust?
Reuters reported on Saturday that the NSA had secretly paid RSA Data Security $10 million to make a certain flawed algorithm the default in RSA’s BSAFE crypto toolkit, which many companies relied on. RSA issued a vehement but artfully worded quasi-denial. Let’s look at the story, and RSA’s denial....
Excellent, proof now what happens?
Can you still read the linked article? Or am I not allowed? I can't tell anymore what is allowed under the law and what isn't, since the US Gov feels free to interpret the law as it chooses.
xorshift64 is a simple random number generator with a period of 2**64 - 1 (you cannot use 0).
The 64 bit random number that it produces is the same as its complete state.
Meaning what? That encryption was good enough to keep likes of the NSA out even with their resources, and so they compromised it?
Or something even more insidious.
"If any question why we died, Tell them because our fathers lied."
shun anything electronic, or electric for that matter. Substinance farm and read dead-tree books for leasure.
The link above is a very good introductory article on EC cryptography. If you know a little math but have no background in elliptic curves, this is a good introduction. Well worth reading.
Clearly explained at an introductory level, with Wikipedia links for the assumed terms.
Topical, singular (ie - it's the first one currently, a news "scoop" if you like), technical, and important.
Lots to like here - Slashdot needs more articles like this.
It seems to me that anything we thought were encrypted and could be, and was, considered secure in that embodiment, is soon subject to revelation. I'm no expert, but I'm losing faith in these algorithms. Please tell me it's going to be okay. PS: if you are NSA, I don't need your reassurances.
Does this mean that OpenBSD has suffered a 3rd remote hole in its default installation? (http://it.slashdot.org/story/07/03/15/0045207/remote-exploit-discovered-for-openbsd)
(I don't understand the implications of Aris' blog above, so I'm hoping someone can explain it to me & other OpenBSD users.)
FIPS is a large group of standards - literally, the Federal Information Processing Standards. Any requirement is not "mandated by FIPS", it is mandated by one particular standard - which may or may not apply to any contract.
FIPS 140-2 Annex C, for one, lists quite a few acceptable random number generators; for that standard, I see no requirement for Dual EC DRBG.
Actually read TFA, enough flew over my head that I can't personally verify the math, but if true, well holy fucking shit. Once someone brute-forces the backdoor "key" used by the NSA, it looks like the entire system is cracked. Even if it takes a while to brute-force, once you have that you can open any encryption using that curve.
Given that cracking this open would be so useful to both other monitoring agencies, and to criminal hackers, it's sure to happen eventually, if it hasn't already. I'm sure China could throw one of their supercomputers at it.
I'd be curious to know just how hard it would be to brute-force the backdoor key itself. There didn't seem to be anything in TFA about that, and I can't figure out the math myself.
Please, people who understand EC properly, verify & reproduce this ASAP. If so this is yet another thing (one the BIGGEST things) the NSA has denied about the content of the Snowden leaks.
Plus RSA needs to really step up and be honest about just what occurred inside their walls wrt. FIPS and this algorithm.
At this point, I think the longstanding rule that 'only a fool writes his own crypto' is getting weaker.. I would amend it to "only a fool writes his own crypto, or uses ones supplied by anyone without full, independent audit and full control over magic constants..."
Captcha: bilked
Dual_EC_DRBG is *not* mandatory under FIPS 140-2. As of today (January 1), some of the older RNGs are no longer permitted for new FIPS validations, effectively leaving you with only SP800-90A (DRBG). However, there are four different DRBGs contained within 800-90A. Nothing says you need to implement all four of them. One is good enough. Out of the four, only one of them (Dual_EC) is considered suspect.
If you want to check that its random, just sample the output, brute force it and see if it puts out the whole range of possible values in equal amounts
I have been adding various facts to the Wikipedia article on Dual_EC_DRBG. A good deal of the most interesting points have not been reported in mainstream media.
* The ANSI group which standardize Dual_EC_DRBG were aware of the potential for a backdoor.
* Three RSA Security employees were listed as being in that ANSI group, making RSA Security's claim innocence claim shaky, since it is less likely that RSA Security didn't know about the back door when NSA paid them $10 million to use Dual_EC_DRBG as default.
* Two Certicom members of the ANSI group wrote a patent which describes the backdoor in detail, and two ways to prevent it.
* Somehow the ways to prevent the backdoor only make it into the standard as non-default options.
* Somehow the people on the ANSI group forget to publicize the potential for a backdoor. Especially Daniel brown of Certicom (co-author of the patent), who also wrote an attempt at a mathematical security reduction for Dual_EC_DRBG, but somehow forgets to explicitly mention the backdoor. The conclusion in Brown's paper also seems very determined to hype Dual_EC_DRBG, whereas the other papers about Dual_EC_DRBG seem excited to hype the errors they find.
* The potential backdoor only becomes public knowledge in 2007.
* Daniel Brown writes in December 2013 that "I'm not sure if this was obvious." and "All considered, I don't see how the ANSI and NIST standards for Dual_EC_DRBG can be viewed as a subverted standard, per se.".
Certicom is the main inventor and patent-holder for elliptic curve cryptography. The two Certicom employees failing to warn or prevent the backdoor they clearly know was possible doesn't reflect well on Certicom.
So, they introduced a backdoor into software that can be/is used to secure US nuclear secrets, in the hopes only they would be able to take advantage of it? This is just another variant of "security through obscurity." Really, really fucking stupid!
If it takes 50000 year's with today's computing power, and if we apply Moore's law to that, then wouldn't you have to divide remaining number of years by say 2 every 2 years? So wouldn't your impressive 50K turn into 30 years? Years = (Years - 2 / 2) until Years 0 would only give you 15 iterations.
RELIABLEWINDMILL sounds like a project classification. Wonder who submitter is?
If you use more than 1 sequence of randomness while using the required standard, is that code viewed as compliant?
With quantum computers I would guess that this could become trivial with enough qubits
I'll stick with twofish,or AES256 for my openssl and gpg stuff.
Uh, Linux geek since 1999.
http://arstechnica.com/security/2013/12/nsas-broken-dual_ec-random-number-generator-has-a-fatal-bug-in-openssl/
Uh, Linux geek since 1999.
Isn't FIPS something that has a legal requirement to be secure? Doesn't this by extension invalidate the security of FIPS?
http://www.gnupg.org/documentation/manuals/gcrypt/Random_002dNumber-Subsystem-Architecture.html#Random_002dNumber-Subsystem-Architecture
Uh, Linux geek since 1999.
I found the shill! You're also a jackboot licking, spineless, and wretched excuse for a human being.
You didn't read TFA or TFS or even The Fucking Headline. How is a publicly posted (on Github) proof-of-concept with accompanying explanation in detail (in TFA) "in the hands of the NSA only"? If you're actually concerned about foreign governments or terrorists, this sort of behavior is the most egregious possible: it makes ALL of us less safe. You think that China doesn't have cryptographers at least as good as this guy I've never heard of before? That which is in the power of one fool to do is also in the power of another. The bottom line is that those supposed to protect us shirked their duty. They are traitors. By paying money to promote an algorithm with a known backdoor as secure, for the use of the very citizens they protect, they actively aided the enemy. Hang them all.
aris@kalix86:~/dualec$ ./dual_ec_drbg_poc
s at start of generate:
E9B8FBCFCDC7BCB091D14A41A95AD68966AC18879ECC27519403B34231916485
[omitted: many output from openssl]
y coordinate at end of mul:
0663BC78276A258D2F422BE407F881AA51B8D2D82ECE31481DB69DFBC6C4D010
r in generate is:
96E8EBC0D507C39F3B5ED8C96E789CC3E6861E1DDFB9D4170D3D5FF68E242437
Random bits written:
000000000000000000000000000000000000000000000000000000000000
y coordinate at end of mul:
5F49D75753F59EA996774DD75E17D730051F93F6C4EB65951DED75A8FCD5D429
s in generate:
C64EAF10729061418EB280CCB288AD9D14707E005655FDD2277FC76EC173125E
[omitted: many output from openssl]
PRNG output: ebc0d507c39f3b5ed8c96e789cc3e6861e1ddfb9d4170d3d5ff68e242437449e
Found a match !
A_x: 96e8ebc0d507c39f3b5ed8c96e789cc3e6861e1ddfb9d4170d3d5ff68e242437
A_y: 0663bc78276a258d2f422be407f881aa51b8d2d82ece31481db69dfbc6c4d010
prediction: a3cbc223507c197ec2598e6cff61cab0d75f89a68ccffcb7097c09d3
Reviewed 65502 valid points (candidates for A)
PRNG output: a3cbc223507c197ec2598e6cff61cab0d75f89a68ccffcb7097c09d3
ECC is spooky least with RSA there's not nearly so many highly creative ways to sabotage things.
Wouldn't be shocked to find out all this talk of using temporary EC keys for TLS PFS is exactly what NSA wants till the next Snowden leaks all popular curves in TLS were broke by NSA. In the future material for new curves should be required to be selected from next weeks lottery unless an NSA employee wins that lottery.
Lets not lose sight of what is really important. While Dual_EC_DRBG might well have been compromised chances are none of us have ever used it for anything... what we should really be paying attention to are worryingly high count f key collisions discovered from Internet wide certificate surveys. Something never explained.
Finally its a bit silly we are in a position to be afraid of random numbers. EE's spend quite a lot of time in school working margins so transistors operate predictably. When you flunk out of class by allowing a circuit to be influenced primarily by thermal noise you win real random numbers. Realizing current gen CPUs *finally* have hardware random number generators which nobody trusts..LOL... why has it not been a standard feature for all this time? Why all the decades of extremes to cook fake randomness no one was ever happy with.
If they aren't already, now would be the time to start putting the masses to work hunting down the NSA's special key. This is a nasty one, and the sooner we can use it to bludgeon the guilty parties the better.
Women are like electronics: you don't know how damaged they are until you try to turn them on.
I trust Bruce Schneider. If he's a sleeper agent, they've put in so much effort it would seem churlish not to use him.
And really, I'd use Blowfish ahead of any NSA encraption algorithm or LOL AES. If history has a sense of irony, China will pwn the entire US IT infrastructure using NSA backdoors.
You think that private T1 or Metro Ethernet circuit is safe just because the data on it is supposedly not routed through the Internet???
Oh, you silly, naive children!
Good point.
Uh, Linux geek since 1999.
True, good point.
Uh, Linux geek since 1999.
....that someday soon the NSA will let my wife know all about my secret affair with Rachel from Cardholder Services. What a bummer that would be.