← All guides

How to set a password policy that actually works (with real entropy numbers)

Start with NIST's length rules, compare what random generators produce, and test the whole account lifecycle before rollout.

Set a length floor and keep the form usable

Start by listing every path where an account can use a password. Include the web form, mobile app, password reset and any legacy interface. A short minimum that assumes multi-factor authentication (MFA) makes sense only when the password is used exclusively as part of MFA. If an older sign-in path accepts the password alone, treat that path as single-factor or retire it.

For verifiers following NIST SP 800-63B-4, section 3.1.1.2, the minimum for a single-factor password is 15 characters. For passwords used only as part of MFA, the standard permits a shorter minimum with a floor of eight characters. NIST recommends permitting a maximum of at least 64 characters and accepting printable ASCII, including spaces. It requires verifying the full submitted password without truncation. Test both ends of your supported range in enrollment, sign-in and reset.

Remove rules that force a mix of character classes. NIST prohibits those composition requirements and routine periodic changes. Require a change when evidence shows that the authenticator has been compromised. For example, a verified disclosure of a current credential should trigger your incident response process. Put the reset and account review steps in the incident runbook so an administrator knows what to do when evidence arrives.

Compare the entropy of actual generators

A site's length floor defines what it accepts. The generation process determines how unpredictable the credential is. For independent uniform draws, entropy in bits equals draws × log2(number of choices per draw). Calculate it using the full pool available to the generator, even if a particular output happens to omit one class. These figures are rounded to one decimal place.

Policy or generator settingAssumptionEntropy
8 lowercase characters8 random draws from 26 choices37.6 bits
8 characters from a mixed pool8 random draws from 95 choices52.6 bits
15 lowercase characters15 random draws from 26 choices70.5 bits
16 letters and digits16 random draws from 62 choices95.3 bits
Six-word passphrase6 random draws from the EFF long list77.5 bits
Minimum length plus a required digit and symbolPeople choose their own stringsUndetermined by the rule

The 95-choice row models a generator with all those options available at each position. A rule requiring a digit and a symbol does not make people sample uniformly. Patterns such as a capitalized word followed by a year and punctuation can satisfy the rule while staying predictable. Use the password entropy calculator to compare random character settings, the password combination calculator to vary the assumed guessing rate, and the password strength checker with invented examples to see how recognizable patterns affect a heuristic rating.

Screen common passwords and let managers fill them

At enrollment and password changes, NIST requires comparing the complete candidate against a blocklist of common, expected or compromised passwords. Include relevant service-specific choices and passwords from breach lists. Compare whole values so a long passphrase can contain ordinary words. If the candidate matches, explain why it was rejected and direct the person to choose a different one.

NIST requires support for password managers and autofill and recommends allowing paste. Test all three on enrollment, sign-in and reset, including the mobile app where applicable. Use synthetic credentials to check for client-side length limits and silent changes. A password manager can generate a distinct password for each service, which limits the usefulness of a credential leaked elsewhere.

Use random passphrases where people need to type

For credentials people need to remember, give them a way to generate words randomly. The EFF dice method selects from a long list of 7,776 words, about 12.9 bits per independent uniform draw. Preserve the draw order and keep repeated words if they occur. Six draws give about 77.5 bits using the unrounded value. A predictable separator adds no randomness, and a memorable sentence you wrote cannot use the same calculation. Try the passphrase generator and use the wordlist size for the generator you actually choose.

Protect sign-in, storage and recovery

Rate-limit failed authentication attempts on the subscriber account. If a copy of the password database is stolen, sign-in throttling no longer governs guessing against those hashes. Use per-password salts and an appropriate password hashing scheme with a cost you can sustain. Review OWASP's password storage guidance when selecting an algorithm and tuning it for your service.

Require MFA where an account compromise would have serious consequences. Prefer a phishing-resistant method such as WebAuthn security keys for administrators and other sensitive accounts. NIST requires verifiers to offer a phishing-resistant option at Authentication Assurance Level 2. Walk through lost-device recovery using a test account and verify that a help desk or alternate sign-in path cannot casually bypass the factor.

Move existing accounts onto the policy

Apply the new rules whenever someone creates or changes a password. For existing accounts, identify populations that can still use short passwords without a second factor. Decide how those users will enroll a factor or choose a new password, and communicate the change with specific instructions for the clients they use. Treat that policy migration as a distinct event from your response to a compromised credential.

Test the handoff with support staff. Give them a way to tell apart a length rejection, a blocklist rejection and a problem with a client that silently truncates input. Track the number of users who reach the end of enrollment and the reset issues they report. If a problem appears on one client, fix the client before forcing users onto a flow that cannot accept the credentials your policy recommends.

Verify before rollout

  1. Create a test account using a long manager-generated password and check sign-in and reset on every supported client.
  2. Submit a known blocklisted test value and confirm that the rejection offers a clear next step. Confirm that a passphrase with ordinary words can be accepted.
  3. Exercise failed sign-ins with a test account to verify throttling. Test factor enrollment, loss and recovery before requiring MFA for a wider group.
  4. Record which service owns each control, and review the policy after changing your identity provider, sign-in flows or password storage.

From the channel

Video thumbnail: Password Cracking Explained — See It Happen Live Password Cracking Explained — See It Happen Live Watch safe, hands-on security demonstrations for complete beginners on The Exploit HQ ▸ Video thumbnail: Secure Your Google Account Before Your Phone Gets Hijacked Secure Your Google Account Before Your Phone Gets Hijacked Watch safe, hands-on security demonstrations for complete beginners on The Exploit HQ ▸