C
Cybersecurity Fundamentals/Module 4: Encryption & Data Security

Video coming soon

BEGINNERModule 4Lesson 3

Hashing

15 min read+50 XP
Module progress3 of 6 lessons

Visual · hash_digest

A meat grinder turning a large document into a fixed-length string of alphanumeric characters.

The Digital Fingerprint

We learned that encryption is a two-way street—you can lock data, and later, you can unlock it. But what if you want to protect a password so well that nobody, not even the server administrators, can ever unlock it or read it? Welcome to Hashing: the mathematical one-way street.

1. What is a Hash?

A hash function takes any amount of data (a single word, or an entire 100GB movie) and crunches it into a fixed-length string of random characters, known as a hash or "digest".

  • Example

    The word "Apple" might always hash to 7f4c9b...

  • Avalanche effect

2. The One-Way Rule

Unlike encryption, hashing cannot be reversed. There is no "decryption key." If you have the hash 7f4c9b..., no mathematical formula in the universe can reverse it back into the word "Apple."

3. How Websites Store Passwords Safely

When you create an account on a secure website, they do not store your actual password. They run your password through a hashing algorithm and only store the resulting hash. When you log in tomorrow, the server hashes what you just typed, and compares it to the hash in their database. If the hashes match, you are granted access. If a hacker steals the database, they only get a list of useless hashes, not the actual passwords!

Pro-Tip: Data Integrity Checks

Hashing isn't just for passwords; it enforces the "I" (Integrity) in the CIA Triad. If you download a critical software update, the developer will provide the official hash. If the hash of your downloaded file matches the developer's hash, you know the file was not corrupted or secretly infected with malware by a hacker.

Knowledge Check

Which of the following is the fundamental difference between Encryption and Hashing?\n\nA) Hashing is faster than Encryption.\nB) Encryption is a two-way process (can be reversed), while Hashing is a one-way process (cannot be reversed).\nC) Hashing requires a public and private key.

Guest mode — log in to track XPFinish the knowledge check to complete.