trezor: explicit hardened derivation

This commit is contained in:
Roman Zeyde
2015-06-23 08:59:10 +03:00
parent 0bb3f15aef
commit 3c1c1d0e0c

View File

@@ -79,8 +79,9 @@ def _get_address(ident):
digest = formats.hashfunc(addr).digest()
s = io.BytesIO(bytearray(digest))
hardened = 0x80000000
address_n = [22] + list(util.recv(s, '<LLLL'))
return [-a for a in address_n] # prime each address component
return [(hardened | value) for value in address_n]
def _parse_ssh_blob(data):