Bug #73127 [NEW]: gost-crypto hash incorrect if input data contains long 0xFF sequence
| From: | grundik at ololo dot cc | Date: | Tue, 20 Sep 2016 12:11:48 +0000 |
| Subject: | Bug #73127 [NEW]: gost-crypto hash incorrect if input data contains long 0xFF sequence | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-204149@lists.php.net to get a copy of this message | ||
From: grundik at ololo dot cc
Operating system: Linux
PHP version: 7.0.11
Package: hash related
Bug Type: Bug
Bug description:gost-crypto hash incorrect if input data contains long 0xFF sequence
Description:
------------
If input data contains long sequence of 0xFF bytes (40+ bytes), then
calculated hash using gost-crypto algorithm becomes incorrect. That
affects at least these functions:
* hash;
* hash_file;
* hash_stream.
Test script:
---------------
$test = str_repeat("\xFF", 40);
echo hash('gost-crypto', $test);
Expected result:
----------------
231d8bb980d3faa30fee6ec475df5669cf6c24bbce22f46d6737470043a99f8e
Actual result:
--------------
8e0be2995864c40f8111feaa9df6fc4830632fdf61e365d9feca87f1e485d1f7
--
Edit bug report at https://bugs.php.net/bug.php?id=73127&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73127&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73127&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73127&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73127&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73127&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73127&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73127&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73127&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73127&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73127&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73127&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73127&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73127&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73127&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73127&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73127&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73127&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73127&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73127&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73127&r=mysqlcfg