Is the "bkp" component of a presale json file a SHA3 hash of the wallet password?


No. Your bkp is not the SHA3 of your password.

It's really quite simple. In the beginning, god said genwallet and...

  1. genwallet says:

    • genwallet(opts['seed'],pw,email)
  2. You say "here's my email and pw"

  3. seed says "give me super random number":

    • seed = random_key().decode('hex') # uses pybitcointools' 3-source random generator
  4. so now you need to get your encseed:

    • encseed = aes.encryptData(pbkdf2(pw),seed)
  5. so we head over to mr. aes and say whats up:

    • def encryptData(key, data, mode=AESModeOfOperation.modeOfOperation["CBC"], iv=None):
    • ........
    • ........
  6. and now you have your encseed.

  7. then you get the `ethpriv:

    • ethpriv = sha3(seed)
  8. and your address:

    • ethaddr = sha3(privtopub(ethpriv)[1:])[12:].encode('hex')
  9. and finally your bkp:

    • bkp = sha3(seed + '\x02').encode('hex')
  10. So your bkp is the sha3 of your seed plus essentially the number "2" (number "1" was used for your btcpriv to differentiate it from your ethpriv) encoded in hex.

  11. The bkp is a backup obviously. But its not a backup of your password. Its a backup of your seed.

    print "Your seed is:", getseed(b['withwallet'],w['bkp'],b['ethaddr'])

leads to...

def recover_bkp_pw(bkp,pw):
return getseed(bkp['withpw'],pw,bkp['ethaddr'])
"withpw": aes.encryptData(pbkdf2(pw),seed).encode('hex'),


def recover_bkp_wallet(bkp,wallet):
return getseed(bkp['withwallet'],wallet['bkp'],bkp['ethaddr'])
"withwallet": aes.encryptData(pbkdf2(wallet['bkp']),seed).encode('hex'),

Get it now?

same post / comment on reddit

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.