Checksum is a simple cryptographic function that allows us to verify and know exactly if a Bitcoin address is spelled correctly. A simple utility that allows us to identify typing or other errors. All in order to avoid losing our funds by sending our bitcoins to an address that is poorly formed.
LA checksum or CheckSum is a simple function that is used to detect that a series of data or files has not been modified. A very useful function to guarantee the integrity and protection of information when it is stored or shared with other users on the network.
Its functionality is based on a simple verification algorithm that allows creating small hash or character strings that can then be used to verify before or after a data transmission, the validity of the transmitted data. Such a hash is usually located at the bottom of the verified file or string. And in this way, they serve as a signature to help verify the integrity of the information.
Very useful for example, when we want to include an automatic verification that allows us to know if what we write or the data that has reached us really represents the desired information.
In this sense, the checksum in Bitcoin (and in other cryptocurrencies) they are widely used, and here we will learn more about this small but powerful function, and how it helps us make Bitcoin a much safer development for everyone.
CheckSum Origin
The appearance of the first CheckSum functions date from the initial works of William Wesley Peterson, a computer scientist and mathematician who spent several years researching, designing, and implementing the world's first CheckSum. More specifically, Peterson designed the first CheckSum or checksum function, in the year of 1961, the well-known CRC (Verification by cyclical redundancy), which would later give life to industrial standards such as CRC8 or CRC32C, among others derived from very wide use.
Since then, CheckSum or checksum functions have been an essential part of our lives. From a simple CD player, through televisions, digital-analog conversion systems and vice versa, data transmissions by cable (such as the Ethernet of our computers) or by radio (such as those made by our cell phones). In short, the usefulness of checksum is gigantic and surely is present in things that you would not even remotely think have it applied.
On the other hand, William W. Peterson was a great developer of technologies and programming language enhancement, until his death on May 6, 2009. In his honor, the companies Intel and AMD added the CRC32c function to their respective processors. This is Peterson's most widely known checksum function, and is still widely used in the industry.
How does CheckSum work?
The CheckSum function was created from the application of a simple algorithm. This aims to use a series of complex mathematical and logical operations to convert a data stream into a fixed number string known as Checksum hash.
This small hash is then used to very quickly verify if a certain data has been damaged. Either by storage (data written or read incorrectly) or by transmission thereof (transmission networks always have a loss related to different factors). Or even if some malicious actor has deliberately modified it.
So, how this function allows verifying the integrity of information, is widely used when sharing or storing data on the network. Since the data, being accompanied by the hash values generated from themselves through a hash function, they acquire some extra properties that allow them to be verified and validated themselves when they are shared or stored.
For example, if a user wants to share a file on the network with another user, he must supply a hash value of the file so that this same value can be obtained when applying the hash function on that file. Then guaranteeing that the shared file did arrive correctly and without alterations to its recipient.
Likewise, when archiving and storing information, it can be verified later by calculating and saving the result of the hash value obtained. Thus, when a check is needed, the saved hash value can be used to know if the information has been altered or not, for whatever reason.
CheckSum function use cases
The use cases of the CheckSum functions are widely varied. As we have already mentioned, they are very fundamental parts in electronic devices and computing in general. But in order that you can understand more clearly the scope of the same, we will see below some real and very daily use cases of these functions:
GSM technology
The GSM technology that makes it possible for us to use most of our cell phones today makes extensive use of the checksum functions in their digital voice and data transmission systems. Let us remember that the digital information that is sent to the cellular network is encoded, compressed and modulated in such a way that it can get from one point to another in the cellular network with the least loss of information and quality.
But being a data network of the wireless type there are various factors that alter the quality of the information sent. Any type of interference can cause loss of information and with it, we will lose quality of services. Checksum functions are used to deal with this situation. Thanks to these functions, the network can quickly verify that the information sent and received is in perfect condition, and if it is not, if an error is detected, the network is able to try to correct it, most of the time successfully .
So yes, thanks to the checksum functions, you have high quality voice calls, messaging and data on our current cellular networks.
Bank accounts
Another very common use of checksum functions is to verify that the information in a bank account is correct. Every time you see a bank account number, you don't just see a group of numbers that identify you within that bank. But there is also a data that allows them to verify that those numbers that you have given are correct.
For example, in IBAN type bank accounts, these control or checksum numbers are the first four digits. The first two indicate the country of origin of the account, and the other two indicate the control number. This control number is related to the last 10 numbers that identify the bank account. And this guarantees us that we will not make a mistake when entering a bank account number.
Cryptocurrency addresses
Through the CheckSum or checksum function you can quickly and easily verify that the address you are using is correct. Or if, on the contrary, it is altered in any way. Avoiding unconsciously sending your cryptocurrencies to a false, incorrect or non-existent address.
Although, in theory, it would be impossible to send bitcoins to an address that does not exist or that is written incorrectly. Because these addresses, when generated, incorporate a checksum code. This data represents the hash value of the address and the data of the sum make up an own alphanumeric scheme known as Base58Check.
This saves the checksum directly within the address. And thus, if an address is entered incorrectly, the checksums of both addresses do not match. In this way, the wallet prevents a transaction from being made when addresses are entered incorrectly.
In Bitcoin the hash function SHA-256 it is applied twice to generate a 32-byte hash, where the first 4 bytes (32-bit) are taken as the checksum to detect typos in the addresses. And, although through this verification sum the keys associated with the address cannot be obtained, if it allows the verification of said keys. Thus, it is possible to avoid making an error when making a transaction.
This simple procedure ensures that you cannot go wrong when entering a Bitcoin address. In fact, the probability that you are wrong is 1 in 4.294.967.295.