Skip to main content
replaced http://ethereum.stackexchange.com/ with https://ethereum.stackexchange.com/
Source Link

Since Ethereum addresses don't have checksumsEthereum addresses don't have checksums, should ICAP addressesICAP addresses (which do have a checksum) be proliferated?

Or are there other options more suitable for the proliferation of checksummed Ethereum addresses?

For example, would this Ethereum Improvement Proposal (EIP) or some other be more suitable (for say an HD walletHD wallet)?

# code from EIP linked above
def checksum_encode(addr): # Takes a 20-byte binary address as input
    o = ''
    v = utils.big_endian_to_int(utils.sha3(addr))
    for i, c in enumerate(addr.encode('hex')):
        if c in '0123456789':
            o += c
        else:
            o += c.upper() if (v & (2**(255 - i))) else c.lower()
    return '0x'+o

Since Ethereum addresses don't have checksums, should ICAP addresses (which do have a checksum) be proliferated?

Or are there other options more suitable for the proliferation of checksummed Ethereum addresses?

For example, would this Ethereum Improvement Proposal (EIP) or some other be more suitable (for say an HD wallet)?

# code from EIP linked above
def checksum_encode(addr): # Takes a 20-byte binary address as input
    o = ''
    v = utils.big_endian_to_int(utils.sha3(addr))
    for i, c in enumerate(addr.encode('hex')):
        if c in '0123456789':
            o += c
        else:
            o += c.upper() if (v & (2**(255 - i))) else c.lower()
    return '0x'+o

Since Ethereum addresses don't have checksums, should ICAP addresses (which do have a checksum) be proliferated?

Or are there other options more suitable for the proliferation of checksummed Ethereum addresses?

For example, would this Ethereum Improvement Proposal (EIP) or some other be more suitable (for say an HD wallet)?

# code from EIP linked above
def checksum_encode(addr): # Takes a 20-byte binary address as input
    o = ''
    v = utils.big_endian_to_int(utils.sha3(addr))
    for i, c in enumerate(addr.encode('hex')):
        if c in '0123456789':
            o += c
        else:
            o += c.upper() if (v & (2**(255 - i))) else c.lower()
    return '0x'+o
Source Link
eth
  • 86.5k
  • 53
  • 287
  • 411

What options are suitable for Ethereum addresses with checksums?

Since Ethereum addresses don't have checksums, should ICAP addresses (which do have a checksum) be proliferated?

Or are there other options more suitable for the proliferation of checksummed Ethereum addresses?

For example, would this Ethereum Improvement Proposal (EIP) or some other be more suitable (for say an HD wallet)?

# code from EIP linked above
def checksum_encode(addr): # Takes a 20-byte binary address as input
    o = ''
    v = utils.big_endian_to_int(utils.sha3(addr))
    for i, c in enumerate(addr.encode('hex')):
        if c in '0123456789':
            o += c
        else:
            o += c.upper() if (v & (2**(255 - i))) else c.lower()
    return '0x'+o