Skip to content
Web Design & Development

Password Storage: The Decisions That Matter

How applications store user passwords so that a database breach does not reveal them, using slow, salted password hashing algorithms.

MediaScaleUp Editorial Team 2 min read 8 views
Password Storage: The Decisions That Matter

What is at stake

Passwords stored with fast hashes or encryption are cracked quickly after a breach, exposing users who reuse them elsewhere.

The playbook

  1. Use the framework's built-in password hashing
  2. Choose Argon2id or bcrypt with appropriate cost settings
  3. Rehash passwords when algorithms or costs are upgraded
  4. Rate-limit login attempts
  5. Offer multi-factor authentication

Where it goes wrong

Avoid:

  • Custom password hashing schemes
  • Encrypting passwords so they can be decrypted
  • Emailing passwords to users
  • Logging passwords in error logs
What to do and what to avoid with password storage, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Password Storage
MeasureFigure
OWASP recommendationArgon2id, with scrypt and bcrypt as alternatives
Saltinga unique salt per password, handled by modern algorithms
Neverstore passwords in plain text or with fast hashes such as MD5 or SHA-1
FrameworksLaravel, PHP and Node.js libraries provide built-in password hashing

Getting outside help

When to hand it over: Bring in help when inheriting a legacy system with weak password storage, or after a suspected breach.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Web Design & Development