# crypto: Add BLAKE3 hashing algorithm · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4b86c1e3bbe65b8caa9c2e769af633fa8825bb94)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4b86c1e3bbe65b8caa9c2e769af633fa8825bb94

Requested commit: 4b86c1e3bbe65b8caa9c2e769af633fa8825bb94

Commit: 4b86c1e3bbe65b8caa9c2e769af633fa8825bb94

Tree: d4124ffec41681a5e239b01c58681d488b5871e2

Author: Jay Petacat

Committer: Jay Petacat

## Message

````
crypto: Add BLAKE3 hashing algorithm

This is a translation of the [official reference implementation][1] with
few other changes. The bad news is that the reference implementation is
designed for simplicity and not speed, so there's a lot of room for
performance improvement. The good news is that, according to the crypto
benchmark, the implementation is still fast relative to the other
hashing algorithms:

```
         md5: 430 MiB/s
        sha1: 386 MiB/s
      sha256: 191 MiB/s
      sha512: 275 MiB/s
    sha3-256: 233 MiB/s
    sha3-512: 137 MiB/s
     blake2s: 464 MiB/s
     blake2b: 526 MiB/s
      blake3: 576 MiB/s
    poly1305: 1479 MiB/s
    hmac-md5: 653 MiB/s
   hmac-sha1: 553 MiB/s
 hmac-sha256: 222 MiB/s
      x25519: 8685 exchanges/s
```

[1]: https://github.com/BLAKE3-team/BLAKE3

````

## Parents

- [4f2652d504c796bbba6d7ccf6a699dc01055e3e7](https://git.cafe/gitcafe/zig/commit/4f2652d504c796bbba6d7ccf6a699dc01055e3e7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4b86c1e3bbe65b8caa9c2e769af633fa8825bb94?format=markdown)
