thedavidcoen on Nostr: A curiosity about Ethereum and Bitcoin that not many people know about. By default, ...
A curiosity about Ethereum and Bitcoin that not many people know about.
By default, Ethereum does not have a checksum in its addresses.
What does this mean?
Try entering this address into your wallet:
0x5f927395213ee6b95de97bddcb1b2b1c0f16844f
Now enter the address 0x5f927395213ee6b95de97bddbc1b2b1c0f16844f
Your wallet will consider both addresses valid.
However, if you look closely, the second address has two letters switched.
Assuming the first address is yours, if someone sends funds to the second address, they obviously wouldn't reach your wallet.
To address this problem, the Checksum was introduced as an extra solution.
To generate a checksum, the Ethereum address is first converted into a lowercase and uppercase version. Then, the checksum is calculated by hashing the address and comparing it to the lowercase and uppercase version. If the hashed address matches the lowercase or uppercase version, the checksum is considered valid.
Therefore,
0x5f927395213ee6b95de97bddcb1b2b1c0f16844f becomes 0x5F927395213ee6b95dE97bDdCb1b2B1C0F16844F and if you try to invert some letters, the new address will be considered invalid, provided your wallet supports checksum!
In Bitcoin, this does not happen: there is no extra solution applied.
The reason is simple: addresses are already generated with a checksum.
So, if we take a random address 1L7s77cV9hCAGPXo2SNmLmQ3FaPstYJVcT and switch two letters, obtaining 1L7s77cV9hCAGPXo2SNmLmQ3FaPtsYJVcT, if we scan the address, our wallet will show us an error (invalid address).
Satoshi was foresighted!
Nakamoto 1: Buterin 0
Published at
2023-03-03 11:41:16Event JSON
{
"id": "9215b1f4d68a8206726954aee0f97f513b7548a5efade9c314fa7289183f7078",
"pubkey": "a976156de0384616921e32bfc8314cc647d33843af649d2d91faabb2450b808d",
"created_at": 1677843676,
"kind": 1,
"tags": [],
"content": "A curiosity about Ethereum and Bitcoin that not many people know about.\n\nBy default, Ethereum does not have a checksum in its addresses.\nWhat does this mean?\nTry entering this address into your wallet:\n0x5f927395213ee6b95de97bddcb1b2b1c0f16844f\n\nNow enter the address 0x5f927395213ee6b95de97bddbc1b2b1c0f16844f\n\nYour wallet will consider both addresses valid.\nHowever, if you look closely, the second address has two letters switched.\nAssuming the first address is yours, if someone sends funds to the second address, they obviously wouldn't reach your wallet.\n\nTo address this problem, the Checksum was introduced as an extra solution.\n\nTo generate a checksum, the Ethereum address is first converted into a lowercase and uppercase version. Then, the checksum is calculated by hashing the address and comparing it to the lowercase and uppercase version. If the hashed address matches the lowercase or uppercase version, the checksum is considered valid.\n\nTherefore,\n0x5f927395213ee6b95de97bddcb1b2b1c0f16844f becomes 0x5F927395213ee6b95dE97bDdCb1b2B1C0F16844F and if you try to invert some letters, the new address will be considered invalid, provided your wallet supports checksum!\n\nIn Bitcoin, this does not happen: there is no extra solution applied.\nThe reason is simple: addresses are already generated with a checksum.\n\nSo, if we take a random address 1L7s77cV9hCAGPXo2SNmLmQ3FaPstYJVcT and switch two letters, obtaining 1L7s77cV9hCAGPXo2SNmLmQ3FaPtsYJVcT, if we scan the address, our wallet will show us an error (invalid address).\n\nSatoshi was foresighted!\nNakamoto 1: Buterin 0",
"sig": "1cb53d8fe949909a138cfb0e0032b04721e5da43130896652f3f1fc091b8fd5e04a80c1212e9854fe185848ae4e2f97a8724f11bc7b7a8bcdfe712f721e515e8"
}