|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60221 Tiger hash output byte order
Submitted: 2011-11-04 18:27 UTC Modified: 2012-01-27 23:12 UTC
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: chadd at fidelissys dot com Assigned: mike (profile)
Status: Closed Package: hash related
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: chadd at fidelissys dot com
New email:
PHP Version: OS:


 [2011-11-04 18:27 UTC] chadd at fidelissys dot com
The testtiger program prints its hashes with each 8-byte chunk byte-swapped (perhaps arch-dependent?).  The "24f0130c63ac9332..." hash of the tiger*,3 family would be printed "3293ac630c13f024..." in MSB-first representation, e.g. as given on Wikipedia's example output.

Perl's Digest::Tiger also uses the MSB-first format:

The lack of MSB-first order potentially impacts interoperability, but changing the output of "tiger192,3" would break BC with anyone who doesn't have interop problems.

This bug has been observed in php 5.2.6 as well.

Test script:
<?php echo hash('tiger192,3', ''), "\n"; ?>

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-17 15:26 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2012-01-17 15:26 UTC]
-Status: Open +Status: To be documented -Assigned To: +Assigned To: mike
 [2012-01-27 23:12 UTC]
Automatic comment from SVN on behalf of frozenfire
Log: Added changelog, indicating that the Tiger hash algorithm now uses big-endian byte ordering. Closes bug #60221.
 [2012-01-27 23:12 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Oct 03 21:01:25 2023 UTC