– Hash sum or check sum can be defined as the small sized datum that has been computed using a block of digital block chosen arbitrarily.

– Check sums are used in the purpose of error detection.

– During the transmission or storage of the data, the errors might have crept in.

– At any time later, the integrity of the data can be verified.

– This is done by re-computation of the hash sum and carrying out a comparison between the stored check sum and the currently computed one.

– If there exists a match between the two check sums, this means that no accidental alteration was made to the data.

**– A check sum algorithm or check sum function is the procedure that is used for yielding the check sum from the given data.**

**– Yielding result with a high probability for the accidentally altered data is a characteristic of a good check sum algorithm.**

– Now in this case, if a match is found, the high probability means that the data is free from errors to the extent denoted by the probability.

**Check sum algorithms are related to the following other algorithms and functions:**

- Hash functions
- Fingerprints
- Randomization functions
- Cryptographic hash functions

– However, the above mentioned concepts have different design goals and thus different applications also.

– It should be noted that in a security related application, check sums should not be used as they do not consist of properties that are necessary for the protection of data from accidental or intentional tampering.

**Two special cases of checksums are:**

- Check digits and
- Parity bits

**Both of these cases are suitable for blocks of data of small size such as in the following applications:**

- Social security numbers
- Bank account numbers
- Computer words
- Single bytes and so on

– There are special check sums up on which the correcting codes are based.

– These correcting codes are capable of detecting common errors as well as recovering the data back to original form in some cases.

## What is Longitudinal Parity Check?

– This one is the simplest of all the check sum algorithms.

– Here, the data is broken down in to words of fixed length or number of bits.

– Then the algorithm produces the exclusive OR results of all the words.

– This result in form of an extra word is attached to the message.

– Now for checking the integrity of the message, the exclusive OR of the words can be computed by the receiver.

– This includes the check sum also.

– If the result does not consist of n zeroes, then the receiver will come to know that an error has occurred during the transmission.

– The error during transmission that flipped even a single message bit or odd number of message bits will be considered to be an incorrect check sum.

– Suppose there are two bits lying at the same position in two different words.

– In such a case those two bits will also be chosen independently.

## What is Modular Sum?

– This is a modified form of the parity check algorithm.

– It adds up all the words by considering them as unsigned binary numbers.

– Any overflowing bits are discarded and the 2’s complement of the result is appended to the message as the check sum. – For the validation purpose, the words are added up by the receiver in the same way as in previous algorithm.

– Here also, if the result does not have n number of zeroes, an error is said to have occurred.

## What is Position Dependent Check sums?

– The above mentioned check sum algorithms are not capable of detecting some more common errors that impact multiple bits at the same time.

– These errors may be insertion or deletion of words, making changes to the word order etc.

**For such cases, the following algorithms are commonly used:**

- Fletcher’s checksum
- Adler – 32
- Cyclic redundancy check

– These algorithms consider both the position of the word in sequence and its value. However the cost is too high.

## Leave a Reply