Security Experts:

Google Releases Android Patches After Bitcoin Theft

Google has pushed out patches to partners to address a cryptographic vulnerability tied to the theft of bitcoins from Android users.

According Android security engineer Alex Klyubin, applications that use the Java Cryptography Architecture (JCA) for key generation, signing or random number generation may not receive cryptographically strong values on Android devices because of improper initialization of the underlying PRNG.

"Applications that directly invoke the system-provided OpenSSL PRNG without explicit initialization on Android are also affected," wrote Klyubin. "Applications that establish TLS/SSL connections using the HttpClient and java.net classes are not affected as those classes do seed the OpenSSL PRNG with values from /dev/urandom."

"Developers who use JCA for key generation, signing or random number generation should update their applications to explicitly initialize the PRNG with entropy from /dev/urandom or /dev/random," he continued, adding that "developers should evaluate whether to regenerate cryptographic keys or other random values previously generated using JCA APIs such as SecureRandom, KeyGenerator, KeyPairGenerator, KeyAgreement, andSignature."

In addition, Google has developed patches to ensure Android's OpenSSL PRNG is initialized correctly and provided them to Open Handset Alliance (OHA) partners.

The issue came to light after users of a Bitcoin forum reported Saturday their bitcoins had been stolen. According to Bitcoin.org, the problem can affect anyone with a bitcoin wallet generated by any Android app, including Bitcoin Wallet, BitcoinSpinner and Mycelium Wallet. Apps where users don't control the private keys are not affected, such as exchange frontends like the Coinbase or Mt. Gox apps.

"Bitcoin uses the ECDSA algorithm to ensure that funds can only be spent by their rightful owners," Symantec's Security Response Team noted in a blog post. "The algorithm requires a random number to compute an ECDSA signature, but if two different messages are signed with the same private key and the same random number, the private key can be derived. This is a known method of attacking the algorithm and was previously used to break the security of other products, such as the PlayStation 3 master key."

Re-securing existing wallets requires key rotation, according to an advisory from Bitcoin.org.

"This involves generating a new address with a repaired random number generator and then sending all the money in your wallet back to yourself," the advisory noted. "If you use an Android wallet then we strongly recommend you to upgrade to the latest version available in the Play Store as soon as one becomes available. Once your wallet is rotated, you will need to contact anyone who has stored addresses generated by your phone and give them a new one."

"If you can't update your Android app, alternatively, you can send your bitcoins to a Bitcoin wallet on your computer until your Android app can be updated," according to Bitcoin.org. "You should make sure not to send back your bitcoins to your old insecure addresses."

Related Podcast: