All Bitcoin Wallets On Android Vulnerable To Theft
judgecorp writes "Bitcoin users have been warned that storing them in a wallet app on Android is insecure, A weakness in Android's random number generator means its random numbers may not be so random, giving attackers a chance of breaking into the wallet. those with Bitcoins have been advised to put them elsewhere, by bitcoin.org"
It's ridiculous in this day and age that an OS can fail to make random numbers properly. That's one of the most basic operations. How lazy/incompetent are the Google programmers?
are a threat to other cryptographic systems as well, but I'm sure the bug in Android's random number generator was just an honest mistake, even though it is implemented on top of a kernel that already has a working and well-tested random number source.
... is that supposedly Android's "secure" random number generation... isn't. This could potentially affect much more than Bitcoin wallets.
Does anyone know what the issue is? This article seems to suggest it's a vulnerability in the SecureRandom class, but no actual details.
Shouldn't the RNG tap into the device's accelerometer? That should provide random data if the user gives it a few successive shakes.
"Evil will always triumph over good, because good is dumb." - Dark Helmet (Spaceballs)
After 4.x, all Android versions tend to use /dev/urandom because of blocking issues on /dev/random. If issues with the security of the RNG is at stake, then this is a much larger problem, because anything Linux based is vulnerable.
There aren't many details floating around but it looks like the issue is that the RNG can return the same number on two occasions. However the possibility of returning the same random number again in the future is a perfectly expected property of any RNG; presumably they mean that the probability is much higher than normal?
No kidding!!! What do you say at this point?
Since they are generated by algorithms that give repeatable results - this isn't news. The distribution is random (usually) but the sequence is not. You need to tap into some aspect of the hardware if you hope to get true randomness and even then, unless you're measuring some quantum effect the random aspect might not be quite so random as you at first think.
http://www.nilsschneider.net/2013/01/28/recovering-bitcoin-private-keys.html
"Arbitrary number generator" might be a more useful name, where the numbers generated follow a given distribution and their selection is arbitrary. Calling them pseudo-random invites mistaken conclusions.
No kidding!!! What do you say at this point?
If the problem is with Android's RNG, then any secure application on Android may be at risk.
Ooh, moderator points! Five more idjits go to Minus One Hell!
Delendae sunt RIAA, MPAA et Windoze
Feature required by FISA court, gagged. NSA programmers did the work, in a joint venture with Google.
The problem is this: the elliptic curve digital signature algorithm, which Bitcoin transactions rely on for security, has three inputs: the transaction, the signerâ(TM)s private key and a random number. The algorithm then outputs two values, denoted r and s, where s is calculated with the formula k-1(z+rd), z being the hash of the message, k the random number and d the private key. r is dependent only on k. Thus, if the owner of an address signs two transactions with the same random number (and of course the same private key, as every address is linked to one private key), one can extract two s values from the two signatures, subtract them to make the rd terms cancel out, and extracting the private key from there becomes a simple division problem (a more detailed writeup can be found here). Normally, this is not a problem; given a true random number generator, the first âoecollisionâ should take place roughly at the same time as the heat death of the universe. As it turned out, however, java.security.SecureRandom proved to be not so random, generating the same âoerandomâ number twice on many occasions.
I just noticed the "found here" link goes to an article from January. That makes me both unsure they've got the right bug and annoyed it hasn't been fixed already.
Havent you been paying attention to Snowdens releases? This is a NSA "feature" of Android - to protect your freedom, of course.
I am taking a stab that the random generator was not seeded correctly. Here is a good description on seeding properly.
Some people die at 25 and aren't buried until 75. -Benjamin Franklin
A nice (extra - over and above Prism) tribute from Google to the NSA. That, or EXTREME incompetence taking a working and well-tested random number source and breaking it.
Print the hash out on a piece of paper, say 3x6. Put it in your wallet. Delete the electronic file.
You're welcome.
Here is an article on how to implement java's securerandom function:
https://www.cigital.com/justice-league-blog/2009/08/14/proper-use-of-javas-securerandom/
Some people die at 25 and aren't buried until 75. -Benjamin Franklin
Calling them pseudo-random invites mistaken conclusions.
Calling them just plain random would be to do that. Pseudo- covers it off nicely, I think. Looks like, but ain't. In fact if the sequence is repeatable (given the same seed), they're demonstrably not arbitrary.
systemd is Roko's Basilisk.
They're already so far beyond stupid for doing it anyway, this is beside the point. If your phone gets stolen or your phone has a hardware failure, your wallet is toast and there goes all your money permanently. Some apps have ways to move your wallet file from a PC to a phone but then it shouldn't have a problem with random number generation since the encrypted wallet came from a PC.
Good random number generators exist elsewhere. Most modern encryption relies on them. The fact that someone spectacularly messed up an RNG with disastorous exploitable results is news.
No wonder my craps game always comes up snake eyes.
Paul: Father... father, the sleeper has awakened! - Dune
If predicable randomness gives access to something you wouldn't normally have access to, then NSA makes the randomness predicable. We should have known by now.
First Malware infestation and next the FBI can turn your Mic on and now I can't even have a bitcoin on my device!
Cell phones already have a great RNG, its called the "touch screen"....aka the same RNG thats used to dial random international numbers every time it decides to randomly unlock in your pocket.
Could just have the touch screen polled randomly while the screen is off, if some random portion is being pressed, extract some entropy from it and toss it in the pool. I am pretty sure the interactions between my thigh, pants, and screen could produce every bit as much entropy as wiggling a mouse around.
"I opened my eyes, and everything went dark again"
crap is a game? huh? I thought crap is like trash or junk.. like, i hate this crap
I have to wonder did someone sit around a table and brainstorm the most innocuous repercussion of RNG failure possible?
Maybe you should take more than a "limited" interest in something before starting to brag about how clever you are. That way, you might be able to avoid looking like a damn fool who has no clue what the hell he is talking about, like you do now.
Nitpicky guy here. Wouldn't unsecure be the right word? The meaning of insecure is primarily "Not confident or assured; uncertain or anxious."
This certainly affects Bitcoin the most, but a random number generator that actually produces the same "random" numbers is hardly random at all, and could present a serious problem for all types of applications. In fact, that's an entirely-broken random number generator. I'm wondering how such an egregious PRNG/seeding-algo made it this long without someone noticing. Maybe it's because Bitcoin provides a financial incentive to find these flaws, and honestly it's pretty easy to spot it from a one-minute blockchain scan -- just look for two transactions with identical r-values, plug it into the stupid-simple equation, and then steal the money.
For Android/mobile, the answer is to leverage the variety of sensors that are on-board. Using the low bits of accelerometer output should work great for seeding a PRNG if someone is actually holding the phone. If not, snap an image or take a quarter-second audio recording should suffice. There's enough noise on the camera and microphone that the hash of the output should be different even if it's sitting camera down in a quiet room. A lot of times you only 32-bytes of entropy, and a single image with 5 million pixels can give you an order of magnitude more than just from the random variations in sensor output in a dark room.
The issue has already been resolved. http://bitcoin.org/en/alert/2013-08-11-android
The most cursory search will turn up similar complaints for every OS's library random-number routine, over the history of computing. It's quite common for a random-number routine that has been good for years to suddenly become non-random in a new release. Basic advice has always been that, if it's important to have truly "random" numbers with any specific property, you should simply ignore any routines that came from vendors. You should look in "the literature" for routines with the properties you need, and have a good programmer (i.e., one who can handle basic arithmetic ;-) to code it up in whatever language you're using.
And part of your testing suite is a test of your random-number routines(s), to verify that they are still generating numbers with the appropriate level of randomness. It's funny what things like "improved" optimizations in the compiler can do to the correctness of such code.
If the bitcoin software managers are using any OS's random-number generators, well, they're just incompetent. Their job should be handed to someone with minimal understanding of the math that they're using. Someone who will ensure that other managers don't force their programmers to do it wrong.
(Yes, I have been ordered by several managers to implement incorrect arithmetic. I've generally responded by writing and distributing a proof of the incorrectness of my orders, and updated my resume. Sometimes they've responded by putting me in charge of the math routines in question. But far more often, I've found a new job. ;-)
(But this wasn't quite as funny as the case where a manager gave us written orders that clearly required that we implement messages that went faster than light. We quickly learned that his superiors supported him, so the entire team had new jobs a week later. We eventually learned that the product was finally abandoned. ;-)
Those who do study history are doomed to stand helplessly by while everyone else repeats it.
mt gox is secured (insured?) against hacking so if someone hacks me(i probably need a dongle for that) ... or en masse ... i dont lose a penny (or a bit in this case)
...
then again im not a blind person living under the illusion that a blockchain where every transaction is visible to everyone forever is anonimity so i wouldnt use it for
sub-
legal activities unless i really knew what i was doing or had a five star blackhat working for me
Free speech was meant to be free for all... how can anyone grow up in a nanny state ?