Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Passwords and PINs

A password is the most familiar sign-in secret, and the easiest to copy. How a service stores and checks it decides what a stolen database gives away, and current guidance on password rules looks very different from the rules many sites still use. A PIN that unlocks a device is a different thing again.

A familiar secret

Cora Diaz signs in to the photo service with her email address and a password. The service checks the password against the one set for her account. A match shows that the person at the keyboard knows the password. It can't show whether anyone else knows it too.

That is both the strength and the weakness of a password. Cora can sign in from a borrowed laptop without carrying anything, because the secret travels in her memory. For the same reason, the secret can be copied: written down, reused on another site, guessed, or typed into a page that only looks like the photo service.

Checking a password

A password is one of the shared secrets described in Secrets and key pairs, with one useful difference. Cora sends the password at every sign-in, so the service only has to recognize it. It never needs to keep a readable copy.

When Cora sets her password, the service creates a random value called a salt for her password record. It gives the password and the salt to a password-hashing function that is deliberately slow, and stores the result together with the salt and the settings it used. Encoding and hashing showed that a hash can't be turned back into its input; a password-hashing function adds the salt and the slowness on top of that.

The salt is not a second secret. It sits beside the hash in the same record, and its job is to make each record's calculation different. If Cora and Ava happen to choose the same password, their salts differ, so their stored hashes differ, and someone who copies the records can't see that they match or test one guess against every account at once. The slowness makes each individual guess cost more time.

At sign-in, the service repeats the calculation. It runs the password Cora typed through the same function with her stored salt and settings, and compares the result with the stored hash. Nothing is decrypted, and the original password is never recovered. The password does reach the service at sign-in, over HTTPS, which is why it must be typed only into the real sign-in page.

Cora's password reaches the photo service for verification. It checks the password against the stored hash and creates a session if the sign-in succeeds.

In simplified pseudocode, the check looks like this. Real services use an established password-hashing library rather than writing the comparison themselves:

record = load_account_password_record(account_id)
accepted = password_library.verify(record, supplied_password)
if accepted and account_is_allowed_to_sign_in:
    establish_session()
else:
    reject_sign_in()

Because only the hash is stored, nobody at the photo service can look up Cora's password, and an administrator who sets a new one for her can't see it afterwards either. If a service can email you your old password, it kept a readable copy.

Where passwords fail

Passwords fail in a few distinct ways, and each defense helps against some of them and not others.

Online guessing happens at the sign-in page. Someone types Cora's address and tries one password after another. Every guess has to reach the photo service, so it can count failures and slow down or stop repeated attempts.

Offline guessing starts when the password database is stolen. Now guesses run on the attacker's own computers against the copied hashes, and no sign-in page is involved, so no attempt limit applies. Salts and slow hashing raise the cost of every guess, but a short or common password can still be found.

Reuse opens a path that skips the photo service entirely. If Cora used the same password at a shopping site and that site is breached, the exposed address and password work at the photo service too. Trying leaked pairs at many services is called credential stuffing, and a strong password doesn't help if it is the same everywhere.

Phishing needs no guessing at all. A page that imitates the photo service's sign-in page persuades Cora to type her password into it, and whoever runs the page receives it, however long and unique it is.

Guesses at the sign-in page

Where it runs
The sign-in page
Attempt limit
Helps
Salted slow hash
Not involved
Unique password
Helps

The hash file is stolen

Where it runs
The attacker's computers
Attempt limit
Does not apply
Salted slow hash
Makes each guess cost more
Unique password
Helps

Leaked from another site

Where it runs
Another site, then here
Attempt limit
Helps little
Salted slow hash
Not involved
Unique password
Stops it

Typed into a look-alike page

Where it runs
A page that imitates the photo service
Attempt limit
Not involved
Salted slow hash
Not involved
Unique password
Not involved

Phishing needs no guessing at all.

Four ways Cora's password can fail, and which defenses reach each one.

A password manager answers reuse: it generates a different long password for every site and fills it in, so Cora doesn't have to remember any of them. It also helps a little against phishing, because it fills a password only on the site it was saved for.

A service might be tempted to add familiar rules: at least one capital letter, a digit and a symbol, and a new password every 90 days. Those rules do little against any of these attacks. People meet them with predictable patterns such as Summer2026!, and scheduled changes push them toward small, guessable edits of the old password.

The National Institute of Standards and Technology (NIST), a United States standards body, publishes widely followed authentication guidance in Special Publication 800-63B, now in its fourth revision (SP 800-63B-4). It asks for length instead of a character mix: at least 15 characters when a password is the only factor, or at least 8 when it is combined with another factor. Services should accept passphrases of at least 64 characters, allow pasting so password managers work, skip hints and security questions, and refuse new passwords that appear on lists of breached or commonly used values. They must limit consecutive failed attempts on an account. A password should change when there is evidence it was exposed, not on a schedule.

A PIN on your device

Now suppose Cora signs in with a security key, a small device that holds a cryptographic key for her account. She inserts it, and it asks for a PIN. The key checks the PIN itself, and only then uses its private key to sign a response. The photo service checks the signature with the matching public key it registered. It never receives the PIN.

That changes what the PIN has to resist. It is useless without the physical key, and the key can count wrong entries and lock itself after a few, so a short PIN is enough. A password works the other way round: the service receives and checks it, and anyone who learns it can use it from anywhere. A short number that a website receives and checks for itself is a short password, whatever the form calls it.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Someone steals the photo service's database of salted, slow password hashes. What remains possible? 1 of 3

Choose one answer.

Cora uses the same long password at the photo service and at a shopping site that is breached. Which defense would have kept her photo account safe? 2 of 3

Choose one answer.

Cora enters the PIN for her security key, and the key signs a response for the photo service. What does the photo service receive? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity