From b282d5f16affbc44844b50d5794ea5f39aec233c Mon Sep 17 00:00:00 2001 From: mcccs Date: Mon, 8 Aug 2016 15:51:46 +0300 Subject: [PATCH 1/5] :rainbow: Improve and rename README to README.md --- README => README.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) rename README => README.md (87%) diff --git a/README b/README.md similarity index 87% rename from README rename to README.md index 74be9c5..de22e17 100644 --- a/README +++ b/README.md @@ -1,4 +1,4 @@ -bitaddress.org +# bitaddress.org JavaScript Client-Side Bitcoin Wallet Generator Now Bitcoin addresses and their corresponding private key can be conveniently @@ -18,15 +18,21 @@ Please send DONATIONS for this project to Bitcoin Address: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN -END USER NOTES: +END USER NOTES: + 1) To print QRCode in IE8 you must enable the "Print Background Colors and Images" checkbox on the "Page Setup" screen. + 2) For Bulk Wallet I recommended using Google Chrome, it's the fastest. + 3) Requires IE8+, Firefox, Chrome or sufficient JavaScript support. + 4) Mobile Safari only works with iPhone4 or newer devices. Older devices timeout while executing JavaScript. + 5) DO NOT use Opera Mini it renders JavaScript output server side, therefore they might record the private key you generated. + 6) Art Wallet does not work properly in IE8 due to CSS limitations. @@ -44,15 +50,16 @@ throughout the document along with their licenses. Included JavaScript libraries are separated with HTML script tags. Summary of JavaScript functions with a redistributable license: -JavaScript function License -------------------- -------------- -Array.prototype.map Public Domain -window.Crypto BSD License -window.SecureRandom BSD License -window.EllipticCurve BSD License -window.BigInteger BSD License -window.QRCode MIT License -window.Bitcoin MIT License + +JavaScript function | License +------------------- | -------------- +Array.prototype.map | Public Domain +window.Crypto | BSD License +window.SecureRandom | BSD License +window.EllipticCurve | BSD License +window.BigInteger | BSD License +window.QRCode | MIT License +window.Bitcoin | MIT License The bitaddress.org software is available under The MIT License (MIT) Copyright (c) 2011-2013 bitaddress.org From e87733f753fbb4d1d3d5f818e87efe3d7cc2d6d6 Mon Sep 17 00:00:00 2001 From: pointbiz Date: Sun, 21 Aug 2016 15:44:22 -0400 Subject: [PATCH 2/5] v3.2.1 BigInteger modInverse should be positive - throw if modInverse 0 - improve BigInteger constructor so that it works if caller forgets 'new' - add unit tests for BigInteger - thanks to dooglus, jprichardson, dcousens --- CHANGELOG.txt | 2 +- CHANGELOG.txt.asc | 22 +++++++++++++++------- bitaddress.org.html.sig | 14 +++++++------- package.json | 6 +++--- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 26bd5f2..ec790d4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,7 +29,7 @@ END USER NOTES: Here is a signed list of file names and version history. 2016-07-31: status ACTIVE -bitaddress.org-v3.2.1-SHA256-.html +bitaddress.org-v3.2.1-SHA256-ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48.html - BigInteger modInverse should be positive - throw if modInverse 0 - improve BigInteger constructor so that it works if caller forgets 'new' diff --git a/CHANGELOG.txt.asc b/CHANGELOG.txt.asc index 720b795..920e9db 100644 --- a/CHANGELOG.txt.asc +++ b/CHANGELOG.txt.asc @@ -31,6 +31,14 @@ END USER NOTES: Here is a signed list of file names and version history. +2016-07-31: status ACTIVE +bitaddress.org-v3.2.1-SHA256-ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48.html + - BigInteger modInverse should be positive + - throw if modInverse 0 + - improve BigInteger constructor so that it works if caller forgets 'new' + - add unit tests for BigInteger + - thanks to dooglus, jprichardson, dcousens + 2016-02-19: status ACTIVE bitaddress.org-v3.2.0-SHA256-ad4fd171c647772aa76d0ce828731b01ca586596275d43a94008766b758e8736.html - switch languages without full page load @@ -321,11 +329,11 @@ bitaddress.org-v0.1-SHA1-f40e706490f3eb2be56c31ddbf4c8646cd51ef40.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAEBAgAGBQJWx8DZAAoJEIdJe5Fjl09aFeEH/2wrQWW3YrDP1LuMfOEhydJ6 -4DsGN1hBRqR1qVzGWxFjwcHLrY95C0u+P0HI82riQF7+q+IKwU9KJWU2+ryfBTAG -Px8CTMw2kL6lgk854UqbpdLvLiZUEgjpyiF2mtptlH4ruVFLzHmVe9CbjLU7GPOK -Nni8oeYH5LWf5VUpSAZh6sGe39vfMQuEtREnpBcP+aJM8Mp5jwKHz2payWTNaTSa -UXoYqY/ehQho3ILm0a5lEkGFyJC3ObJXRSiErGucFBDKM0SITlREfFEQDcRMvmrZ -JaWrLi+dVmbMXXEVJZSoed5i1cOLA+byeay3UcDXcmz53PIAhSrZWFfMv22Re6M= -=FiVM +iQEcBAEBAgAGBQJXugOoAAoJEIdJe5Fjl09a4IkH/R8Fh8FK7FBEWoVzvW6PguY/ +ma4XD1ixdKIxcD2wklXPG858pBxUI2yybQd8ajFdCzbWM7pE/WDUGgIQLapQ7pzx +/iCjImA+vGX0KgjhsNV8X4pxX1KU4Up9ZHpntTD/K1ocrPjF1rtEmwWKixDUUimf +njh5sGt9q0Cgxx/gMWMCZAcsq0E03gRUUFeWLtDsgLDzuZxNDG4bQlRKAF7bEqCz +E05fClFZnHzn2LsDPEEo4c3BCr9D+LoOz2ug0eYIlGaQDSfc31Ojp3+YjCkGANYb +Xvkry13/KLwm9VXhWDo7TovH78QbKPzX28tDfJwuuwikRmyn8duQSA/oaEeRBLQ= +=Mj8x -----END PGP SIGNATURE----- diff --git a/bitaddress.org.html.sig b/bitaddress.org.html.sig index d895ee3..505b536 100644 --- a/bitaddress.org.html.sig +++ b/bitaddress.org.html.sig @@ -1,11 +1,11 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAABAgAGBQJWx8DzAAoJEIdJe5Fjl09awNYIAIsrdkZJylt01F15y1jy5SUB -elatgdvoWuvBtj1toTBknvWs3SrLbAi4OkzIZbZnu/QSf+6BejeGlus1AKJwbQFr -srVVdw3x3I9T+mY3GLdrbrAhivulBQhGk+LSyJhp9/tVj6r924kbceK+QtV6GVLs -6UXzjejbwoTF51av0n5isuF7tUIUC2cfpgvznSGVFGlUbseByBLIut+X0VgVwa7V -zIjnkgI12tiAAWquZtaZ5H5SKcVOQ1+7MqcZ3m9fH7E3+st+xe6JczHIytqu0hVI -IXs5TpzzdeXaxEuJPGa7w43M5e6CHKviDT8EjTnc/JBJjBLHymrTAa/jUkQXYaU= -=y/7l +iQEcBAABAgAGBQJXugO4AAoJEIdJe5Fjl09aOqoH/RMYOVJKwTB3/o1GaXCSVVWG +qg8PoomYnnfjjsx4UuebbnD3l3Ik0JregmMPe1GfZAS/SlKbund87RSopTHQnTYp +KYnK3n/jbAG/0srDVmxY3eb0K2q6p/WI+e8X5EUWEMVgkjAL8T6dPMzbP8pZZUf2 +Fz1wdQXnoSfh5l1WcJpFp/0dYYO1SZkF/uZ1tXUuSW+vC9pWfOy7hPAj+UaZkmlD +R5mNj4gP+XTPLCZSP7UHZbkCbmq6GxcMyY9bLnRNsktts06LYsvqLmDnu5lZ+/1G +EoYSNnjzx58elhTuQqJm+OGHV784U44yrUD/0ExPxDQxqBRHUTGsBFVxqemMx4o= +=jgw4 -----END PGP SIGNATURE----- diff --git a/package.json b/package.json index b834f0e..a4722d1 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "bitaddress.org", "version": "3.2.1", - "sha1sum": "", - "sha256sum": "", + "sha1sum": "eee2aaf01160139e6321dc3f5f115f9092a9efc1", + "sha256sum": "ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { @@ -27,7 +27,7 @@ ], "author": "pointbiz", "license": "MIT", - "readmeFilename": "README", + "readmeFilename": "README.md", "gitHead": "d77aaf687fca1f0e28388b0a8de5eb3d89d4fad3", "bugs": { "url": "https://github.com/pointbiz/bitaddress.org/issues" From 868b0300d8dfe3cee6b44dc428199ccae70cfaa0 Mon Sep 17 00:00:00 2001 From: pointbiz Date: Sun, 21 Aug 2016 18:59:26 -0400 Subject: [PATCH 3/5] v3.2.1 unix line endings --- CHANGELOG.txt | 2 +- CHANGELOG.txt.asc | 16 ++++++++-------- bitaddress.org.html.sig | 14 +++++++------- package.json | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ec790d4..2ab02e3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,7 +29,7 @@ END USER NOTES: Here is a signed list of file names and version history. 2016-07-31: status ACTIVE -bitaddress.org-v3.2.1-SHA256-ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48.html +bitaddress.org-v3.2.1-SHA256-42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd.html - BigInteger modInverse should be positive - throw if modInverse 0 - improve BigInteger constructor so that it works if caller forgets 'new' diff --git a/CHANGELOG.txt.asc b/CHANGELOG.txt.asc index 920e9db..8b2db36 100644 --- a/CHANGELOG.txt.asc +++ b/CHANGELOG.txt.asc @@ -32,7 +32,7 @@ END USER NOTES: Here is a signed list of file names and version history. 2016-07-31: status ACTIVE -bitaddress.org-v3.2.1-SHA256-ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48.html +bitaddress.org-v3.2.1-SHA256-42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd.html - BigInteger modInverse should be positive - throw if modInverse 0 - improve BigInteger constructor so that it works if caller forgets 'new' @@ -329,11 +329,11 @@ bitaddress.org-v0.1-SHA1-f40e706490f3eb2be56c31ddbf4c8646cd51ef40.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAEBAgAGBQJXugOoAAoJEIdJe5Fjl09a4IkH/R8Fh8FK7FBEWoVzvW6PguY/ -ma4XD1ixdKIxcD2wklXPG858pBxUI2yybQd8ajFdCzbWM7pE/WDUGgIQLapQ7pzx -/iCjImA+vGX0KgjhsNV8X4pxX1KU4Up9ZHpntTD/K1ocrPjF1rtEmwWKixDUUimf -njh5sGt9q0Cgxx/gMWMCZAcsq0E03gRUUFeWLtDsgLDzuZxNDG4bQlRKAF7bEqCz -E05fClFZnHzn2LsDPEEo4c3BCr9D+LoOz2ug0eYIlGaQDSfc31Ojp3+YjCkGANYb -Xvkry13/KLwm9VXhWDo7TovH78QbKPzX28tDfJwuuwikRmyn8duQSA/oaEeRBLQ= -=Mj8x +iQEcBAEBAgAGBQJXujHeAAoJEIdJe5Fjl09a2bkH/RU7iDEGx5P30swI3B+umDDw +1X1Oe+9JUedIH3unbo63jh+UeMbb2/YbjEbE3BuqxEbm1Ue6/LLufnDCk/s2VfVC +61FueWmjwUH2+v+51tBskExOfg5t45QR5H1yXSM5XaWN39eSDFKscfQBoWRcHORM +ua/8vmhqYp/QH90tzhrLmao+DJG6TVAuCJRa0Uawv2YzNlIQ3ahSHvLSK1H1cAkA +Ygpn+9sBNPcnA28sGVmeruSOvSZLvK4vJAw5+Ybly0aLVGJJ2hdpWmxymPw1nwn5 +ZtTTnnzPKcUirJUz2FN8UhQIeMT1kIuu9uWhWJeUnWU77Fx5cyEAPTA4HThZBQc= +=nd+V -----END PGP SIGNATURE----- diff --git a/bitaddress.org.html.sig b/bitaddress.org.html.sig index 505b536..37d65dd 100644 --- a/bitaddress.org.html.sig +++ b/bitaddress.org.html.sig @@ -1,11 +1,11 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAABAgAGBQJXugO4AAoJEIdJe5Fjl09aOqoH/RMYOVJKwTB3/o1GaXCSVVWG -qg8PoomYnnfjjsx4UuebbnD3l3Ik0JregmMPe1GfZAS/SlKbund87RSopTHQnTYp -KYnK3n/jbAG/0srDVmxY3eb0K2q6p/WI+e8X5EUWEMVgkjAL8T6dPMzbP8pZZUf2 -Fz1wdQXnoSfh5l1WcJpFp/0dYYO1SZkF/uZ1tXUuSW+vC9pWfOy7hPAj+UaZkmlD -R5mNj4gP+XTPLCZSP7UHZbkCbmq6GxcMyY9bLnRNsktts06LYsvqLmDnu5lZ+/1G -EoYSNnjzx58elhTuQqJm+OGHV784U44yrUD/0ExPxDQxqBRHUTGsBFVxqemMx4o= -=jgw4 +iQEcBAABAgAGBQJXujHyAAoJEIdJe5Fjl09av0YIAMSLiQfSSmtyEqFvYOO/MtC9 +Li/Y6KixVZ1GlOOtUQzmrlEqVgAxd4pqjCbh5MSWLoLOkhgzeghAQ7dC0UBwjqd1 +BMSnwgSyG57ih9dEeWmpH7bKkjMpa08ITm2eDfZnLLe6TSI8p18D175VavBUiGz6 +qsrW2OEOHTA477HdTQ+NYN/4FJ3vFY/Hvmg5Zn50upi1OGMAYnwpqFtlfi3Blhki +a2FKfS0Xm1Brw4qxgMJ8wBk0Xx3aejX37pbqREKDklI0bD0Ghxu0y/nOQ6Adl4wG +UenNQK2xw7TLEOVetCX11EBKHadnjMS7J8TzWF+vOFYl1AjgFVcw0Cj5JP6VpzQ= +=x5Ug -----END PGP SIGNATURE----- diff --git a/package.json b/package.json index a4722d1..271a03c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "bitaddress.org", "version": "3.2.1", - "sha1sum": "eee2aaf01160139e6321dc3f5f115f9092a9efc1", - "sha256sum": "ca6a34d4ac6742dc8cebfbe0089e28392b6ee9b33b05eaa68c9e00b00e355f48", + "sha1sum": "8b4ffcadf58fea559b590c4ab5abf1bfe187908a", + "sha256sum": "42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { From 67e167930c4ebd9cf91047c36792c4e32dc41f11 Mon Sep 17 00:00:00 2001 From: pointbiz Date: Sun, 21 Aug 2016 19:57:42 -0400 Subject: [PATCH 4/5] v3.2.2 version bump unix line endings --- CHANGELOG.txt | 4 ++++ CHANGELOG.txt.asc | 18 +++++++++++------- bitaddress.org.html | 6 +++--- bitaddress.org.html.sig | 14 +++++++------- package.json | 6 +++--- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2ab02e3..37865d2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,10 @@ END USER NOTES: Here is a signed list of file names and version history. +2016-08-21: status ACTIVE +bitaddress.org-v3.2.2-SHA256-f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df.html + - version bump for unix line endings + 2016-07-31: status ACTIVE bitaddress.org-v3.2.1-SHA256-42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd.html - BigInteger modInverse should be positive diff --git a/CHANGELOG.txt.asc b/CHANGELOG.txt.asc index 8b2db36..00a219c 100644 --- a/CHANGELOG.txt.asc +++ b/CHANGELOG.txt.asc @@ -31,6 +31,10 @@ END USER NOTES: Here is a signed list of file names and version history. +2016-08-21: status ACTIVE +bitaddress.org-v3.2.2-SHA256-f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df.html + - version bump for unix line endings + 2016-07-31: status ACTIVE bitaddress.org-v3.2.1-SHA256-42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd.html - BigInteger modInverse should be positive @@ -329,11 +333,11 @@ bitaddress.org-v0.1-SHA1-f40e706490f3eb2be56c31ddbf4c8646cd51ef40.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAEBAgAGBQJXujHeAAoJEIdJe5Fjl09a2bkH/RU7iDEGx5P30swI3B+umDDw -1X1Oe+9JUedIH3unbo63jh+UeMbb2/YbjEbE3BuqxEbm1Ue6/LLufnDCk/s2VfVC -61FueWmjwUH2+v+51tBskExOfg5t45QR5H1yXSM5XaWN39eSDFKscfQBoWRcHORM -ua/8vmhqYp/QH90tzhrLmao+DJG6TVAuCJRa0Uawv2YzNlIQ3ahSHvLSK1H1cAkA -Ygpn+9sBNPcnA28sGVmeruSOvSZLvK4vJAw5+Ybly0aLVGJJ2hdpWmxymPw1nwn5 -ZtTTnnzPKcUirJUz2FN8UhQIeMT1kIuu9uWhWJeUnWU77Fx5cyEAPTA4HThZBQc= -=nd+V +iQEcBAEBAgAGBQJXuj+4AAoJEIdJe5Fjl09a7wEIAJIfRmwqcr1oniY/arJpr+e6 +a97QMVgpzFrj2G3k8odW6MMowjnWOeYmzhdiNQ+9crmKUFjElrzzUEOg0Mh32Ix3 +iNVspXlHwgYfc5Xj7qtkWRPCoZ9u4TmOY5HA0gL7nsPZOrEbXjbYlknTTJertbpN +gNZBaCxKQD2U4goUVXMyby9+3lnam6IOegpOqWQRxq8ZmPo+bbtjWpifp9roSaoG +6fJb6T3fEx3aXcwamJktkh5Xh6WivUJnkR8vgLLbWEN4M1HXg1hCqipMnw9cw/U/ +FXSCSOv5Iw0thYTBhqR2NeRWdUEu81l95t9HXxjIKc75ej4J14QaPSDgt46PQvA= +=3IgE -----END PGP SIGNATURE----- diff --git a/bitaddress.org.html b/bitaddress.org.html index 2d5fe36..d8804c9 100644 --- a/bitaddress.org.html +++ b/bitaddress.org.html @@ -7033,7 +7033,7 @@ input[type=checkbox] { position: relative; z-index: 20; }
⚠ Think twice! You appear to be running this generator online from a live website. For valuable wallets it is recommended to - download + download the zip file from GitHub and run this generator offline as a local html file.

