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
- Open the interactive lesson, with a mini quiz.
- Take the Security & Cryptography quiz.
- Explore the Hash Table visualizer: Hash function, buckets and chaining collisions.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- 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?
Where do people use Passwords and Hashing?
What is the most common mistake with Passwords and Hashing?
What should I learn before this topic?
How can I practice it?
Is Passwords and Hashing hard to learn?
How long does it take to learn Passwords and Hashing?
Which topics are related to Passwords and Hashing?
What should I study after Passwords and Hashing?
Related topics
- Threats and Vulnerabilities (Security & Cryptography)
- Salting (Security & Cryptography)
- CIA Triad (Security & Cryptography)
- Multi-Factor Authentication (Security & Cryptography)
- Consistent Hashing (Distributed Systems & Cloud)
- Cuckoo Hashing (Data Structures)