Bug #61291 [Com]: tiger is broken

From: Date: Mon, 05 Mar 2012 16:34:20 +0000
Subject: Bug #61291 [Com]: tiger is broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-168160@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61291&edit=1

 ID:                 61291
 Comment by:         remi@php.net
 Reported by:        remi@php.net
 Summary:            tiger is broken
 Status:             Open
 Type:               Bug
 Package:            hash related
 Operating System:   GNU/Linux (Fedora 16)
 PHP Version:        5.4.0
 Block user comment: N
 Private report:     N

 New Comment:

Seems related to 
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/hash/hash_tiger.c?r1=321634&r2=322437

(8 * (0%8)) != 56


The patch fixes this, and the "old" tests.

I think, this will break the "new" tests (added after the regression was introduce)


Previous Comments:
------------------------------------------------------------------------
[2012-03-05 16:29:36] remi@php.net

Description:
------------
mhash_001 and mash_003 fails.

For mhash 001
025+ MHASH_TIGER: string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"
026+ MHASH_TIGER: string(48) "953ac3799a01b9fdeb91aeab97207e67395cbb54300be00d"

Some tests


==== PHP 5.1.6

php -r 'var_dump(bin2hex(mhash(MHASH_TIGER,"This is the test of the mhash
extension...")));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"

php -r 'var_dump(bin2hex(mhash(MHASH_TIGER,"This is the test of the mhash
extension...")));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"

==== PHP 5.3.10

php -r 'var_dump(bin2hex(mhash(MHASH_TIGER,"This is the test of the mhash
extension...")));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"

php -r 'var_dump(bin2hex(hash("tiger192,3","This is the test of the mhash
extension...",true)));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"

==== PHP 5.4.0

php -r 'var_dump(bin2hex(mhash(MHASH_TIGER,"This is the test of the mhash
extension...")));'
string(48) "953ac3799a01b9fdeb91aeab97207e67395cbb54300be00d"

php -r 'var_dump(bin2hex(hash("tiger192,3","This is the test of the mhash
extension...",true)));'
string(48) "953ac3799a01b9fdeb91aeab97207e67395cbb54300be00d"

=== PHP 5.4.0 with patch

php -r 'var_dump(bin2hex(mhash(MHASH_TIGER,"This is the test of the mhash
extension...")));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"

php -r  'var_dump(bin2hex(hash("tiger192,3","This is the test of the mhash
extension...",true)));'
string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"





------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61291&edit=1


Thread (5 messages)

« previous php.bugs (#168160) next »