16 January 2009
Strong passwords are important, and I recommend using eight or nine digits whenever you can. Sometimes, however, you can’t avoid using a short password. For example, many ATMs outside North America will not accept long passwords, so you have to use a short ATM password if you live or travel outside of North America. In such an instance, is using a four digit password unsafe?
The answer, as far as I can tell, is no. A longer password would be better, but a four digit password for your ATM card is good enough.
Why is a four digit password okay for your ATM card, but not for other accounts? Many ATMs limit the number of failed entries for a given card, eating the card if a user enters an incorrect password four times in a row. This reduces the chance that someone would be able to guess your password.
What are the chances, exactly?
Suppose an ATM limits the number of failed password entries to four, after which it will eat the card. Let’s calculate the probability of guessing a four digit password in four tries.
First, we need to know the number of four digit passwords that can be created from a keypad that includes numbers from 0-9. There are ten usable numbers, each of which can be used as the first, second, third, and fourth digits. That means there are ten ways you can choose the first digit of your password, ten ways to choose the second, ten ways to choose the third, and ten ways to choose the fourth.
These ways multiply to give us 10*10*10*10 = 10,000 different four digit passwords that can be made from ten numbers. Your password is one of those 10,000 passwords. The probability, then, that someone could guess your password in one try is 1/10,000 = 0.0001. The probability that someone could guess your password in four tries is additive: 0.0001+0.0001+0.0001+0.0001 = 0.0004.
If you’re like me, you need some way to interpret this risk. We know 0.0004 is a small number, but can we do better than that? To put that figure into perspective, we can calculate the expected loss (a term that describes the probability of an event multiplied by its cost). Consider the following events: you lose your ATM card, your card is found by someone who tries to extract cash from your savings account, and you don’t notice that your card is missing for a week. What is your expected loss in this case?
We start by calculating your maximum possible loss. Someone who correctly guesses your ATM card password would be able to withdraw or spend up to your daily limit on each of the seven days you are unaware of your missing card. Let’s say this limit is $3,000 and the person who has your ATM card knows it (perhaps he learned it by starting with an attempt to withdraw $5,000, then trying smaller and smaller amounts until the machine capitulated). Your maximum loss in this instance is 7*3,000 = $21,000.
Now all we have to do is multiply the maximum loss by the probability of experiencing that loss. We get 21,000*0.0004 = $8.40. You will probably agree with me that this is no big deal compared to the other threats you face. It’s too bad that you are sometimes forced to use shorter passwords than you would like, but at least in this instance, it’s not worth worrying about.