note 97055 added to function.str-shuffle

From: Date: Tue, 30 Mar 2010 09:42:37 +0000
Subject: note 97055 added to function.str-shuffle
Groups: php.notes 
Request: Send a blank email to php-notes+get-167521@lists.php.net to get a copy of this message
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. ---- Server IP: 212.124.37.9 Probable Submitter: 217.243.204.99 ---- Manual Page -- http://www.php.net/manual/en/function.str-shuffle.php Edit -- https://master.php.net/note/edit/97055 Del: integrated -- https://master.php.net/note/delete/97055/integrated Del: useless -- https://master.php.net/note/delete/97055/useless Del: bad code -- https://master.php.net/note/delete/97055/bad+code Del: spam -- https://master.php.net/note/delete/97055/spam Del: non-english -- https://master.php.net/note/delete/97055/non-english Del: in docs -- https://master.php.net/note/delete/97055/in+docs Del: other reasons-- https://master.php.net/note/delete/97055 Reject -- https://master.php.net/note/reject/97055 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167521) next »