Cryptographic Hash Functions

Introduction

In earlier parts of this course you used hash functions to spread keys across buckets in a hash table. The goal there was speed and even distribution; if two keys occasionally collided, chaining or probing handled it. Cryptographic hash functions start from the same basic idea — map arbitrary input to a fixed-size digest — but add security requirements that general-purpose hashes never promise: it must be infeasible to recover an input from its digest (preimage resistance), infeasible to find two inputs with the same digest (collision resistance), and a one-bit change in the input should scramble roughly half the output bits (the avalanche effect).

These properties are what make a digest usable as a stand-in for data itself: in file integrity checks, digital signatures, message authentication codes, blockchain structures, and — with important caveats covered later in this module — password storage. They also explain why algorithm choice matters. MD5 still computes quickly and is still seen in legacy systems, but practical collision attacks have broken it for any security purpose; SHA-256, part of the SHA-2 family, remains the common default for integrity and signing work.

As you watch, keep two questions in your head. First, which security property is each example relying on — is the system protected because digests are hard to invert, or because collisions are hard to find? Second, notice how small an input change needs to be before the digest becomes unrecognizable; that visual demonstration of the avalanche effect is the fastest way to internalize why digests work as fingerprints.

Video 1: TLS Essentials 5: Integrity with cryptographic hash functions

Cyrill Gössi · 7:50 · 743 views · 3y ago · captions — Watch on YouTube

About this video

Part of a TLS course, this lesson explains how cryptographic hash functions provide integrity, covering the defining properties of such functions and how they are used to detect tampering with transmitted data. It frames hashing inside a real protocol rather than as an abstract exercise.

Why this video

It directly addresses the security-properties and role-in-security-systems subtopics, and Cyrill Gössi's TLS series is a careful, well-structured treatment aimed at learners who need correctness as well as intuition.

Video 2: Cryptography with Python 26: Using MD5, SHA-1, SHA-2, SHA-3 in Python

Cyrill Gössi · 11:42 · 629 views · 4y ago · captions — Watch on YouTube

About this video

A hands-on Python walkthrough showing how to compute digests with MD5, SHA-1, SHA-2 and SHA-3 using standard library tooling. It compares the algorithms side by side so you can see differences in digest length and usage.

Why this video

Running the same input through MD5 and SHA-256 yourself is the most concrete way to grasp digest sizes, the avalanche effect, and why the older algorithms are treated as legacy; it maps directly onto the MD5 and SHA-2 subtopics.

Video 3: What are Hash Functions? | Hashing Data Structure

Dinesh Varyani · 10:38 · 14,543 views · 5y ago · captions — Watch on YouTube

About this video

A data-structures-oriented introduction to hash functions: what a hash function is, how it maps keys to fixed-size outputs, what makes a hash function good, and how collisions arise. Expect animated slides and worked examples in the style of a standard DSA course module.

Why this video

It establishes the general-purpose baseline you need before you can see what the word "cryptographic" adds, which is exactly the first subtopic here; Dinesh Varyani's DSA series is a widely used, clearly animated reference for this material.

How These Videos Support the Learning Outcomes

Together these videos build the foundation MO1 depends on: the DSA video anchors what an ordinary hash function does, the TLS lesson adds the security properties — preimage resistance, collision resistance, avalanche — that distinguish cryptographic hashes and separates hashing from encryption in a protocol context, and the Python walkthrough lets you compare MD5, SHA-1, SHA-2 and SHA-3 in practice. The integrity focus of the TLS video also previews MO4, since checksums, HMACs and signatures all rest on these same guarantees. Understanding why fast general-purpose digests like MD5 and SHA-256 behave as they do is the prerequisite for the later discussions of password-specific algorithms, salting and work factors in MO2, MO3 and MO5.

About These Videos

These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.