Find a course

Module 4: Staying Safe and Keeping Things RunningLesson 10 of 1212 min

Strong Passwords and Two-Factor Authentication

See why length beats complexity, build memorable passphrases, let a password manager do the remembering, and add two-factor authentication.

Step 1 of 12Learn

One password, ten accounts

Dev used the same password, his dog's name plus his birth year, for everything: email, shopping, a cooking forum. One day the cooking forum was hacked and its user list was posted online. Within hours, criminals tried Dev's email and password on banks, online stores and email providers. His email account opened on the first try, and from there they reset the passwords for his other accounts.

Dev did nothing unusual. Reusing passwords is extremely common, and that is exactly why criminals use automated tools to try leaked passwords everywhere, a technique called credential stuffing. The forum's weak security became his email's weak security.

Your email account is the master key to your digital life. Nearly every other account lets you reset its password through email, so whoever controls your inbox can take over the rest. Protect it first and best.

Two rules carry most of the weight:

  1. Every important account gets its own password. One breach then stays one breach.
  2. Passwords should be long. Length matters far more than clever symbol swaps.

Remembering dozens of long, different passwords is impossible for a human, which is why this lesson ends with a tool that does it for you.

Step 2 of 12Practice · True or false

Using one very strong password for all your accounts is safe, because nobody can guess it.

Step 3 of 12Learn

Why length beats complexity

Attackers who steal a database of scrambled passwords can make billions of guesses per second on ordinary graphics cards. The question is how many possibilities they must try.

The number of possible passwords is (number of possible characters) ^ (length).

  • An 8-character password using lowercase letters, capitals, digits and symbols (about 95 characters) has 958, roughly 6.6 × 1015 possibilities. That sounds huge, but at 100 billion guesses per second it falls in under a day.
  • A passphrase of four or five random, unrelated words, such as velvet-cactus-orbit-pancake, is around 25–30 characters long. Even counting only lowercase letters, 2627 is about 1038 possibilities, far beyond any realistic attack.

There's a catch: attackers don't guess blindly. They try dictionary words, names, dates, keyboard patterns like qwerty and common substitutions like P@ssw0rd! first. A password that follows a human pattern is much weaker than the math suggests. So:

  • Good: four or more random words chosen by a generator or dice, or a password manager's random string.
  • Bad: names of pets, family, teams, birthdays, addresses, Summer2026! or a famous quote.

Use the explorer below to see how length changes the time needed to try every combination.

Step 4 of 12Practice · Chart

Possible passwords, as a power of ten

Tap the password type with the most possible combinations.

Tap the bar that answers the question, then press Check.

Possible passwords, as a power of tenBar chart with 4 categories: 8 lowercase: 11.3; 8 from all 95 keys: 15.8; 12 lowercase: 17; 16 lowercase: 22.6.0510152025Combinations (10 to the power of…)8 lowercase8 from all 95 keys12 lowercase16 lowercase11.315.81722.6
Computed as characters^length: 268, 958, 2612, 2616. Each +1 is ten times more combinations.
Possible passwords, as a power of ten
ItemPower of ten
8 lowercase11.3
8 from all 95 keys15.8
12 lowercase17
16 lowercase22.6

Step 5 of 12Explore

How long to try every combination?

The curve shows the power of ten of the years needed to try every possible password of length x. A value of 3 means about 1,000 years; a value of -3 means under nine hours. Compare 26 characters (lowercase only) with 95 (all keyboard characters), and see how much one extra character adds.

02040 10203040
Possible passwords (power of 10)
17
Years to try them all (power of 10)
-1.5

Step 6 of 12Practice · Work it out

A PIN uses only the digits 0–9 and is 4 digits long. How many different PINs are possible?

Step 7 of 12Learn

Password managers and two-factor authentication

A password manager is an app that creates a long random password for each site, stores them all in an encrypted vault and fills them in for you. You remember just one strong master passphrase. Reputable options include the managers built into your browser or phone (such as Google Password Manager or Apple Passwords) and dedicated apps. A good manager also warns you about reused or leaked passwords and only fills in passwords on the genuine site, which helps you notice fake login pages.

Two-factor authentication (2FA), also called multi-factor authentication, adds a second check after your password. Even if a criminal has your password, they can't get in without the second factor. Common types, from strongest to weakest:

  • Passkeys and security keys: the device proves who you are cryptographically, and they cannot be phished on fake sites.
  • Authenticator apps that show a six-digit code changing every 30 seconds.
  • Text message (SMS) codes: weaker, because phone numbers can be hijacked, but still far better than nothing.

Turn on 2FA for email first, then banking, then social media and shopping accounts. Save the backup codes the site gives you somewhere safe, such as in your password manager or printed in a drawer, so you aren't locked out if you lose your phone.

And the golden rule: never read a 2FA code to anyone who calls or messages you. Real banks and companies never ask for it. Someone asking for your code is trying to sign in as you right now.

Step 8 of 12Practice · Diagram

Three kinds of sign-in factor

A six-digit code from an authenticator app is which factor?

Tap the shape that answers the question, then press Check.

Three kinds of sign-in factorParts diagram: Two-factor sign-in, Something you know, Something you have, Something you are.Two-factorsign-inSomething youknowSomething youhaveSomething youare
Two-factor sign-in
Something you know

A password, passphrase or PIN.

Something you have

Your phone with an authenticator app, a text code or a security key.

Something you are

A fingerprint or face scan.

Step 9 of 12Note

Step 10 of 12Practice · Choose one

Which of these is the strongest choice for an email account password?

Step 11 of 12Practice · What would you do?

What would you do?

Your phone shows a text with a sign-in code from your email provider, which you did not request. A minute later someone calls: "This is your email provider's security team. We noticed suspicious activity. Please read me the code we just sent so we can verify you."

Step 12 of 12Practice · Select all that apply

Which actions make your accounts meaningfully safer? Select all that apply.

Select all that apply.