Tuesday, September 6, 2011

password validation test cases

Translation:

  • matches a string of six or more characters;
  • that contains at least one digit (\d is shorthand for [0-9]);
  • at least one uppercase; and
  • at least one lowercase character.
inputresult of testreason
abcABCfalseno numbers
abc123falseno uppercase letters
abAB1falsetoo short
abAB12true-
Aa123456true-


another possibilities

I will start by telling you what makes a password strong.

  • It has more than 6 characters. The longer the password is, the harder to crack it using brute force attack.
  • It contains both small case and upper case characters. This doubles brute force attack time, because it needs to check both cases.
  • It contains also numerical characters. This adds another 10 possibilities for each character in the password and thus increases cracking time.
  • It contains special characters. This adds another 20 or more characters to the possibilities.
  • It contains more than 12 characters. This increases cracking time even more.

My approach was to give one point for each of the conditions above.

And I give a point for each of the conditions, the voting scale is the following

  • Very Weak
  • Weak
  • Better
  • Medium
  • Strong
  • Strongest

No comments: