How long does a WPA key need to be?

How long does a WPA key need to be?

Summary: Based on the results, it's clear that cracking an 8 character password is possible within a year using the computational power 1,000 PCs but would be very expensive and impractical to target a home user with this level of computing power. Physically breaking in to your home would be much easier. What this means is that it is perfectly safe using an 8 character alphanumeric pass phrase key to secure a home Wireless LAN using WPA-PSK or WPA2-PSK using these simple guidelines. A simple random 8 character alphanumeric WPA-PSK key would look something like 2b8uwo35 which is very easy to handle.

SHARE:
TOPICS: Wi-Fi
29

[Updated 11/15/05 2:32 AM: Fixed math error] I've spent years telling people how to secure their Wireless LANs, but what generated the most interested was an article on what not to do.  When my "Six dumbest ways to secure a Wireless LAN" blog struck a nerve, people wanted to know an easy way to secure a home Wireless network.  My advice to them has usually been for them to use WPA-PSK (Wi-Fi Protected Access Pre-Shared Key) because it was the lowest common denominator with a reasonable level of security.

The PSK is basically a secret string of character designed to offer a simple way of securing a home wireless network.  Because there are WPA-PSK cracking tools out there that can do offline dictionary attacks which allow for a fast exhaustive search of likely passwords, WPA-PSK is vulnerable when simple pass phrases are used.  There are many experts giving differing opinions on how long a Pre-Shared Key should be and many of them are telling users to use very long pass phrases well above 25 characters all the way up to 64.  This has not only caused some confusion among users, but may have also intimidated them from using WPA.  I'm going to try and settle this matter here and now and show why you really only need around 8 or 9 characters for a WPA-PSK key to be reasonably safe so long as your pass phrase is comprised of random a-z and 0-9 alphanumeric characters.

The following table shows you what happens when you increase the number of alphanumeric characters used for the WPA-PSK key and what happens when you increase the number of cracking computers.  To compute this table, I took in to account the following factors:

  • The best WPA-PSK cracker can check 100 PSKs per second on a very fast PC
  • Using a-z and 0-9 characters, there are 36 possibilities per character
  • Combinations of PSKs equals 36 raised to the number of characters used
  • Average cracking time (in years) equals combinations divided by 100 PSKs/sec divided by the number of cracking PCs divided by 60 sec/min divided by 60 min/hour divided by 24 hours/day divided by 365.24 days/year divided by 2

Alphanumeric charactersYears with 1 PCYears with 10 PCsYears with 100 PCsYears with 1000 PCs
712.41.240.120.01
8446.9944.74.470.45
916,0921,60916116.1
10579,29957,9305,793579

Based on the results, it's clear that cracking an 8 character password is possible within a year using the computational power 1,000 PCs but would be very expensive and impractical to target a home user with this level of computing power.  Physically breaking in to your home would be much easier.  What this means is that it is perfectly safe using an 8 character alphanumeric pass phrase key to secure a home Wireless LAN using WPA-PSK or WPA2-PSK using these simple guidelines.  A simple random 8 character alphanumeric WPA-PSK key would look something like 2b8uwo35 which is very easy to handle.

Some people may ask why not use upper case letters too.  As it turns out, using upper case letters as well as lower case letters would increase the difficulty of cracking the WPA PSK 26 times more difficult.  However, using just one extra alphanumeric character would make it 36 times more difficult to crack and it's much easier to type 9 lower case characters than 8 with mixed upper and lower case characters.  What's important is the amount of security gained for a given amount of effort which makes lower case alphanumeric characters the best choice.  [My apologies for my sloppy math, my math teacher would be very ashamed of me now.  Upper case letters on an 8-character key would make it 26^8 77 times more difficult to crack which means using a few upper case letters would make the password much stronger and make it possible to use 7 characters instead of 8.  Thank you "rpmyers1" "CPUWZD" for pointing this out]  Using special characters is ill-advised because it not only makes the PSK harder to type, but also makes it susceptible to compatibility issues.  I've seen Wireless equipment that will ignore some special characters and cause connectivity issues.

Topic: Wi-Fi

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

