Password Security: Creating, Storing, and Managing Secure Passwords
Password breaches happen constantly. In 2024, billions of credentials were exposed. Yet many people still use weak passwords, reuse passwords across sites, and store them insecurely. Understanding password security—both how to create strong passwords and how to implement secure password systems—is critical for every technologist.
This guide covers password fundamentals, strength evaluation, password managers, and secure implementation practices for developers and users alike.
What Makes a Strong Password?
NIST Guidelines (Modern Standard)
The National Institute of Standards and Technology (NIST) updated password guidance in 2017:
- Length matters most: 8+ characters minimum, 12+ is better
- Common lists: Avoid passwords in breached/common password lists
- No composition rules: Uppercase/lowercase/numbers/symbols NOT required
- Change passwords rarely: Only if breached
- Context-specific: Site-specific vs. memorable is less important
Why Length Beats Complexity
"aB3$" (8 chars, complex) - Easy to crack
"correct horse battery staple" (28 chars) - Much harder to crack
"correct-horse-battery-staple" (passphrase) - Much more secure
Entropy Calculation
Password strength is measured in bits of entropy:
- 12 characters, lowercase only: ~56 bits (breakable in days)
- 16 characters, mixed case: ~94 bits (breakable in months)
- 16 characters, mixed + symbols: ~105 bits (decades to crack)
- Passphrase 6 words: ~77 bits (depends on dictionary)
Creating Memorable Yet Secure Passwords
Password Strategy 1: Passphrases
Combine random words:
correct-horse-battery-staple
mountain-river-thunder-silence
purple-elephant-dancing-wednesday
Advantages: Memorable yet secure. Use 4-6 random words separated by hyphens.
Password Strategy 2: Patterns with Substitution
MyFav0riteB00k_2024!
StartWith@Title$AddSymbols
Create base pattern (sentence start), add numbers/symbols. Mix case for variation.
Password Managers: The Modern Solution
Best practice: Use a password manager. Generate unique 20+ character random passwords for each site.
How it works:
- Password manager generates random passwords (e.g., "Xq7#kL9mP2@wR4vN$")
- Stores encrypted in password manager vault
- You remember only manager master password
- Auto-fills passwords on websites
Popular options: 1Password, Bitwarden, LastPass, KeePass
For Developers: How to Store Passwords
❌ WRONG: Store passwords in plaintext
user = {
username: "john",
password: "mypassword123" // ❌ NEVER!
}
✅ RIGHT: Hash passwords with salt
// Use bcrypt, Argon2, or PBKDF2
const hashedPassword = await bcrypt.hash(password, 10);
const isValid = await bcrypt.compare(password, hashedPassword);
Key requirement: Use slow hashing algorithms (bcrypt, Argon2) with salt. Never use MD5 or SHA256 directly for passwords.
Common Password Mistakes
- ❌ Same password for multiple sites (one breach compromises everything)
- ❌ Passwords based on personal info (birthdate, pet names)
- ❌ Simple patterns (Password1, letmein)
- ❌ Dictionary words (especially common ones)
- ❌ Storing passwords in documents or emails
- ❌ Sharing passwords with others
- ❌ Never changing passwords (unless breached)
Evaluating Password Strength
Use password strength checkers:
- haveibeenpwned.com: Check if password in breach databases
- Password strength meters: Online checkers estimate entropy
- NIST guidelines: 8+ characters, avoid common lists
Multi-Factor Authentication (MFA)
Even with perfect passwords, add second factor:
- Authenticator apps: Google Authenticator, Authy (time-based codes)
- SMS codes: Less secure but better than nothing
- Hardware keys: YubiKey, FIDO2 (most secure)
- Biometric: Fingerprint, face recognition
Best Practices Summary
- For users: Use passphrase or password manager. Enable MFA.
- For developers: Hash with bcrypt/Argon2, require MFA, never share passwords.
- For organizations: Password policies emphasizing length, MFA enforcement, regular audits.
Key Takeaways
- Length beats complexity: 16 characters better than 8 with symbols
- Use password managers: Generate unique passwords for each site
- Enable MFA: Second factor critical even with strong passwords
- Hash with salt: Bcrypt/Argon2 for password storage
- Avoid breached passwords: Check haveibeenpwned.com
Next Steps
- Audit your current passwords on haveibeenpwned.com
- Install a password manager
- Change passwords for critical accounts (email, banking)
- Enable MFA everywhere possible
Password security is everyone's responsibility. Strong, unique passwords and MFA are the foundation of account security in a world of frequent breaches.