A Simple Modular Checksum
A simple checksum can sum fields and retain a remainder. It detects some changes while different input tuples may share one result.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a toy eight-value checksum
Fields 3 and 6 yield sum nine and remainder one modulo eight. Fields 4 and 5 have the same checksum. See quotient and remainder.
Check which claim is supported
A matching checksum does not prove all fields are identical, and exact detection depends on the rule. Checking external bytes with a reference provides a separate integrity workflow.[1][2]
Compute a modular sum and exhibit a collision
A toy checksum adds data bytes modulo 256. Values 10 and 20 give 30. Values 11 and 19 also give 30, so opposite changes can go undetected. The checksum has a defined detection ability under some error patterns. See wraparound counters.
Original 10+20=30
Change one byte to 11 → 31
Change both to 11 and 19 → 30 again
Swapping the two bytes also preserves the sum
Use the actual guaranteed properties in validation
A modular sum can catch some accidental changes. It supplies no origin authentication. Compare errors affecting one byte with ones preserving the sum.