What Is Checksum? Errors, Types and How It Works
Trabzon Üniversitesi · Sürekli Eğitim Uygulama Ve Araştırma Merkezi · Trabzon
Yayın: 30 Eylül 2026 · Toplandı: 20 saat önce
Introduction
What if a single small value could reveal that your data was corrupted without you noticing? A Checksum helps answer that question by providing a way to detect accidental changes in data during storage or transmission. From file downloads to network communication, Checksums play an important role in checking data integrity.
Understanding what is Checksum and how it works is essential for identifying data corruption and transmission errors. Different Checksum methods provide different levels of error detection, making it important to understand their types, limitations, and practical uses. In this blog, we will explore how Checksums work, common Checksum types, and what a Checksum error means.
What Is a Checksum?
A Checksum is a compact value calculated from a block of data using a specific algorithm. It acts as a quick way to check whether data has been changed or corrupted during transmission or storage. When the same algorithm is applied to identical data, it produces the same Checksum value, making it useful for basic data integrity checks.
However, a Checksum cannot guarantee that every possible change will be detected. Different data can sometimes produce the same Checksum value, a situation known as a collision. Therefore, the reliability of error detection depends on the Checksum algorithm used and the type of data changes or errors being considered.
What Is Checksum Error?
A Checksum error occurs when the Checksum calculated from received data does not match the Checksum value expected or transmitted with that data. This mismatch indicates that the data may have been corrupted, altered, or damaged during storage or transmission.
Checksum errors can result from network interference, transmission problems, hardware faults, or data corruption. While a Checksum can help detect an error, it generally cannot identify the exact cause or repair the corrupted data.
The meaning depends on where the error appears:
| Where it appears | What the error indicates | First thing to check |
| Downloaded software | File does not match its reference Checksum | Exact release and download completeness |
| Compressed archive | An integrity check failed during extraction | Damaged or missing archive parts |
| Network packet capture | A packet Checksum appears invalid | Capture location and Checksum offloading |
| Stored data or backup | Read data failed its stored integrity check | Storage logs and another verified copy |
The error identifies a failed check, but further investigation is needed to find its cause.
How Does a Checksum Work?
The calculation varies by algorithm, but the basic process follows three steps.
1. Calculate a Reference Value
The sender or storage system calculates a Checksum over a defined set of bytes. This could cover an entire file, a packet header or another block of data.
2. Send or Store the Checksum
The value accompanies the data or is published separately. Software publishers, for instance, may provide a file hash beside a download.
3. Validate the Data
The receiving system performs the corresponding calculation and checks the result. A mismatch signals an integrity problem. A match means the check passed, within the algorithm’s detection limits.
How is the Internet Checksum Calculated?
The Internet Checksum used by TCP and UDP uses 16-bit one’s-complement arithmetic:
- Divide the covered bytes into 16-bit words.
- Add the words, wrapping any carry beyond 16 bits back into the sum.
- Invert every bit of the final sum to generate the Checksum.
- At the receiver, add the covered words and Checksum together. An all-ones result passes validation.
A Simple Calculation Example
Here is a smaller, 8-bit illustration of the same method. Real Internet Checksums use 16 bits.
| Step | Calculation | Result |
| Add two data values | 100 + 50 | 150 |
| Invert the 8-bit sum | 255 − 150 | Checksum = 105 |
| Validate received values | 100 + 50 + 105 | 255: passes |
| Validate after 50 changes to 51 | 100 + 51 + 105 | 256, wrapped to 1: fails |
Why does 256 become 1? In eight bits, 256 leaves a lower-byte value of zero and a carry of one. Adding that carry back gives 1, which fails the expected all-ones check.
This example also shows a limitation. If the values change to 101 and 49, their sum remains 150. The same Checksum passes despite the altered data.
Types of Checksums and Integrity Checks
Checksums are often used broadly to refer to several types of integrity-checking mechanisms. Their calculations, capabilities, and limitations differ.
1. Additive and Internet Checksums
Additive Checksums combine numerical values from the data. They are simple to calculate, but some changes can cancel each other out. The Internet Checksum uses the one’s-complement method explained above. It is designed for detecting accidental errors, not authenticating the sender.
2. Cyclic Redundancy Check (CRC)
A CRC uses polynomial arithmetic on bits rather than ordinary addition. It is widely used to detect accidental corruption. For example, the gzip file format stores a CRC-32 value for its uncompressed data. An extraction tool can use that value to check the recovered content. CRC is not a cryptographic security mechanism.
3. Adler-32
Adler-32 maintains two running sums and combines them into a 32-bit Checksum. It is used in the zlib compressed-data format. The second sum incorporates the running first sum, making the calculation sensitive to byte order in ways a basic sum is not. Collisions are still possible.
4. Cryptographic Hashes
Algorithms such as SHA-256 produce hashes commonly used to verify downloaded files. They are designed to make finding different inputs with the same hash computationally difficult. Older algorithms, including MD5 and SHA-1, should not be relied on for protection against deliberate tampering. A hash also needs a trustworthy reference: an attacker who replaces both a file and its published hash can defeat a simple comparison.
Checksum Error in Networking
A Checksum error in networking means that a packet’s protected contents failed Checksum validation. The protected portion depends on the protocol.
IPv4 Checks the Header:
The IPv4 Checksum covers only the IPv4 header, not the payload. Routers update it when covered fields change, such as the Time to Live (TTL) value. A valid IPv4 header Checksum therefore does not prove that the application data is intact.
TCP Checks More Than the Header:
TCP covers its header, payload and a pseudo-header containing selected IP information. The receiver discards segments with invalid Checksums. TCP’s separate loss-recovery mechanisms can then trigger retransmission.
The Checksum detects the problem; it does not repair the damaged bytes. A completely missing packet also cannot be Checksum-tested, because there is nothing to inspect.
UDP Checksums Depend on the IP Version:
UDP also calculates its Checksum over its header, data and an IP pseudo-header. In IPv4, a zero-Checksum field means the sender did not provide a Checksum. For IPv6, UDP Checksums are generally required, with limited exceptions for specific tunnelling uses. Unlike TCP, UDP does not provide its own retransmission mechanism. If corrupted data is discarded, any recovery must come from the application or another protocol operating above UDP.
Why Wireshark May Show an Apparent Error?
Checksum offloading lets a network adapter finish the calculation. A local capture may record an outgoing packet before that happens.
The packet can therefore appear invalid in the capture even though it leaves the adapter with a correct Checksum. Before treating a warning as a Checksum error in computer networks, check the capture point and offloading behaviour.
What Causes Checksum Errors?
Common causes include:
- Incomplete Transfers: A download or copy ends before all expected bytes arrive.
- Storage or Memory Faults: Data changes while being stored, read or processed.
- Wrong Reference Values: The Checksum belongs to another release, platform or file.
- Stale Caches: A package and its verification metadata come from different versions.
- Modified Content: Software, a transfer process or an attacker changes the bytes.
A mismatch alone does not tell you which explanation applies. Start with the file, operation and system that reported it.
How to Check and Fix a Checksum Error?
Here the following are the key points to check and fix a Checksum error.
Confirm the Algorithm and File Version: Use the algorithm specified by the publisher. A SHA-256 result cannot be compared with an MD5 value. Match the exact filename, release and platform before assuming corruption.
Calculate the File Hash
- In Windows PowerShell, this command calculates a file’s SHA-256 hash:
- Get-FileHash -Path .\installer.iso -Algorithm SHA256
- Replace installer.iso with your filename. Compare the entire result with the publisher’s trusted reference value. Renaming a file does not change its content hash.
- On Linux, you can calculate the same hash with:
- sha256sum installer.iso
If the publisher supplies a compatible Checksum list named SHA256SUMS, place it beside the downloaded files and run:
sha256sum -c SHA256SUMS
Check the result for your exact file. An OK result means its calculated hash matches the listed value; FAILED means it does not. Verify a signed Checksum list against the publisher’s trusted signing key before relying on its contents.
Retry the Transfer and Investigate Repeated Failures:
Download a fresh copy from the official source. For package errors, refresh the relevant metadata or cache using the package manager’s documented procedure. If the same file repeatedly fails, check whether the source copy or reference value is wrong. If unrelated files fail on one computer, investigate its storage, memory and transfer path rather than repeatedly downloading everything.
Verify the Replacement:
Run the check again after downloading, restoring or copying the data. Disabling verification only hides the warning; it does not resolve the mismatch.
Keep the Original Evidence:
Before replacing a failed file, record its filename, expected Checksum, calculated Checksum and source URL. For network captures, note whether the packet was captured on the sending computer or another device. These details make repeated failures easier to compare. They also help support teams distinguish a consistently incorrect source file from an intermittent problem affecting different downloads.
Can Checksums Prevent Every Error?
Checksums are designed to detect accidental changes or corruption in data, but they cannot prevent every type of error. A Checksum can indicate that the received data differs from the expected data, but it generally cannot repair the corrupted data, identify the exact cause of the error, or prove who created or sent the data.
For example, a Checksum may detect that a downloaded file was modified or corrupted during transfer, but it does not establish whether the file came from a trusted source. For important downloads, use a trusted cryptographic hash and, when available, verify the publisher’s digital signature. In networking, identify the protocol, Checksum mechanism and capture conditions before diagnosing a transmission or integrity problem.
The useful first question is simple: Which data was checked, which algorithm was used, and what expected value was it compared against? Answering these questions helps determine whether the Checksum actually provides meaningful evidence of data integrity.
Conclusion
Checksum errors indicate that data failed an integrity check, but they do not explain the cause by themselves. The problem may come from corrupted files, incomplete transfers, incorrect reference values, storage issues or network behaviour. Identifying where the error appears and which algorithm was used helps narrow the cause. Checksums, CRCs, and cryptographic hashes use different mechanisms and provide different levels and types of integrity protection. When an error occurs, verify the source, calculate the Checksum again and investigate repeated failures carefully.
FAQs
Q1. What is a Checksum Error?
A Checksum error occurs when the calculated integrity value of data does not match the expected value, indicating possible corruption or modification.
Q2. What Causes Checksum Errors?
Checksum errors can result from incomplete downloads, damaged storage, memory faults, incorrect reference values, stale caches or changes made during transmission.
Q3. How do I Fix a Checksum Error?
Verify the algorithm and file version, calculate the Checksum again, download a fresh copy and investigate storage or network issues if failures continue.
Q4. Are Checksum Errors Always Caused by Corrupted Data?
No. A Checksum mismatch may also result from an incorrect reference value, a different file version, a caching issue or network Checksum offloading behaviour.
Bu metin Trabzon Üniversitesi sitesinden otomatik olarak alınmıştır. Tarih, başvuru koşulları ve ekler için kaynağı esas alın.