To check the integrity of a message, the receiver computes the exclusive or of all its words, including the checksum if the result is not a word consisting of n zeros, the receiver knows a transmission error occurred. In simpler terms, this means adding a bit to the end of the word to guarantee that there is an even number of '1's. The result is appended to the message as an extra word. The simplest checksum algorithm is the so-called longitudinal parity check, which breaks the data into "words" with a fixed number n of bits, and then computes the exclusive or (XOR) of all those words. Some error-correcting codes are based on special checksums which not only detect common errors but also allow the original data to be recovered in certain cases.Īlgorithms Parity byte or parity word For cryptographic systems with these two specific design goals, see HMAC.Ĭheck digits and parity bits are special cases of checksums, appropriate for small blocks of data (such as Social Security numbers, bank account numbers, computer words, single bytes, etc.). Checksums are used as cryptographic primitives in larger authentication algorithms. For instance, a function returning the start of a string can provide a hash appropriate for some applications but will never be a suitable checksum. However, each of those concepts has different applications and therefore different design goals. This is especially true of cryptographic hash functions, which may be used to detect many data corruption errors and verify overall data integrity if the computed checksum for the current data input matches the stored value of a previously computed checksum, there is a very high probability the data has not been accidentally altered or corrupted.Ĭhecksum functions are related to hash functions, fingerprints, randomization functions, and cryptographic hash functions. Depending on its design goals, a good checksum algorithm usually outputs a significantly different value, even for small changes made to the input. The procedure which generates this checksum is called a checksum function or checksum algorithm. By themselves, checksums are often used to verify data integrity but are not relied upon to verify data authenticity. Effect of a typical checksum function (the Unix cksum utility)Ī checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage.
0 Comments
Leave a Reply. |