29 comments
Log in or register to join the discussion
  • Incorrect Calculation

    It looks like you forgot to divide by 60 again when converting minutes to hours. You will want to update your article.

    Simple mistake - I did it a lot in Electromagnetic Theory... just ask my prof!

    -Jordan
    jordan.d.miller
    • Doh!

      Sorry about that, will correct immediately.

      You're right, I forgot the minute to hours before converting to days.
      george_ou
  • Could this be overly optimistic?

    A few of things come to mind here:

    1) Many (I would say most) people are likely to "set it and forget it". Given the increase in computing power over time, you need plenty of margin for error. How long does the average home wireless network stick around?
    2) While it may not be worth dedicating the processing time to crack into *one* home network, might some hackers not find it worthwhile to dedicate the processing power (hackers by definition can steal processing cycles) to generate a reverse lookup database to crack *any* home network with an 8 character key?

    As always, I like your blog. I just thought I would raise the questions that came to mind.
    enduser_z
    • No it isn't

      1. Home networks don't stick around that long. Since we're talking about a 1 year time frame, PCs don't get that much faster. If you're paranoid, use a 9 character PSK and it makes it 36 times more difficult. Worst case, notch it up to 10 characters and it's 1,296 times harder to crack.

      2. WPA-PSK cracking relies on SHA calculations. This is not like ASLEAP where you can check 45 million hashes a second using a pre-computed and indexed hash table. You can't use pre-computed tables on WPA-PSK keys.
      george_ou
      • SHA-1

        SHA-1 is considered compromised, and any break will only get better. It has the same weaknes as MD5.

        SHA-256 is considered questionable.
        rpmyers1
        • That's talking about hash collisions

          Would that be exploitable for this and really speed up the cracking process?

          Joshua Wright did point out to me that it is possible to pre-compute a table for a given SSID to make it thousands of times faster for subsequent cracking, but I think it still takes a long time to come up with the table the first time does it not?
          george_ou
  • More incorrect calculations

    Adding uppercase letters to the mix does not make it 26 times harder to crack (if it *does*, WPA is way, way too weak)

    For an 8 character password, it should be 26^8 times harder (208,827,064,576 times), not 26 times harder.
    rpmyers1
    • Man, I need to hit myself on the head

      You're right, it is 26^8 times harder. It would be 62^8 versus 36^8 which is SIGNIFICANTLY different. I really need to stop doing math in my head when I write these things. My apologies again, thank you.
      george_ou
    • I should have checked your math :)

      LOL, this really is the blog from editor's hell. I forgot to check your statement. It's not 26^8 times harder, it's only 77 times harder.
      george_ou
    • Is this really true

      Does your choice of characters make a difference? Is an uppercase character or lowercase character harder to decode?

      The length may cause more possible combinations to be gone through to get to the correct combination.

      The choice of characters seems to me to be in the mind of the password user and not in the mind of the decoder.

      I could be wrong here - but certainly for dictionary attacks you are assuming that the decoder knows you have decided to use only lower or only upper. Otherwise the decoder will try all possible combinations in some order and the issue is where your password falls in the sequence they try.

      When decoding assuming the data has been grabbed and is being decoded, the decoder will also be trying by algorithm and therefore unless they know you have set them an all uppercase puzzle they will be trying all possible combinations in the order of their algorithm.
      richardw66
  • another possibly math problem / omission from formula george ;)

    you state:
    "Average cracking time (in years) equals combinations divided by 100 PSKs/sec divided by the number of cracking PCs divided by 60 sec/min divided by 24 hours/day divided by 365.24 days/year divided by 2 "

    but you've forgotten, in the instructions not the tabe in case people are playing along at home, to make the mins to hours conversion.
    it should read:
    "Average cracking time (in years) equals combinations divided by 100 PSKs/sec divided by the number of cracking PCs divided by 60 sec/min divided by 60 min/hour divided by 24 hours/day divided by 365.24 days/year divided by 2 "

    :)

    Valis
    http://www.valissoft.com
    Valis Keogh
    • One edit killed another :(

      The first time I edited this yesterday, it was fixed the way you suggest but a second edit knocked it back to the old way. I'm going to start calling this "the blog from hell". So this is what happens when my editor goes on vacation for a day :(.
      george_ou
      • that's the beauty of blogs

        you have instantaneous, and most of the time unwanted, access to thousands and thousands of "editors" who are champing at the bit to tell you what you messed up :)
        Valis Keogh
  • Let's not forget...

    ...that's it's still perfectly okay to have some extremely long passkey. George discussed a secure *minimum* passkey here.

    With a USB key and a little cut/paste, you can easily setup WPA with a very long passkey.

    My 2 cents.
    Chad Strunk
    • Nothing wrong with it

      I'm just trying to find a way to make WPA-PSK more palatable for the home user. 8-character random key is the easiest in my mind. Most home users are not running it when they really should. I know of people who would rather use one of my six myth methods rather than WPA or even WEP.

      FYI, it?s even easier with the auto WPA export/import tool from WinXP SP2 if you?re going to go the USB key route.
      george_ou
  • Wireless w/ a Firewall

    Does connecting the wireless LAN to the DMZ port of a firewall (for those with HW firewall), then requiring VPN into the main LAN enhance security and avoid some of these issues?
    Scrappy T
    • Yes, but a lot more sloppy

      It's much easier to do good security on the data link layer rather than the IP layer.

      WPA-PSK is the most feasible for the home.

      WPA with TKIP and PEAP auth is the easiest for businesses. VPN is more expensive, more overhead, slower, and more difficult to use.
      george_ou
  • Your math is still wrong

    Comparing digits + lower case letters to digits + lower case letters + upper case letters yields (10 + 26)^n vs. (10 + 26 + 26)^n or 36^n vs. 62^n. For an eight-character key, the ratio is only approximately 77.4.
    cpuwzd
  • Your math is still wrong

    Comparing digits + lower case letters to digits + lower case letters + upper case letters yields (10 + 26)^n vs. (10 + 26 + 26)^n or 36^n vs. 62^n. For an eight-character key, the ratio is only approximately 77.4.
    cpuwzd
    • How is it wrong?

      77.4 times better is more than dropping 1 character of he PSK which only causes you to loose 36 times the combinations. My statement that using upper/lower does indeed allow you to use 7 characters and still be as strong as 8 chracters all lower case.
      george_ou