Hashing and Digital Signatures
Use cryptographic hash functions correctly, build a message authentication code with HMAC (and see why a naive hash-based MAC is broken), and sign and verify real data with Ed25519 — the same signature scheme used by SSH, Tor, and modern TLS certificates.
Prerequisites: Completion of Public Key Cryptography; Python 3.10+ with cryptography installed.
Verified against the pyca/cryptography documentation and Python's hashlib/hmac standard library docs, July 2026. EdDSA (the signature scheme family Ed25519 belongs to) has been a NIST-approved digital signature algorithm since FIPS 186-5 (2023); nothing about the core hashing or signature APIs used here has changed across recent cryptography releases (verified current on 49.0.0). SHA-256 remains a fully valid, current NIST- and OWASP-recommended hash algorithm as of this writing — it has not been deprecated, and nothing in this project should be read as implying otherwise.
A cryptographic hash function takes input of any size and produces a fixed-size, deterministic "fingerprint": the same input always produces the same output, a tiny change in input produces a completely different output (the avalanche effect), and it should be computationally infeasible to find two different inputs that produce the same output (a collision) or to work backward from an output to any input that produces it.
That's it — a hash on its own proves nothing about who produced a piece of data, only that the data matches a fingerprint you already trust. This project builds up from that primitive to two things that add authenticity: MACs (prove a message came from someone who holds a shared secret) and digital signatures (prove a message came from someone who holds a specific private key, verifiable by anyone with the public key, without the signer and verifier ever sharing a secret). This is also a good place to flag a common mix-up head-on: cryptographic hashes like SHA-256 are fast by design, which is exactly why they're the wrong tool for hashing passwords — that gets its own project later in this roadmap.
Hash functions in practice
MACs, and why hashing a secret with the message isn't enough
Digital signatures with Ed25519
Putting it together: a sign-then-verify integrity workflow
Secret Mission: build a signed manifest tool
Before You Go
Test what you just learned
Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.
Log in to unlock0 / 7 complete
