php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79492 add BLAKE3 hash
Submitted: 2020-04-19 12:40 UTC Modified: -
From: divinity76 at gmail dot com Assigned:
Status: Open Package: hash related
PHP Version: Next Minor Version OS: irrelevant
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-04-19 12:40 UTC] 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)


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-27 14:27 UTC] cmb@php.net
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
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Apr 19 16:01:26 2021 UTC