# The sum checksum can be forced to any value, and here's how

Original title: Colliding the Sum Checksum (2019)

> Hacker News story 49618149 · language: en · submitted 2026-09-08
> Web version: https://zeli.app/story/49618149
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 6 · by [mooreds](<https://news.ycombinator.com/user?id=mooreds>) · 💬 0
[original](<https://mcpherrin.ca/2019/11/23/sum-collisions.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49618149>)

## Summary

The sum command-line tool uses a 16-bit checksum that is trivially insecure. I wrote a tool that, using a meet-in-the-middle attack, can set the sum of a file to any desired value by inserting bytes at a chosen offset. The attack exploits the reversibility of the sum algorithm and the small hash space, finding collisions in a split second. This could let a student forge a file that matches a previously submitted checksum.

## Key quote

> Using a non-cryptographically secure hash for this task is totally insecure, as a malicious student could find another file which has the same checksum as what was submitted on the paper handout.

---

## Cite

- Page: https://zeli.app/story/49618149
- Date: 2026-09-08
- Source: mcpherrin.ca (https://mcpherrin.ca/2019/11/23/sum-collisions.html)
- Hacker News: https://news.ycombinator.com/item?id=49618149

## Other languages

- zh: https://zeli.app/zh/story/49618149 · markdown: https://zeli.app/zh/story/49618149.md
- ja: https://zeli.app/ja/story/49618149 · markdown: https://zeli.app/ja/story/49618149.md
- ko: https://zeli.app/ko/story/49618149 · markdown: https://zeli.app/ko/story/49618149.md
- de: https://zeli.app/de/story/49618149 · markdown: https://zeli.app/de/story/49618149.md
- es: https://zeli.app/es/story/49618149 · markdown: https://zeli.app/es/story/49618149.md
- ru: https://zeli.app/ru/story/49618149 · markdown: https://zeli.app/ru/story/49618149.md
