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...
You say "here's my email and pw"
seed = random_key().decode('hex') # uses pybitcointools' 3-source random generator
encseed = aes.encryptData(pbkdf2(pw),seed)
def encryptData(key, data, mode=AESModeOfOperation.modeOfOperation["CBC"], iv=None):
and now you have your encseed.
ethpriv = sha3(seed)
ethaddr = sha3(privtopub(ethpriv)[1:])[12:].encode('hex')
bkp = sha3(seed + '\x02').encode('hex')
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.
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'])
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?