note 97055 deleted from function.str-shuffle by danbrown

From: Date: Tue, 30 Mar 2010 14:28:53 +0000
Subject: note 97055 deleted from function.str-shuffle by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-167530@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- a note to all the passwordgenerators below: if you use str_shuffle it's impossible to have any letter twice thus reducing the possible keyspace: maximum keyspace (with replacements): n^k keyspace without replacements: n! / (n-k)! if you only use letters (a-zA-Z: 52 characters) as password, a truly random password of length 12 has a keyspace of 52^12 = 3.9*10^20 = 2^68.4 (68.4Bit) a shuffle-password with letters (a-zA-Z) of length 12: 52! / (52-12)! = 9.9*10^19 = 2^66.2 (66.2Bit) so basically reducing the keyspace by 2 Bit which means a brute-force attack would take only take one fourth of the time compared to a truly random password.

« previous php.notes (#167530) next »