Tiger hash output byte order
| Bug #60221 | Tiger hash output byte order | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2011-11-04 18:27 UTC | Modified: | 2012-01-27 23:12 UTC |
|
||||||||||
| 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 | |||||||||||
[2011-11-04 18:27 UTC] chadd at fidelissys dot com
Description: ------------ 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: http://search.cpan.org/~clintdw/Digest-Tiger-0.03/Tiger.pm#NOTE 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: ---------------- 3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3 Actual result: -------------- 24f0130c63ac933216166e76b1bb925ff373de2d49584e7a
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-01-17 15:26 UTC] mike@php.net
[2012-01-17 15:26 UTC] mike@php.net
-Status: Open +Status: To be documented -Assigned To: +Assigned To: mike