Checksum Addresses: How Blockchains Add a Layer of Security
One of the biggest benefits extolled by blockchain advocates is that it is secure. The word ‘immutable’ is often used, and advocates say that checking for things like fraud becomes simple on an open-sourced distributed ledger – a blockchain. Another built in feature that can help protect you and your funds is the checksum address.
A checksum address is a quick way to verify if a number, or set of data, has been altered, either intentionally or unintentionally. The main benefit of this is you will not inadvertently send your Bitcoin to a non-existent address, simply because you typed one of the address digits wrong.
A checksum is created by running an algorithm on a piece of data, which produces a checksum number, often called a hash. The hash can then be sent along with the original set of data. The receiver of the data can then use the hash to verify with a high probability that the data has not been altered or corrupted.
How checksum addresses work
If you needed to send 5 digits to someone and wanted make sure they were not altered during transmission, for example, you could attach a checksum. If both the sender and receiver of the data agree on a number, it can be used to divide the sum of the 5 numbers being sent. The remainder of this number becomes the checksum number.
For example, if we wanted to send the numbers: 11, 8, 9, 14, 17.
We can produce a checksum by adding 11 + 8 + 9 + 14 + 17 which equals 59.
If our sender and receiver agree on the number 12 for a divisor then 59 / 12 = 4 (with a remainder of 11)
The remainder 11 becomes the checksum. It is added to the end of the data and transmitted like this 11, 8, 9, 14, 17, (11). Notice how the 11 in the brackets is added to the end of the transmission to signify that it is the checksum, not a number in the original transmission.
Now, if for any reason during transmission the 5 numbers were altered in any way the remainder of the checksum algorithm would change. For example, if the 5 numbers sent changed slightly 10, 8, 9, 14, 17, the remainder would become 10. This new set of numbers would not match the original checksum of 11.
A number like 12 is a great choice to illustrate how a checksum works, however, it would not be very practical if you truly needed to verify your data. If the 5 numbers were sufficiently altered it could easily produce the same checksum. For example, 10, 7, 8, 13, 21, would also produce a checksum address of 11.
Knowing this, developers use vastly larger numbers to assure a much higher degree of certainty that the data is correct.
Applying a checksum address to digital currency transactions
Bitcoin addresses are created with a built in checksum code. Generally speaking, it is not possible to send Bitcoin to a mistyped address. The hash value and checksum data in a Bitcoin address are converted into an alpha-numeric representation using a custom scheme, called the Base58Check encoding scheme.
The checksum is stored directly in the address and if any of the address were to be mistyped, the built-in checksum would not match the checksum of the mistyped address. If this happens, your wallet should, in theory, not allow you to send a transaction.
Many other digital currencies feature built-in checksum addresses. All digital currencies that are based on Bitcoin will have a checksum number built into their addresses. Similarly, Ethereum uses its own modified version of a checksum, which capitalizes some of the alpha-numeric characters.
Using checksums in your transactions
Theoretically speaking it could be possible to mistype a Bitcoin address and it still match the checksum address, however, the chances of that happening are 1 in 4,294,967,295, according to crypto educational website Learnmeabitcoin.
Really no one should ever be typing in a digital currency address, because not only are they very long, it is also very easy to make a mistake. Public addresses that are used for sending and receiving digital funds, should be copy and pasted if possible.
There are times when this is not practical, for example, if you have been storing your funds in cold storage or a paper wallet. In cases like these, it is very important to double, and triple check that you have inputted the address correctly. If for some reason you do type the address incorrectly, it’s good to know the checksum is there to notify your wallet of an invalid address.
Image Credit: Altcoin Today
Buy Bitcoin, Ethereum, XRP, and other cryptocurrencies on Coinsquare, Canada’s premier trading platform.
Get the latest blockchain and digital currency news from Canada and around the world, delivered each week to your inbox.
Your Email address