Ethereum wallet passwords
- A password is now generated for each privkey in Ethereum key-address list
- As with Monero wallet passwords (df03851), password is first 16 bytes of
SHA256x2(privkey)
- Password can be used with geth's private.importRawKey() method to create a
relatively secure online wallet. Unlock using private.unlockAccount()
This commit is contained in:
parent
dd1300d946
commit
f14606669e
5 changed files with 8 additions and 2 deletions
|
|
@ -85,6 +85,10 @@ class AddrGeneratorEthereum(AddrGenerator):
|
|||
import sha3
|
||||
return CoinAddr(sha3.keccak_256(pubhex[2:].decode('hex')).digest()[12:].encode('hex'))
|
||||
|
||||
def to_wallet_passwd(self,sk_hex):
|
||||
from mmgen.protocol import hash256
|
||||
return WalletPassword(hash256(sk_hex)[:32])
|
||||
|
||||
def to_segwit_redeem_script(self,pubhex):
|
||||
raise NotImplementedError,'Segwit redeem script not supported by this address type'
|
||||
|
||||
|
|
|
|||
|
|
@ -739,6 +739,8 @@ class MMGenAddrType(str,Hilite,InitErrors,MMGenObject):
|
|||
'compressed':False,
|
||||
'gen_method':'ethereum',
|
||||
'addr_fmt':'ethereum',
|
||||
'wif_label':'privkey:',
|
||||
'extra_attrs': ('wallet_passwd',),
|
||||
'desc':'Ethereum address' },
|
||||
'Z': { 'name':'zcash_z',
|
||||
'pubkey_type':'zcash_z',
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -541,8 +541,8 @@ cfgs = {
|
|||
'ref_keyaddrfile_chksum_zec_z': '6B87 9B2D 0D8D 8D1E',
|
||||
'ref_keyaddrfile_chksum_xmr': 'E0D7 9612 3D67 404A',
|
||||
'ref_keyaddrfile_chksum_dash': 'E83D 2C63 FEA2 4142',
|
||||
'ref_keyaddrfile_chksum_eth': '3635 4DCF B752 8772',
|
||||
'ref_keyaddrfile_chksum_etc': '9BAC 38E7 5C8E 42E0',
|
||||
'ref_keyaddrfile_chksum_eth': 'E400 70D9 0AE3 C7C2',
|
||||
'ref_keyaddrfile_chksum_etc': 'EF49 967D BD6C FE45',
|
||||
'ref_passwdfile_chksum': 'A983 DAB9 5514 27FB',
|
||||
# 'ref_fake_unspent_data':'98831F3A_unspent.json',
|
||||
'ref_tx_file': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue