Pointer Walk

Password Length and Brute Force

Add one character and cracking takes 62 times longer. From under a second to longer than a lifetime.

SecurityBeginner6 min read

Guessing every possibility

Suppose an attacker has stolen a hashed password and wants the original. If nothing cleverer works, there is always one method left: try every possible password, hash each one, and see which matches. This is a brute-force attack.

It always succeeds eventually. The only question is how long "eventually" is. And that depends on one thing above all: how many possibilities there are.

Count the combinations

Take passwords made of lowercase letters, capitals and digits. That is 26 + 26 + 10 = 62 characters to choose from.

  • 1 character: 62 possibilities.
  • 2 characters: 62 × 62 = 3,844.
  • 3 characters: 62 × 62 × 62 = 238,328.

Every extra character multiplies the total by 62.

Now give the attacker serious hardware: 10 billion guesses every second.

Time to try every password of each lengthInteractive
lengthcombinationstime to try them all
414.8Munder a second
5916.1Munder a second
656.8B5.7 seconds
73.5T5.9 minutes
8218.3T6.1 hours
913,537.1T16 days
10839,299.4T2.7 years
1152,036,560.7T165 years
123,226,266,762.4T10,223 years

Start. A password made of letters and digits has 62 choices for each position. An attacker with a stolen hash tries every combination, at 10 billion guesses a second.

LengthTime to try every combination
66 seconds
86 hours
102.7 years
12about 10,000 years

From 4 characters to 12, the search goes from "instant" to "longer than recorded history". The computer is the same throughout. Only the password grew.

One more character, 62 times longer

That is the whole lesson in one line. Each added character does not add to the work. It multiplies it.

Example

Length beats hardware

Suppose the attacker buys a machine 1,000 times faster. That sounds decisive.

It is cancelled out by adding two characters to the password, because 62 × 62 = 3,844, which is more than 1,000.

Hardware improves by adding. Length improves by multiplying. Length wins.

Longer, or more symbols?

Sites often demand a symbol and a capital letter. That widens the set of characters: adding about 30 symbols takes it from 62 to roughly 94. How much does that help, compared with simply adding length?

ChangeCombinations multiplied by
Allow symbols, at length 8 (62 → 94 characters)about 28
Add one more character (8 → 9)62
Add four more characters (8 → 12)about 15 million

One extra character beats the whole symbol requirement. A long password of plain words is stronger than a short one full of punctuation, and far easier to remember and type.

The catch: people are not random

All of the numbers above assume every combination is equally likely. That is true for a password a computer generated. It is not true for one a person made up.

Attackers do not start at aaaaaaaa. They start with:

  1. The most common passwords: 123456, password, qwerty.
  2. Every password found in earlier leaks. There are billions on file.
  3. Dictionary words, names, dates and keyboard patterns.
  4. Predictable tweaks of those: a capital first letter, a → @, ! or 1 on the end.

Summer2024! has 11 characters, a capital, digits and a symbol. By the table it should take over a century. In practice it falls in seconds, because it is a common word, a year and a !, exactly what the list of tweaks is built to try.

The table is the best case. It only applies if the password is genuinely random.

What actually works

  1. Use a password manager

    It generates a long random password for every site and remembers them. You remember one.

  2. For the few you must memorise, use a passphrase

    Four or five words picked at random (by dice or a generator, not by you), such as copper-lantern-thirsty-orbit. Long, random and typeable.

  3. Never reuse a password

    If a site leaks it, attackers try it everywhere else within hours. Reuse is how one breach becomes ten.

  4. Turn on two-factor authentication

    Then a guessed or stolen password is not enough by itself.

Key takeaways

  • Brute force tries every possible password, so its cost is the number of combinations.
  • Each extra character multiplies the combinations: by 62 for letters and digits.
  • Adding length helps far more than adding symbol requirements.
  • The numbers only hold for random passwords. Human-chosen ones are guessed from lists long before brute force is needed.
  • Use a password manager, unique passwords and two-factor authentication.

Your progress

Check your progress

0%

  1. Read the page50% of this page

    When you have gone through the page and its animations, tick it off.

  2. Take the quiz50% of this page

    6 questions, from easy to hard. Take it as often as you like: the questions change, and only your best score counts.

Saved on this device only. See all your progress