#37595 [NEW]: last part of the string is lost at decoding
| From: | coditza at cluj dot astral dot ro | Date: | Thu, 25 May 2006 23:49:00 +0000 |
| Subject: | #37595 [NEW]: last part of the string is lost at decoding | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-97611@lists.php.net to get a copy of this message | ||
From: coditza at cluj dot astral dot ro
Operating system: windows
PHP version: 4.4.2
PHP Bug Type: mcrypt related
Bug description: last part of the string is lost at decoding
Description:
------------
If the lenght of the encoded string is a multiple of chipher block size,
the last blocksize part of the chipher is lost at decoding.
Reproduce code:
---------------
Use the script at: http://www.coada.net/develop/crypt.phps to
produce an
encoded file, then, from shell:
openssl bf-cbc -in out.dat -out out.dec -K
000102030405060708090a0b0c0d0e0f -iv 0102030405060708 -d
and
cat out.dec
Expected result:
----------------
coditza@keep$
12345678qwertyui12345678coditza@keep$
Actual result:
--------------
bad decrypt
31976:error:06065064:digital envelope routines:EVP_DecryptFinal:bad
decrypt:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/evp/evp_enc.c:450:
coditza@keep$ cat out.dec
12345678qwertyuicoditza@keep$
--
Edit bug report at http://bugs.php.net/?id=37595&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37595&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37595&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37595&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37595&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37595&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37595&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37595&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37595&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37595&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37595&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37595&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37595&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37595&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37595&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37595&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37595&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37595&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37595&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37595&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37595&r=mysqlcfg