in reply to Re: Passwords
in thread Passwords
The chance of not containing a lowercase letter is the same as the chance the password only contains uppercase letters or digits, which is (36/62)^8. The chance of not containing an uppercase letter is of course the same. Similary, the chance of not containing a digit is (52/62)^8.
Now, the chance of doing a redo is sligthly less than the sum of these three chances, because than you would count the chance of the password containing only lowercase letters, only uppercase letters, or only digits twice. The chance of containing only lowercase letters, or only uppercase letters is (26/62)^8. The chance of containing only digits is (10/62)^8.
Hence the chance of doing a redo is
which, according to bc, is roughly(36/62)^8+(36/62)^8+(52/62)^8-(26/62)^8-(26/62)^8-(10/62)^8
or just over one in four..2687742319
So, what is the expected number of iterations you have to do to calculate a password? Let p be the chance of having to do a redo. Then the number of iterations is
which is roughly(1 - p) + 2 (1 - p) p + 3 (1 - p) p^2 + 4 (1 - p) p^3 + ... = (1 - p) (1 + 2 p + 3 p^2 + 4 p^3 + ...) = 1 - p ----- (p + 2 p^2 + 3 p^3 + 4 p^4 + ...) = p 1 - p p 1 ----- ------ 2 = ----- p (1 - p) 1 - p
Tests suggests the calculated number might be correct.1.3675666854
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passwords
by Anonymous Monk on Aug 03, 2002 at 04:52 UTC |