Req #65891 [Com]: PHP is missing a sha3() function
| From: | divinity76 at gmail dot com | Date: | Wed, 11 Nov 2015 14:06:53 +0000 |
| Subject: | Req #65891 [Com]: PHP is missing a sha3() function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197168@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65891&edit=1
ID: 65891
Comment by: divinity76 at gmail dot com
Reported by: scott dot baker at gmail dot com
Summary: PHP is missing a sha3() function
Status: Open
Type: Feature/Change Request
Package: hash related
Operating System: Linux
PHP Version: 5.5.5RC1
Block user comment: N
Private report: N
New Comment:
add it to the hash function and stop whining about sha3(), once its in the hash() it can _very_
easily be polyfilled if you want it. however, a slight problem is that sha3 is variable-length, so
hash() needs to be modified to take a new argument of output size
Previous Comments:
------------------------------------------------------------------------
[2014-07-12 19:57:29] ryacko at gmail dot com
Except that SHA-3 is a hash function with a variable length and variable security margin.
One could add the four SHA3 standards, but that wouldn't make available all the possible ways
to use SHA3.
It could be used as stream cipher for instance.
http://keccak.noekeon.org/tune.html
------------------------------------------------------------------------
[2013-10-15 17:18:29] nikic@php.net
I agree with Pierre. This is a hash function, so it belongs in the hash extension. There is no point
in adding an individual function for every single hash type.
------------------------------------------------------------------------
[2013-10-15 16:50:48] scott dot baker at gmail dot com
Perhaps we could have support for both hash() and sha3() methods?
I really like the sha3() method that strawbrary wrote. It's very logical and easy to remember.
hash() requires me to remember the order of parameters, and the hash name. sha3() seems more direct.
------------------------------------------------------------------------
[2013-10-14 06:04:09] pajoye@php.net
I would rather add it to the hash extension, more consistent.
------------------------------------------------------------------------
[2013-10-13 22:00:27] scott dot baker at gmail dot com
There has already been some work on this, it probably just needs to be merged in to core PHP?
https://github.com/strawbrary/php-sha3
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=65891
--
Edit this bug report at https://bugs.php.net/bug.php?id=65891&edit=1