note 101889 added to function.mcrypt-encrypt

From: Date: Sun, 16 Jan 2011 19:40:44 +0000
Subject: note 101889 added to function.mcrypt-encrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-175803@lists.php.net to get a copy of this message
I've noticed some people using a-z, A-Z and 0-9 for keys and stating things like "16 characters is a 128-bit key". This isn't true. Using only these characters, you will get at most 6 bits of entropy per chartacter: log2(26 + 26 + 10) = 5.954196310386876 So you're actually only getting 95 bits of entropy in 16 characters, which is 0.0000000117% of the keyspace you would get if you were using the full range. In order to get the full entropy from a key using just a-z, A-Z and 0-9 you should multiply your key length by 1.3333 to account for the 2 bits of lost entropy per byte. ---- Server IP: 87.124.126.108 Probable Submitter: 86.14.89.253 (proxied: 86.14.89.253) ---- Manual Page -- http://www.php.net/manual/en/function.mcrypt-encrypt.php Edit -- https://master.php.net/note/edit/101889 Del: integrated -- https://master.php.net/note/delete/101889/integrated Del: useless -- https://master.php.net/note/delete/101889/useless Del: bad code -- https://master.php.net/note/delete/101889/bad+code Del: spam -- https://master.php.net/note/delete/101889/spam Del: non-english -- https://master.php.net/note/delete/101889/non-english Del: in docs -- https://master.php.net/note/delete/101889/in+docs Del: other reasons-- https://master.php.net/note/delete/101889 Reject -- https://master.php.net/note/reject/101889 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175803) next »