Skip to content

Commit

Permalink
Bump version. update README, RELEASE-NOTES
Browse files Browse the repository at this point in the history
  • Loading branch information
coder5876 committed May 26, 2016
1 parent 3880d18 commit 81f9a96
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

A minimal ethereum javascript wallet.

## Security advisory

Please make sure to update to version 2.3.3. Previous versions contained a bug that could generate addresses that were unrelated to the HD seed if the wrong value of `pwDerivedKey` was passed in to `generateNewAddress()`. This could lead to loss of funds.

## About

LightWallet is a HD wallet that can store your private keys encrypted in the browser to allow you to run Ethereum dapps even if you're not running a local Ethereum node. It uses [BIP32][] and [BIP39][] to generate an HD tree of addresses from a randomly generated 12-word seed.
Expand Down
5 changes: 5 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes #

## Version 2.3.3 - 2016-05-26 ##

* Fixed a bug which would create random addresses if the wrong
pwDerivedKey was used.

## Version 2.3.2 - 2016-04-06 ##

* Add "var" statements for function declarations. Thanks to [dalexj](https://github.com/dalexj) and [pipermerriam](https://github.com/pipermerriam).
Expand Down
9 changes: 7 additions & 2 deletions dist/lightwallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,16 @@ KeyStore.prototype._generatePrivKeys = function(pwDerivedKey, n, hdPathString) {
}

var hdRoot = KeyStore._decryptString(this.ksData[hdPathString].encHdPathPriv, pwDerivedKey);

if (hdRoot.length === 0) {
throw new Error('Provided password derived key is wrong');
}

var keys = [];
for (var i = 0; i < n; i++){
var hdprivkey = new bitcore.HDPrivateKey(hdRoot).derive(this.ksData[hdPathString].hdIndex++);
var privkeyBuf = hdprivkey.privateKey.toBuffer();

var privkeyHex = privkeyBuf.toString('hex');
if (privkeyBuf.length < 16) {
// Way too small key, something must have gone wrong
Expand Down Expand Up @@ -479,7 +484,7 @@ KeyStore.prototype.isDerivedKeyCorrect = function(pwDerivedKey) {
}

return false;

};

// Takes keystore serialized as string and returns an instance of KeyStore
Expand Down
22 changes: 11 additions & 11 deletions dist/lightwallet.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eth-lightwallet",
"version": "2.3.2",
"version": "2.3.3",
"description": "A lightweight ethereum javascript wallet.",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 81f9a96

Please sign in to comment.