note 50934 added to function.md5

From: Date: Mon, 14 Mar 2005 13:14:42 +0000
Subject: note 50934 added to function.md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-86400@lists.php.net to get a copy of this message
Erm can someone please clarify the double encryption myth. Is is only when you double encrypt with the same function and hash key that it sometimes becomes less secure? Or is it always regardless even if you uses two different encryption methods with different hash keys? Or what about encrypting twice with the same function but using different hash keys? Some clarity on this subject would be good for php beginners like myself looking into security protocolls. for example is the following secure...? NB... uses a ctlCipherSaber class that uses md5 and base64_encode http://www.phpclasses.org/browse/package/1055.html function double_encrypt($value) { $hash = new ctlCipherSaber(); $first = $hash->encrypt($value, HASH_ACTUAL_KEY); return $hash->encrypt($first, HASH_TASK_KEY); } function double_decrypt($value) { $hash = new ctlCipherSaber(); $first = $hash->decrypt($value, HASH_TASK_KEY); return $hash->decrypt($first, HASH_ACTUAL_KEY); } ---- Manual Page -- http://www.php.net/manual/en/function.md5.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50934 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50934&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50934&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50934&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50934&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50934&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50934&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86400) next »