@@ -7058,12 +7058,12 @@ input[type=checkbox] { position: relative; z-index: 20; } Donations: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN GitHub Repository - (zip) + (zip)
- Version History (3.2.1) + Version History (3.2.2) 527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A
diff --git a/bitaddress.org.html.sig b/bitaddress.org.html.sig index 37d65dd..1e29b05 100644 --- a/bitaddress.org.html.sig +++ b/bitaddress.org.html.sig @@ -1,11 +1,11 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAABAgAGBQJXujHyAAoJEIdJe5Fjl09av0YIAMSLiQfSSmtyEqFvYOO/MtC9 -Li/Y6KixVZ1GlOOtUQzmrlEqVgAxd4pqjCbh5MSWLoLOkhgzeghAQ7dC0UBwjqd1 -BMSnwgSyG57ih9dEeWmpH7bKkjMpa08ITm2eDfZnLLe6TSI8p18D175VavBUiGz6 -qsrW2OEOHTA477HdTQ+NYN/4FJ3vFY/Hvmg5Zn50upi1OGMAYnwpqFtlfi3Blhki -a2FKfS0Xm1Brw4qxgMJ8wBk0Xx3aejX37pbqREKDklI0bD0Ghxu0y/nOQ6Adl4wG -UenNQK2xw7TLEOVetCX11EBKHadnjMS7J8TzWF+vOFYl1AjgFVcw0Cj5JP6VpzQ= -=x5Ug +iQEcBAABAgAGBQJXuj/DAAoJEIdJe5Fjl09axyIIAJSBaV3/yIX0oTVrvhbdLZrv +Odno0yBfsmQZNWKAKeQH1dp4FQ82w+9hDSQUczyj6kKfENhlnk+h6aiIXLcDXmth +7KFbEN2UhsuWW6wfvw5/FqUMnSoqGBAVBBpNi/ZnUxyYlZPDR7eyMJy+vfSQ1leN +27p2OIlusN30mCR8b32fQ8MOqovKsR4Jx+eGjRsk2aKcSOywE+08rRx9ATISXML8 +aaLQBAPjKgmJGUdWVma+qACJO5qcff7IaxOpXACcylVz3W0oDiPD6tWqT+6tnSNa +ZpwoJDVkJFTuawcrbrBxTm6Qbh6Dfn/IaEMlRleFT4iqBVk55nKC85EL+JcRXBU= +=c3ih -----END PGP SIGNATURE----- diff --git a/package.json b/package.json index 271a03c..7aac2c0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "bitaddress.org", - "version": "3.2.1", - "sha1sum": "8b4ffcadf58fea559b590c4ab5abf1bfe187908a", - "sha256sum": "42c3bcb643c451689e5bd1499ed4b516be2da06d2fe3886b0dd15b8fc2525ecd", + "version": "3.2.2", + "sha1sum": "324a332b3964f1631a4fb6e070b7f5748e5672f8", + "sha256sum": "f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { From af91e78b98ac912ede907408d2b032dd10fe9ee3 Mon Sep 17 00:00:00 2001 From: pointbiz Date: Sun, 27 Nov 2016 16:15:05 -0400 Subject: [PATCH 5/5] v3.2.3 wallet details: show error when checksum validation fails or private key outside of curve range --- CHANGELOG.txt | 5 ++ CHANGELOG.txt.asc | 19 +++--- bitaddress.org.html | 123 +++++++++++++++++++++++++++++++------ bitaddress.org.html.sig | 14 ++--- package.json | 6 +- src/bitcoinjs-lib.eckey.js | 53 ++++++++++++---- src/ninja.detailwallet.js | 5 +- src/ninja.unittests.js | 59 +++++++++++++++++- 8 files changed, 234 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 37865d2..8d248db 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,11 @@ END USER NOTES: Here is a signed list of file names and version history. +2016-11-27: status ACTIVE +bitaddress.org-v3.2.3-SHA256-c9a0bb3ed50aa75a5ae9c606d81e3fd41a4ff686ad38ad5379e2402f481e79a4.html + - wallet details: show error when checksum validation fails + - wallet details: show error when private key outside of curve range + 2016-08-21: status ACTIVE bitaddress.org-v3.2.2-SHA256-f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df.html - version bump for unix line endings diff --git a/CHANGELOG.txt.asc b/CHANGELOG.txt.asc index 00a219c..fdca8f9 100644 --- a/CHANGELOG.txt.asc +++ b/CHANGELOG.txt.asc @@ -31,6 +31,11 @@ END USER NOTES: Here is a signed list of file names and version history. +2016-11-27: status ACTIVE +bitaddress.org-v3.2.3-SHA256-c9a0bb3ed50aa75a5ae9c606d81e3fd41a4ff686ad38ad5379e2402f481e79a4.html + - wallet details: show error when checksum validation fails + - wallet details: show error when private key outside of curve range + 2016-08-21: status ACTIVE bitaddress.org-v3.2.2-SHA256-f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df.html - version bump for unix line endings @@ -333,11 +338,11 @@ bitaddress.org-v0.1-SHA1-f40e706490f3eb2be56c31ddbf4c8646cd51ef40.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAEBAgAGBQJXuj+4AAoJEIdJe5Fjl09a7wEIAJIfRmwqcr1oniY/arJpr+e6 -a97QMVgpzFrj2G3k8odW6MMowjnWOeYmzhdiNQ+9crmKUFjElrzzUEOg0Mh32Ix3 -iNVspXlHwgYfc5Xj7qtkWRPCoZ9u4TmOY5HA0gL7nsPZOrEbXjbYlknTTJertbpN -gNZBaCxKQD2U4goUVXMyby9+3lnam6IOegpOqWQRxq8ZmPo+bbtjWpifp9roSaoG -6fJb6T3fEx3aXcwamJktkh5Xh6WivUJnkR8vgLLbWEN4M1HXg1hCqipMnw9cw/U/ -FXSCSOv5Iw0thYTBhqR2NeRWdUEu81l95t9HXxjIKc75ej4J14QaPSDgt46PQvA= -=3IgE +iQEcBAEBAgAGBQJYOz4QAAoJEIdJe5Fjl09ar74IAMiOx4/c/q7UaTEjlAQDmseh +CxSRHHQUwGaZG6z9pwt9ecdKht4t3Y2+CufcPmoV7A1Vq2EtoXFxEibwDwLuTzYL +pqcUZCV+fwd0PGGz69mL0iGrMJHy0lhBZb4lb+2P6fXz4D35n1Dnq1jHGAOzcFEF +B2++ja2s8QJwd1S1xtOhBshVZDTHc8YYgv1JJSKDpJNeGSFHx9IapOv4ydETbhfT +L7kp9z6TKZ5khkRUCGR2qL4BzlTA/lSDj/cgVb6tRQmIgusRMjvJP076nEqiJ4TX +8YZrObi2yXM7bD8iBXIabc3W2r/R9olw+pCxI+ZuFEOU+UVndCRpP7XEMsTp4aw= +=/wYY -----END PGP SIGNATURE----- diff --git a/bitaddress.org.html b/bitaddress.org.html index d8804c9..0441615 100644 --- a/bitaddress.org.html +++ b/bitaddress.org.html @@ -5720,19 +5720,23 @@ Bitcoin.ECKey = (function () { this.priv = BigInteger.fromByteArrayUnsigned(input); } else if ("string" == typeof input) { var bytes = null; - if (ECKey.isWalletImportFormat(input)) { - bytes = ECKey.decodeWalletImportFormat(input); - } else if (ECKey.isCompressedWalletImportFormat(input)) { - bytes = ECKey.decodeCompressedWalletImportFormat(input); - this.compressed = true; - } else if (ECKey.isMiniFormat(input)) { - bytes = Crypto.SHA256(input, { asBytes: true }); - } else if (ECKey.isHexFormat(input)) { - bytes = Crypto.util.hexToBytes(input); - } else if (ECKey.isBase64Format(input)) { - bytes = Crypto.util.base64ToBytes(input); + try{ + if (ECKey.isWalletImportFormat(input)) { + bytes = ECKey.decodeWalletImportFormat(input); + } else if (ECKey.isCompressedWalletImportFormat(input)) { + bytes = ECKey.decodeCompressedWalletImportFormat(input); + this.compressed = true; + } else if (ECKey.isMiniFormat(input)) { + bytes = Crypto.SHA256(input, { asBytes: true }); + } else if (ECKey.isHexFormat(input)) { + bytes = Crypto.util.hexToBytes(input); + } else if (ECKey.isBase64Format(input)) { + bytes = Crypto.util.base64ToBytes(input); + } + } catch (exc1) { + this.setError(exc1); } - + if (ECKey.isBase6Format(input)) { this.priv = new BigInteger(input, 6); } else if (bytes == null || bytes.length != 32) { @@ -5744,7 +5748,21 @@ Bitcoin.ECKey = (function () { } this.compressed = (this.compressed == undefined) ? !!ECKey.compressByDefault : this.compressed; - KeyPool.push(this); + try { + // check not zero + if (this.priv != null && BigInteger.ZERO.compareTo(this.priv) == 0) this.setError("Error: BigInteger equal to zero."); + // valid range [0x1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140]) + var hexKeyRangeLimit = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140"; + var rangeLimitBytes = Crypto.util.hexToBytes(hexKeyRangeLimit); + var limitBigInt = BigInteger.fromByteArrayUnsigned(rangeLimitBytes); + if (this.priv != null && limitBigInt.compareTo(this.priv) < 0) this.setError("Error: BigInteger outside of curve range.") + + if (this.priv != null) { + KeyPool.push(this); + } + } catch (exc2) { + this.setError(exc2); + } }; ECKey.privateKeyPrefix = 0x80; // mainnet 0x80 testnet 0xEF @@ -5754,6 +5772,15 @@ Bitcoin.ECKey = (function () { */ ECKey.compressByDefault = false; + /** + * Set whether the public key should be returned compressed or not. + */ + ECKey.prototype.setError = function (err) { + this.error = err; + this.priv = null; + return this; + }; + /** * Set whether the public key should be returned compressed or not. */ @@ -7033,7 +7060,7 @@ input[type=checkbox] { position: relative; z-index: 20; }
⚠ Think twice! You appear to be running this generator online from a live website. For valuable wallets it is recommended to - download + download the zip file from GitHub and run this generator offline as a local html file.

