I subscribed to a VPN service and need to change the password. Does the password I use to log in determine the strength? For example should it be 64 characters long or can it be 10? I'm thinking of how WiFi passwords need to be long.

2 Answers 2


The "strength" of the VPN is twofold. You want two things:

  1. Preventing attackers from spying on your data and/or modifying it silently.
  2. Preventing attackers from framing you, i.e. successfully connecting to the VPN under your name.

If the VPN is any good, then you password impacts only the second type of strength, and the only attack vector for the attackers is an online dictionary attack. "Dictionary attack" means trying potential passwords. "Online" means that the attacker must contact the VPN server for each password he wants to try.

Preventing offline dictionary attacks is very important, because with an offline dictionary attack, the attacker tests passwords on his own machines (e.g. he could obtain a hash of the password), and therefore can speed up the attack by throwing more machines at it. With an online dictionary attack, the attack will be no faster than what the VPN server is willing to accept.

Suppose that the VPN server can "try" 1000 passwords per second; this would be typical of a rather strong PC and a VPN with SSL (SSL connection between client and server, then client shows his password within the tunnel -- there again, the server can botch it by allowing too eagerly SSL session reuse). If the space of potential passwords has size one billion, then, on average, the attacker will have to try 500 millions password before hitting the right one. At 1000 per second, this will take him about 6 days.

This highlights the important points:

  • The VPN server implementation is important.
  • The VPN server may decrease the efficiency of attacks by voluntarily lower the number of new connections it will accept per second. Lower from 1000 to 100, and resistance to attacks has increased by a factor of 10.
  • The password length does not directly matter. What matters is the size of the set of possible passwords.

Whatever is the method by which you generate passwords, you must assume that the attacker knows it (he is evil, after all). The best passwords are generated randomly, with real randomness, i.e. your computer, not your head. If you generate a 10-character password where all characters are digits or letters (lowercase and uppercase), and each character is really chosen at random and independently of the others, then there are 6210 = 839299365868340224 possible passwords; that's the size of the set. And if you use randomness, then the attacker has no other choice than to try them all; at 1000 passwords per second, attack will take him, on average, more than one million years. I daresay that it is sufficient.

So use your best dice, generate ten random characters, and that will be fine. If it is not fine, then the VPN implementation is doing something stupid, and you would be well advised to look for a better VPN. The important points for password generation are:

  • Use real randomness.
  • Don't use a "witty" password which is (re)constructed mentally (e.g. taking the first letter of each verse in a Shakespeare's sonnet -- the attacker also knows Shakespeare).
  • Generate one password and accept it. Remembering a password, any password, is easy if you type it every day. Don't produce many passwords until you find one which "looks good" because it will only decrease your security.
  • Compute the size of the set of possible passwords; that's the only point where the password length matters. The best point of real randomness is that it makes the possible passwords uniformly probable: this allows you to compute the average attack time, as I did above.
  • Ideally, publish your password generation technique. Defeating the attacker is good; discouraging him so that he does not even try is better.

There are many different types of VPN technology, so the answer isn't a static one. Often passwords are hashed or use other key-strengthening technology so that short passwords don't create insecure connections (except, of course, for the fact that short passwords are easier to guess).

A 10-character password is a 57-bit keyspace if you use mixed case, 47 bits if you use only one case. That's not really good enough for today's technology.

You should really use something like:

All lowercase: At least 16 to 18 letters
Mixed case: At least 13 characters
Mixed case and symbols: At least 12 characters

Try heading over to http://howsecureismypassword.net/ and pounding away with sample passwords to get an idea of what's good and what's not so good. For most people this is an eye-opening experience.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .