Loading AI tools
Commonly used, legacy checksum algorithm From Wikipedia, the free encyclopedia
The SYSV checksum algorithm was a commonly used, legacy checksum algorithm. It has been implemented in UNIX System V and is also available through the sum command line utility.
This algorithm is useless on a security perspective, and is weaker than the CRC-32 cksum for error detection.[1][2]
The main part of this algorithm is simply adding up all bytes in a 32-bit sum. As a result, this algorithm has the characteristics of a simple sum:[2]
As a result, many common changes to text data are not detected by this method.
The FreeBSD pseudocode for this algorithm is:
s = sum of all bytes;
r = s % 2^16 + (s % 2^32) / 2^16;
cksum = (r % 2^16) + r / 2^16;
The last part folds the value into 16 bits.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.