@@ -7058,12 +7085,12 @@ input[type=checkbox] { position: relative; z-index: 20; } Donations: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN GitHub Repository - (zip) + (zip)
- Version History (3.2.2) + Version History (3.2.3) 527B 5C82 B1F6 B2DB 72A0
ECBF 8749 7B91 6397 4F5A
@@ -10448,7 +10475,10 @@ ninja.wallets.vanitywallet = { keyToECKeyWithBrain: function (key) { var btcKey = new Bitcoin.ECKey(key); - if (btcKey.priv == null) { + if (btcKey.error != null) { + alert(translator.get("detailalertnotvalidprivatekey") + "\n" + btcKey.error); + } + else if (btcKey.priv == null) { // enforce a minimum passphrase length if (key.length >= wallets.brainwallet.minPassphraseLength) { // Deterministic Wallet confirm box to ask if user wants to SHA256 the input to get a private key @@ -11630,7 +11660,64 @@ ninja.wallets.splitwallet = { return false; } return true; - } + }, + + // test checksum exceptions + testUncompressedWifShouldFailChecksum: function () { + // original key: 5KjQAHniFiy18SU7eenyJ9EPYUkjrbiBPfDqw987QjT5vehVQZV K->k + var key = "5kjQAHniFiy18SU7eenyJ9EPYUkjrbiBPfDqw987QjT5vehVQZV"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error.toString().indexOf("failed") == -1) { //Checksum validation failed! + return false; + } + return true; + + }, + testCompressedWifShouldFailChecksum: function () { + // original key: L5g9E16m5zEBZqQgMBouUfL6VwW49vCks1hgyxrPHkN8jNNdWTTk g->G + var key = "L5G9E16m5zEBZqQgMBouUfL6VwW49vCks1hgyxrPHkN8jNNdWTTk"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error.toString().indexOf("failed") == -1) { //Checksum validation failed! + return false; + } + return true; + + }, + // test range of valid private key values for the secp256k1 curve, when specified in hex is + // [0x1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140] + testBigIntegerZeroShouldSetError: function () { + var key = "0000000000000000000000000000000000000000000000000000000000000000"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + + }, + testBigIntegerOutOfCurveRangeShouldSetError1: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + }, + testBigIntegerOutOfCurveRangeShouldSetError2: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364142"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + }, + testBigIntegerOutOfCurveRangeShouldSetError3: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + } }, asynchronousTests: { diff --git a/bitaddress.org.html.sig b/bitaddress.org.html.sig index 1e29b05..ad49c02 100644 --- a/bitaddress.org.html.sig +++ b/bitaddress.org.html.sig @@ -1,11 +1,11 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 -iQEcBAABAgAGBQJXuj/DAAoJEIdJe5Fjl09axyIIAJSBaV3/yIX0oTVrvhbdLZrv -Odno0yBfsmQZNWKAKeQH1dp4FQ82w+9hDSQUczyj6kKfENhlnk+h6aiIXLcDXmth -7KFbEN2UhsuWW6wfvw5/FqUMnSoqGBAVBBpNi/ZnUxyYlZPDR7eyMJy+vfSQ1leN -27p2OIlusN30mCR8b32fQ8MOqovKsR4Jx+eGjRsk2aKcSOywE+08rRx9ATISXML8 -aaLQBAPjKgmJGUdWVma+qACJO5qcff7IaxOpXACcylVz3W0oDiPD6tWqT+6tnSNa -ZpwoJDVkJFTuawcrbrBxTm6Qbh6Dfn/IaEMlRleFT4iqBVk55nKC85EL+JcRXBU= -=c3ih +iQEcBAABAgAGBQJYOz47AAoJEIdJe5Fjl09ateQIANi2qaAdLvTsslWSUtLH7fn5 +1Ywej5Dm+qX/TuzIoQ/eAIAKtrJe3KiLioRONDbMqDMovuseQUDB6FBYOlhOSHUd +636Lwjs/aZW+weEgLnCi54JUj4/T/aaYZrQfzAvSFbj6G3mrc38xtB1anKJ6JmX0 +W482dWJR0+Ew0qB3419DKUtHUf8DjTlPT093H8HCb+DvCeWTxansnGXzAswxEJus +yio7wUnGNaB9/rcVncU1dUHYsnb0hkstIwmlIIKcgPV/siDWCPXcigTI0IFSRoOW +SrA+W9E5hWWxSYzzrzbW3iVJksT97ULXQOhzr3hy0ulUzTfqLZJmgNslfdfM3IU= +=sgFZ -----END PGP SIGNATURE----- diff --git a/package.json b/package.json index 7aac2c0..afa5bc8 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "bitaddress.org", - "version": "3.2.2", - "sha1sum": "324a332b3964f1631a4fb6e070b7f5748e5672f8", - "sha256sum": "f4d047c264a2b71946de319482a9365e56d8d7289dd85a352da3b1448b7647df", + "version": "3.2.3", + "sha1sum": "b8f7d12ddfef6561603f24a20478fad56abaca49", + "sha256sum": "c9a0bb3ed50aa75a5ae9c606d81e3fd41a4ff686ad38ad5379e2402f481e79a4", "description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator", "main": "Gruntfile.js", "dependencies": { diff --git a/src/bitcoinjs-lib.eckey.js b/src/bitcoinjs-lib.eckey.js index e1ab37d..8517e53 100644 --- a/src/bitcoinjs-lib.eckey.js +++ b/src/bitcoinjs-lib.eckey.js @@ -90,19 +90,23 @@ Bitcoin.ECKey = (function () { this.priv = BigInteger.fromByteArrayUnsigned(input); } else if ("string" == typeof input) { var bytes = null; - if (ECKey.isWalletImportFormat(input)) { - bytes = ECKey.decodeWalletImportFormat(input); - } else if (ECKey.isCompressedWalletImportFormat(input)) { - bytes = ECKey.decodeCompressedWalletImportFormat(input); - this.compressed = true; - } else if (ECKey.isMiniFormat(input)) { - bytes = Crypto.SHA256(input, { asBytes: true }); - } else if (ECKey.isHexFormat(input)) { - bytes = Crypto.util.hexToBytes(input); - } else if (ECKey.isBase64Format(input)) { - bytes = Crypto.util.base64ToBytes(input); + try{ + if (ECKey.isWalletImportFormat(input)) { + bytes = ECKey.decodeWalletImportFormat(input); + } else if (ECKey.isCompressedWalletImportFormat(input)) { + bytes = ECKey.decodeCompressedWalletImportFormat(input); + this.compressed = true; + } else if (ECKey.isMiniFormat(input)) { + bytes = Crypto.SHA256(input, { asBytes: true }); + } else if (ECKey.isHexFormat(input)) { + bytes = Crypto.util.hexToBytes(input); + } else if (ECKey.isBase64Format(input)) { + bytes = Crypto.util.base64ToBytes(input); + } + } catch (exc1) { + this.setError(exc1); } - + if (ECKey.isBase6Format(input)) { this.priv = new BigInteger(input, 6); } else if (bytes == null || bytes.length != 32) { @@ -114,7 +118,21 @@ Bitcoin.ECKey = (function () { } this.compressed = (this.compressed == undefined) ? !!ECKey.compressByDefault : this.compressed; - KeyPool.push(this); + try { + // check not zero + if (this.priv != null && BigInteger.ZERO.compareTo(this.priv) == 0) this.setError("Error: BigInteger equal to zero."); + // valid range [0x1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140]) + var hexKeyRangeLimit = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140"; + var rangeLimitBytes = Crypto.util.hexToBytes(hexKeyRangeLimit); + var limitBigInt = BigInteger.fromByteArrayUnsigned(rangeLimitBytes); + if (this.priv != null && limitBigInt.compareTo(this.priv) < 0) this.setError("Error: BigInteger outside of curve range.") + + if (this.priv != null) { + KeyPool.push(this); + } + } catch (exc2) { + this.setError(exc2); + } }; ECKey.privateKeyPrefix = 0x80; // mainnet 0x80 testnet 0xEF @@ -124,6 +142,15 @@ Bitcoin.ECKey = (function () { */ ECKey.compressByDefault = false; + /** + * Set whether the public key should be returned compressed or not. + */ + ECKey.prototype.setError = function (err) { + this.error = err; + this.priv = null; + return this; + }; + /** * Set whether the public key should be returned compressed or not. */ diff --git a/src/ninja.detailwallet.js b/src/ninja.detailwallet.js index bfe86e6..35eab17 100644 --- a/src/ninja.detailwallet.js +++ b/src/ninja.detailwallet.js @@ -50,7 +50,10 @@ keyToECKeyWithBrain: function (key) { var btcKey = new Bitcoin.ECKey(key); - if (btcKey.priv == null) { + if (btcKey.error != null) { + alert(translator.get("detailalertnotvalidprivatekey") + "\n" + btcKey.error); + } + else if (btcKey.priv == null) { // enforce a minimum passphrase length if (key.length >= wallets.brainwallet.minPassphraseLength) { // Deterministic Wallet confirm box to ask if user wants to SHA256 the input to get a private key diff --git a/src/ninja.unittests.js b/src/ninja.unittests.js index b4cb4c4..b45b39b 100644 --- a/src/ninja.unittests.js +++ b/src/ninja.unittests.js @@ -837,7 +837,64 @@ return false; } return true; - } + }, + + // test checksum exceptions + testUncompressedWifShouldFailChecksum: function () { + // original key: 5KjQAHniFiy18SU7eenyJ9EPYUkjrbiBPfDqw987QjT5vehVQZV K->k + var key = "5kjQAHniFiy18SU7eenyJ9EPYUkjrbiBPfDqw987QjT5vehVQZV"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error.toString().indexOf("failed") == -1) { //Checksum validation failed! + return false; + } + return true; + + }, + testCompressedWifShouldFailChecksum: function () { + // original key: L5g9E16m5zEBZqQgMBouUfL6VwW49vCks1hgyxrPHkN8jNNdWTTk g->G + var key = "L5G9E16m5zEBZqQgMBouUfL6VwW49vCks1hgyxrPHkN8jNNdWTTk"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error.toString().indexOf("failed") == -1) { //Checksum validation failed! + return false; + } + return true; + + }, + // test range of valid private key values for the secp256k1 curve, when specified in hex is + // [0x1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140] + testBigIntegerZeroShouldSetError: function () { + var key = "0000000000000000000000000000000000000000000000000000000000000000"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + + }, + testBigIntegerOutOfCurveRangeShouldSetError1: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + }, + testBigIntegerOutOfCurveRangeShouldSetError2: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364142"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + }, + testBigIntegerOutOfCurveRangeShouldSetError3: function () { + var key = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; + var btcKey = new Bitcoin.ECKey(key); + if (btcKey.error == null) { + return false; + } + return true; + } }, asynchronousTests: {