The password length is given by M = (log S )/(log N ) where S is the size of the password space and N is the number of characters available. The password space is given by S = LR /P , where L is the maximum lifetime of a password and R is the number of guesses per unit of time.