I wonder how EIP 55 check proves an address is actually an Ethereum address, or does it prove this at all?
Am I missing an obvious point in Vitalik's code below from EIP 55?
from ethereum import utils
def checksum_encode(addr): # Takes a 20-byte binary address as input
o = ''
v = utils.big_endian_to_int(utils.sha3(addr.hex()))
for i, c in enumerate(addr.hex()):
if c in '0123456789':
o += c
else:
o += c.upper() if (v & (2**(255 - 4*i))) else c.lower()
return '0x'+o
def test(addrstr):
assert(addrstr == checksum_encode(bytes.fromhex(addrstr[2:])))
P.S. I've checked the answers here and here, but none answer my exact question.