LearnViz CompSci
Home / Learn / Security & Cryptography / Passwords and Hashing

Beginner Topic 3 of 51 Security & Cryptography

Passwords and Hashing

Storing credentials as one-way digests.

How it works

Systems should never store passwords themselves but only the output of a one-way hash computed with a slow, memory-hard algorithm such as Argon2, scrypt, bcrypt or PBKDF2. At login, the supplied password is hashed with the stored salt and compared. Slowness makes brute-force guessing expensive when a database leaks. Users should choose long, unique passphrases and use password managers, and sites can check against lists of breached passwords.

Where it is used

Every application with accounts needs proper password storage, and password managers and single sign-on reduce reliance on reused passwords.

Common pitfall

Fast hashes such as MD5 or plain SHA-256 allow billions of guesses per second on GPUs. Storing passwords in plaintext or reversible encryption, and sending them by email, are serious errors. Composition rules that force symbols invite predictable patterns. Add rate limiting, multi-factor authentication and breach monitoring.

Where it fits in the course

Passwords and Hashing is topic 3 of 51 in Security & Cryptography, rated Beginner. It follows Threats and Vulnerabilities. The next topic is Salting.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Security & Cryptography quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Passwords and Hashing?
Storing credentials as one-way digests. It belongs to Security & Cryptography and is a beginner-level topic.
Where do people use Passwords and Hashing?
Every application with accounts needs proper password storage, and password managers and single sign-on reduce reliance on reused passwords.
What is the most common mistake with Passwords and Hashing?
Fast hashes such as MD5 or plain SHA-256 allow billions of guesses per second on GPUs.
What should I learn before this topic?
Start with Threats and Vulnerabilities, the topic just before it in Security & Cryptography.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Security & Cryptography quiz. You can also explore Hash Table in the Visual Lab.
Is Passwords and Hashing hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Passwords and Hashing?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Passwords and Hashing?
Threats and Vulnerabilities, Salting, CIA Triad are closely connected. The full list is in the related topics section of this page.
What should I study after Passwords and Hashing?
Continue with Salting, the next topic in Security & Cryptography.

Related topics