{"action":"created","issue":{"url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/60","repository_url":"https://api.github.com/repos/ConsenSys/eth-lightwallet","labels_url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/60/comments","events_url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/60/events","html_url":"https://github.com/ConsenSys/eth-lightwallet/issues/60","id":135819014,"number":60,"title":"Astronomical issue with private keys to sign tx.","user":{"login":"chrisforrester","id":16688316,"avatar_url":"https://avatars.githubusercontent.com/u/16688316?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisforrester","html_url":"https://github.com/chrisforrester","followers_url":"https://api.github.com/users/chrisforrester/followers","following_url":"https://api.github.com/users/chrisforrester/following{/other_user}","gists_url":"https://api.github.com/users/chrisforrester/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisforrester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisforrester/subscriptions","organizations_url":"https://api.github.com/users/chrisforrester/orgs","repos_url":"https://api.github.com/users/chrisforrester/repos","events_url":"https://api.github.com/users/chrisforrester/events{/privacy}","received_events_url":"https://api.github.com/users/chrisforrester/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-23T18:16:23Z","updated_at":"2016-02-24T21:51:28Z","closed_at":null,"body":"secret seed is \"erupt consider beyond twist bike enroll you salute weasel emerge divert hundred\"\r\n\r\nwith keystore password \"password\"\r\nwith hdPath = \"m/44'/60'/0'\"\r\n\r\nthe private key that is returned is a 62 character hex value.\r\n\r\n\r\nexample code:\r\n(using lightwallet.keystore.deriveKeyFromPassword(password, function(err, pwDerivedKey))\r\n\r\nvar keystore = new lightwallet.keystore(secretSeed, pwDerivedKey);\r\nvar hdPath = \"m/44'/60'/0'\"; //as defined in SLIP44    \r\n\r\nkeystore.addHdDerivationPath(hdPath, pwDerivedKey, {curve: 'secp256k1', purpose: 'sign'});\r\nkeystore.generateNewAddress(pwDerivedKey, 1, hdPath);  //Generate a new address\r\n\r\nvar incompleteAddress = keystore.getAddresses(hdPath)[0];\r\nkeystore.setDefaultHdDerivationPath(hdPath);\r\nvar hexSeedETH = keystore.exportPrivateKey(incompleteAddress, pwDerivedKey);\r\n\r\n\r\n\r\n..\r\n\r\nhexSeedETH.length = 62.\r\n\r\n\r\nsomething like a:\r\n\r\nfunction pad(num, size) {\r\n    var s = num+\"\";\r\n    while (s.length < size) {\r\n        s = \"0\" + s;\r\n    }\r\n    return s;\r\n}\r\n\r\nwith a:\r\n\r\nhexSeedETH = pad(hexSeedETH, 64);\r\n\r\nreturns valid private keys that can sign for this address for the ethereumjs-tx module, and this library's signtx function.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/comments/188468072","html_url":"https://github.com/ConsenSys/eth-lightwallet/issues/60#issuecomment-188468072","issue_url":"https://api.github.com/repos/ConsenSys/eth-lightwallet/issues/60","id":188468072,"user":{"login":"chrisforrester","id":16688316,"avatar_url":"https://avatars.githubusercontent.com/u/16688316?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisforrester","html_url":"https://github.com/chrisforrester","followers_url":"https://api.github.com/users/chrisforrester/followers","following_url":"https://api.github.com/users/chrisforrester/following{/other_user}","gists_url":"https://api.github.com/users/chrisforrester/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisforrester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisforrester/subscriptions","organizations_url":"https://api.github.com/users/chrisforrester/orgs","repos_url":"https://api.github.com/users/chrisforrester/repos","events_url":"https://api.github.com/users/chrisforrester/events{/privacy}","received_events_url":"https://api.github.com/users/chrisforrester/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T21:51:28Z","updated_at":"2016-02-24T21:51:28Z","body":"@christianlundkvist yep :) it was a longshot to have caught it this early.\r\n\r\n"}}