World Library  
Flag as Inappropriate
Email this Article

SYSV checksum

Article Id: WHEBN0021350935
Reproduction Date:

Title: SYSV checksum  
Author: World Heritage Encyclopedia
Language: English
Subject: List of hash functions, Checksum
Publisher: World Heritage Encyclopedia

SYSV checksum

The SYSV checksum algorithm is commonly used, legacy checksum algorithms. It has been implemented in UNIX System V and is also available through the GNU sum command line utility.

Newer checksum algorithms

The manual page of the GNU sum utility program (that implements the BSD checksum algorithm) states: "sum is provided for compatibility; the cksum program is preferable in new applications."

Description of the algorithm

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 (disadvantages and advantages) of a simple sum:

  • re-arranging the same bytes in another order (e.g. moving text from one place to another place) does not change the checksum.
  • increasing one byte and decreasing another byte by the same amount does not change the checksum.
  • adding or removing zero bytes does not change the checksum.

As a result, many common changes to text data are not detected by this method.

The last two lines of the algorithm reduce the total sum to a 16-bit number.


  • official GNU sum manual page
  • coreutils download page --- find and unpack the newest version of the coreutils package, read src/sum.c
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.