From 008c727aa2b67aba6dcdd16cb1318d4eba49b1d0 Mon Sep 17 00:00:00 2001 From: pointbiz Date: Sun, 15 Dec 2013 23:10:56 -0400 Subject: [PATCH] v2.7.0 Use window.crypto.getRandomValues for added OS-supplied randomness --- bitaddress.org.html | 15 +++++++++++++-- package.json | 2 +- src/bitaddress-ui.html | 2 +- src/securerandom.js | 4 +++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/bitaddress.org.html b/bitaddress.org.html index 1cc286a..2e6492a 100644 --- a/bitaddress.org.html +++ b/bitaddress.org.html @@ -1516,6 +1516,17 @@ if (typeof Crypto == "undefined" || !Crypto.util) { // ba: byte array sr.prototype.nextBytes = function (ba) { var i; + if (window.crypto && window.crypto.getRandomValues && window.Uint8Array) { + try { + var rvBytes = new Uint8Array(ba.length); + window.crypto.getRandomValues(rvBytes); + for (i = 0; i < ba.length; ++i) + ba[i] = sr.getByte() ^ rvBytes[i]; + return; + } catch (e) { + alert(e); + } + } for (i = 0; i < ba.length; ++i) ba[i] = sr.getByte(); }; @@ -5954,7 +5965,7 @@ body { font-family: Arial; }
-

A Bitcoin wallet is as simple as a single pairing of a Bitcoin address with it's corresponding Bitcoin private key. Such a wallet has been generated for you in your web browser and is displayed above.

+

A Bitcoin wallet is as simple as a single pairing of a Bitcoin address with its corresponding Bitcoin private key. Such a wallet has been generated for you in your web browser and is displayed above.

To safeguard this wallet you must print or otherwise record the Bitcoin address and private key. It is important to make a backup copy of the private key and store it in a safe location. This site does not have knowledge of your private key. If you are familiar with PGP you can download this all-in-one HTML page and check that you have an authentic version from the author of this site by matching the SHA1 hash of this HTML with the SHA1 hash available in the signed version history document linked on the footer of this site. If you leave/refresh the site or press the "Generate New Address" button then a new private key will be generated and the previously displayed private key will not be retrievable. Your Bitcoin private key should be kept a secret. Whomever you share the private key with has access to spend all the bitcoins associated with that address. If you print your wallet then store it in a zip lock bag to keep it safe from water. Treat a paper wallet like cash.

Add funds to this wallet by instructing others to send bitcoins to your Bitcoin address.

Check your balance by going to blockchain.info or blockexplorer.com and entering your Bitcoin address.

@@ -6211,7 +6222,7 @@ body { font-family: Arial; }
- Version History (v2.6.6) + Version History (v2.7.0) (PGP) 527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A
diff --git a/package.json b/package.json index de49439..e88073a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitaddress.org", - "version": "2.6.6", + "version": "2.7.0", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { diff --git a/src/bitaddress-ui.html b/src/bitaddress-ui.html index 7396f83..d7cf1e5 100644 --- a/src/bitaddress-ui.html +++ b/src/bitaddress-ui.html @@ -427,7 +427,7 @@
- Version History (v2.6.6) + Version History (v2.7.0) (PGP) 527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A
diff --git a/src/securerandom.js b/src/securerandom.js index 3547307..d4d7d58 100644 --- a/src/securerandom.js +++ b/src/securerandom.js @@ -36,7 +36,9 @@ for (i = 0; i < ba.length; ++i) ba[i] = sr.getByte() ^ rvBytes[i]; return; - } catch(e) {} + } catch (e) { + alert(e); + } } for (i = 0; i < ba.length; ++i) ba[i] = sr.getByte(); };