php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75284 sha3 is not supported on bigendian machine
Submitted: 2017-09-29 11:38 UTC Modified: 2017-10-03 04:44 UTC
From: remi@php.net Assigned: remi (profile)
Status: Closed Package: hash related
PHP Version: 7.2.0RC3 OS: GNU/Linux
Private report: No CVE-ID: None
 [2017-09-29 11:38 UTC] remi@php.net
Description:
------------
At least on s390x and ppc64

/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c: In function 'KeccakP1600_AddLanes':
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c:158:22: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     UINT8 *curData = data;
                      ^~~~
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c: In function 'KeccakP1600_OverwriteBytesInLane':
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c:208:2: error: #error "Not yet implemented"
 #error "Not yet implemented"
  ^~~~~
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c: In function 'KeccakP1600_OverwriteLanes':
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c:229:2: error: #error "Not yet implemented"
 #error "Not yet implemented"
  ^~~~~
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c: In function 'KeccakP1600_OverwriteWithZeroes':
/builddir/build/BUILD/php-7.2.0RC3/ext/hash/sha3/generic64lc/KeccakP-1600-opt64.c:264:2: error: #error "Not yet implemented"
 #error "Not yet implemented"
  ^~~~~
make: *** [Makefile:1073: ext/hash/sha3/generic64lc/KeccakP-1600-opt64.lo] Error 1
make: *** Waiting for unfinished jobs....


So we need to disable the new sha3 on bigendian
(at least temporarily until fully implemented)



Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-29 12:03 UTC] remi@php.net
-Summary: Bigendian is not supported +Summary: sha3 is not supported on bigendian machine
 [2017-09-29 19:26 UTC] pollita@php.net
-Status: Open +Status: Verified
 [2017-09-29 19:26 UTC] pollita@php.net
Could you try this diff on a 64-bit BE machine? I don't have any handy. :D

https://gist.github.com/sgolemon/c79bb083b26b142867a09363458f5506
 [2017-10-02 11:59 UTC] remi@php.net
@Sara you proposal build but test suite fails.
(more info in the PR)
 [2017-10-03 04:43 UTC] remi@php.net
Automatic comment on behalf of remi@remirepo.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d67873ec99a352ba2985ceaa86d82348e719e930
Log: Fix Bug #75284 sha3 is not supported on bigendian machine
 [2017-10-03 04:43 UTC] remi@php.net
-Status: Verified +Status: Closed
 [2017-10-03 04:44 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC