Doc #64041 [NEW]: Example shows unsafe use of encryption

From: Date: Mon, 21 Jan 2013 20:48:29 +0000
Subject: Doc #64041 [NEW]: Example shows unsafe use of encryption
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9456@lists.php.net to get a copy of this message
From: pawel dot krawczyk at hush dot com Operating system: n/a PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Example shows unsafe use of encryption Description: ------------ --- From manual page: http://www.php.net/function.mcrypt-encrypt#refsect1- function.mcrypt-encrypt-examples --- The mcrypt_encrypt() example shows simple encryption using ECB mode and with no message integrity validation. This is then being copied by people in production applications, creating vulnerabilies. It would help a lot if the example also added HMAC calculation for the message. Its validation should be added to mcrypt_decrypt() function. http://php.net/manual/en/function.hash-hmac.php -- Edit bug report at https://bugs.php.net/bug.php?id=64041&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64041&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64041&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64041&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64041&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64041&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64041&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64041&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64041&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64041&r=support Expected behavior: https://bugs.php.net/fix.php?id=64041&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64041&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64041&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64041&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64041&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64041&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64041&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64041&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64041&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64041&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64041&r=mysqlcfg

« previous php.doc.bugs (#9456) next »