Req #79492 [PATCH]: add BLAKE3 hash
| From: | cmb@php.net | Date: | Tue, 27 Oct 2020 14:27:50 +0000 |
| Subject: | Req #79492 [PATCH]: add BLAKE3 hash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229949@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79492&edit=1
ID: 79492
Patch added by: cmb@php.net
Reported by: divinity76 at gmail dot com
Summary: add BLAKE3 hash
Status: Open
Type: Feature/Change Request
Package: hash related
Operating System: irrelevant
PHP Version: Next Minor Version
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: BLAKE3 hash support
On GitHub: https://github.com/php/php-src/pull/6358
Patch: https://github.com/php/php-src/pull/6358.patch
Previous Comments:
------------------------------------------------------------------------
[2020-04-19 12:40:15] divinity76 at gmail dot com
Description:
------------
I wish for BLAKE3 ( https://github.com/BLAKE3-team/BLAKE3 ) to be
natively supported in PHP, it's a cryptographically-secure hash designed for speed, some
highlights:
- Secure, unlike MD5 and SHA-1. And secure against length extension, unlike SHA-2.
- Much faster than MD5, SHA-1, SHA-2, SHA-3, it's over 17 times faster than SHA3-256 on this
chart: https://github.com/BLAKE3-team/BLAKE3/blob/master/media/speed.svg
, with speed rivaling (and surpassing) that of KangarooTwelve (which is another CS-secure hash
designed for speed, based on SHA-3)
- Capable of incremental updates and verified streaming
- A PRF, MAC, KDF, and XOF, as well as a regular hash.
- it's the latest iteration of the BLAKE hash, and the original BLAKE hash was a SHA3-finalist
(which ultimately lost to Keccak in the final round)
Test script:
---------------
<?php
var_dump(hash("BLAKE3", "test", false));
Expected result:
----------------
string(64) "4878ca0425c739fa427f7eda20fe845f6b2e46ba5fe2a14df5b1e32f50603215"
Actual result:
--------------
Warning: hash(): Unknown hashing algorithm: BLAKE3 in /in/K4p1O on line 3
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79492&edit=1