Resources for the global digital safety training community.
Credits Last Updated 2026-07
This activity runs participants through a very simple, but real-world example - the checksum of a credit card.
This activity runs participants through a very simple, but real-world “hash” example - the checksum of a credit card. It is less robust than the hash functions the rest of the lesson will focus on, but provides a tangible example.
If you’ve ever put your credit card number in a form and gotten an error before you even added the date or security code, this is how that happens. Almost every credit card number uses what’s called the Luhn Algorithm as a self-check.
We can test this ourselves!
It’s worth noting that this alone only lets you verify numbers (and generate test numbers), and indeed it’s an open standard. Without correct expiration dates, name, and security codes this is absolutely useless for payment activity.
5375 0869 1624 41355375 0869 1624 413314 4261 9680 57356 1 8 4 4 6 2 9 12 8 0 5 14 3 106 1 8 4 4 6 2 9 3 8 0 5 5 3 16+1+8+4+4+6+2+9+3+8+0+5+5+3+1=655More detail on credit card checksums is available at https://www.freeformatter.com/credit-card-number-generator-validator.html
This is a simple check that provides a way to validate a set of data. While credit cards are just a short string of numbers, a more complicated process could check for errors or typos – or changes – in other formats, including text, data, images, and video.
What if a system could provide more than just a format check, but a guarantee that a string of text or a file was - or was not - the same as another, or hadn’t changed?
Can participants come up with ideas where this might be useful?
If they are struggling, suggest things like copying or downloading files over bad connections, or checking to see if a file is a duplicate of another file.