What is a checksum and how does it work?

1.11K views

What is a checksum and how does it work?

In: Technology

4 Answers

Anonymous 0 Comments

A checksum is like a numerical fingerprint. You do some math on your data (a document, a program, a media file, etc.) and get back a relatively short number. If the data changes, you will almost certainly get a different number the next time you run a checksum, which will let you know something is up.

The actual math varies and can be simple or very complex. Dividing by 9 and checking the remainder was commonly used back when everything was computed by hand. Modern checksums try to cryptographically secure, meaning it is hard to find two sets of data that give the same result, even when trying to do this.

Anonymous 0 Comments

add the shit and check the sum.

all data in a computer can be digested as a series of numbers. therefore, you can sum them. you sum them, possibly do something with the sum (e.g run it through a hash algorithm, which returns a fixed length piece of data from which it is supposed to be impossible to find the original data) and compare. simple pimple.

why? to check integrity. you post a file and the checksum. if the checksum of the file you downloaded and the checksum they posted are not the same, a different file was downloaded. the point of a hash algorithm is such that if you add one or subtract one from the entire set of data, you get atleast a 50% difference in the end result.

Anonymous 0 Comments

You can try checksums yourself with a credit card number:

https://en.wikipedia.org/wiki/Luhn_algorithm

Double every other number starting with the 2nd then add all of the resulting digits (so 12 would be 1+2). The result will be a multiple of 10. Always. If you miss or swap a digit, the checksum is off (not a multiple of 10). That allows web pages to detect typos immediately, rather than spend time (and money) looking it up in the credit card network.

Anonymous 0 Comments

A checksum is a simple piece of data that, with high probability, tells you whether a message was recieved correctly. It could be adding up of ASCII character values to a number, hashes, cyclic redundancy checks, etc., as long as the input of some message A will always result in the same output. If the checksum does not match the sent data, request the data again.

What if the checksum itself gets damaged? Well, the thing is, a good checksum function will have an extremely low rate of false positives (saying that a corrupt message is good). It may have false negatives, but then the message can simply be requested again. This is important, since that message could be computer code. Executing corrupted code can cause all sorts of issues. This is why checksums are important, they make the probability of accepting corrupted messages near-impossible.