Checksum
Encyclopedia : C : CH : CHE : Checksum
- This article is about checksums calculated using addition. The term "checksum" is sometimes used in a more general sense to refer to any kind of redundancy check. Checksums on decimal numbers are discussed under check digit.
The simplest form of checksum, which simply adds up the asserted bits in the data, cannot detect a number of types of errors. In particular, such a checksum is not changed by:
- reordering of the bytes in the message
- inserting or deleting zero-valued bytes
- multiple errors which sum to zero
These types of redundancy check are useful in detecting accidental modification such as corruption to stored data or errors in a communication channel. However, they provide no security against a malicious agent as their simple mathematical structure makes them trivial to circumvent. To provide this level of integrity, the use of a cryptographic hash function, such as SHA-256, is necessary. (Collisions have been found in the popular MD5 algorithm and finding collisions in SHA-1 seems possible, but there is no evidence as of 2006 that SHA-256 suffers similar weaknesses.)
On Unix, there is a tool called "cksum" that generates both a 32 bit CRC and a byte count for any given input file.
See also
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
