liveBook · Manning

Password hashing

As explained in Fundamentals of Cybersecurity

Password hashing is the application of a cryptographic hash function to a password before storing it so the original password is not directly retained.

Password hashing transforms a password with a cryptographic function before storing it. The result, called a hash or digest, is stored instead of the original password. At login, the system hashes the password entered and compares the result with the stored digest. section 12.3.3

A stored digest

Hashing “mypassword123” with SHA-256 produces a string of characters rather than a readable copy of the password. The displayed digest is an example of what a password database might hold. section 12.3.3

A stolen digest does not directly reveal the password. An attacker can still guess passwords, hash each guess, and look for a match. Short or predictable passwords and weak or fast hashing algorithms make that attack easier. section 12.3.3

Attack
Definition
Defense
Hash
Login
Brute Force
Systematically tries all possible password combinations until the correct one is found.
Strong passwords, lockouts, MFA
Yes
Yes
Password Spraying
Attempts a small number of common passwords across many accounts to avoid account lockouts.
Lockouts, user training, MFA
No
Yes
Dictionary
Tests a predefined list of common passwords, words, and predictable variations to guess credentials.
Unique, passwords, MFA
Yes
Yes
Rainbow Table
Uses precomputed hash lookup tables to identify passwords from unsalted password hashes.
Salting, complex passwords
Yes
No

Compare attacks on stored hashes with attacks on the login page. The table identifies salting as a defense against rainbow-table attacks on unsalted hashes. section 12.3.3

How Fundamentals of Cybersecurity covers it

How deep it goes
Explains digest storage, login comparison, and guessing attacks, while deferring fuller cryptographic detail.
Examples
Uses a SHA-256 password digest and a table comparing password attacks and defenses.
What you can do after
Evaluate/understand why stored digests limit direct exposure but do not prevent password guessing.
How it connects
Connects cryptographic hashes to password cracking, brute-force attacks, salting, and rainbow tables.

Also explained in

Compare how 6 books explain password hashing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fundamentals of Cybersecurity. The section links point to the parts of the book it draws on.