Hash Functions and Checksums
Map data to short fixed-size values; check digits use modular arithmetic.
Key idea
Map data to short fixed-size values; check digits use modular arithmetic.
In depth
A hash maps data to a fixed-size value. Checksums detect accidental errors (for example ISBN and credit card digits); cryptographic hashes also resist deliberate collisions. Pigeonhole implies collisions exist.
Worked example
ISBN-10 check: Σ i × dᵢ ≡ 0 (mod 11).
Real-world uses
- Verifying downloaded files and barcodes
- Storing passwords as hashes in databases
Common mistake
Using a checksum where an attacker could forge data.
How to learn this
- Read the key idea and say it in your own words.
- Work through the worked example, then try a similar problem.
- Use the interactive lesson’s visual and mini-quiz to check the pattern.
Frequently asked questions
What is Hash Functions and Checksums?
Map data to short fixed-size values; check digits use modular arithmetic. It is a topic at the advanced level in Discrete Math & Number Theory.
Where is Hash Functions and Checksums used in real life?
Real-world examples: Verifying downloaded files and barcodes; Storing passwords as hashes in databases.
What should I learn before Hash Functions and Checksums?
Make sure you are comfortable with Diffie–Hellman Key Exchange, the previous topic in Discrete Math & Number Theory.
What is a common mistake with Hash Functions and Checksums?
Using a checksum where an attacker could forge data.
How can I practise Hash Functions and Checksums?
Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.
What comes after Hash Functions and Checksums?
Move on to Boolean Algebra next.
Related advanced topics in Discrete Math & Number Theory
- Tautologies and Contradictions – Always true or always false statements.
- Logical Equivalence – Statements with identical truth tables.
- De Morgan’s Laws – Negation swaps AND and OR.
- Converse and Contrapositive – A conditional equals its contrapositive.
- Quantifiers – “For all” and “there exists”.
- Negating Quantified Statements – Flip the quantifier and negate the predicate.