Checksum: Difference between revisions

m
(Undid revision 916302136 by 72.33.2.146 (talk) Datum is the singular form.)
{{Multiple issues|
{{Refimprove|date=August 2012}}
{{onesourceMore citations needed|date=OctoberAugust 20182012}}
{{one source|date=October 2018}}
}}
 
[[File:Checksum.svg|thumb|330px|right|Effect of a typical checksum function (the Unix <tt>[[cksum]]</tt> utility)]]
 
The actual [[algorithm|procedure]] which yields the checksum from a data input is called a '''checksum function''' or '''[[checksum algorithm]]'''. Depending on its design goals, a good checksum algorithm will usually output a significantly different value, even for small changes made to the input. This is especially true of [[cryptographic hash function]]s, 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.
 
Checksum functions are related to [[hash function]]s, [[fingerprint (computing)|fingerprint]]s, [[randomization function]]s, and [[cryptographic hash function]]s. However, each of those concepts has different applications and therefore different design goals. 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. Checksums are used as [[Cryptographic_primitive|cryptographic primitivesprimitive]]s in larger authentication algorithms. For cryptographic systems with these two specific design goals, see [[Hash-based message authentication code|HMAC]].
 
[[Check digit]]s and [[parity bit]]s are special cases of checksums, appropriate for small blocks of data (such as [[Social Security number]]s, [[bank account]] numbers, [[Word (data type)|computer word]]s, single [[byte]]s, etc.). Some [[error-correcting code]]s are based on special checksums which not only detect common errors but also allow the original data to be recovered in certain cases.