A pure-Go implementation of the BLAKE3 cryptographic hash function
This repository has been archived on 2023-05-01. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
lukechampine 617550f073 amortize hasher initialization for Sum256/Sum512
As expected, the performance increase is only noticeable for
small inputs:

name            old time/op    new time/op    delta
Sum256/64-4        343ns ± 4%     243ns ± 6%  -28.96%  (p=0.008 n=5+5)
Sum256/1024-4     2.62µs ± 1%    2.50µs ± 2%   -4.57%  (p=0.008 n=5+5)
Sum256/65536-4     175µs ± 1%     170µs ± 4%     ~     (p=0.190 n=4+5)

Co-authored-by: Dmitry Yu Okunev <xaionaro@dx.center>
2020-02-02 14:53:41 -05:00
testdata initial commit 2020-01-09 15:10:01 -05:00
LICENSE initial commit 2020-01-09 15:10:01 -05:00
README.md update README 2020-01-09 23:09:57 -05:00
blake3.go amortize hasher initialization for Sum256/Sum512 2020-02-02 14:53:41 -05:00
blake3_test.go amortize hasher initialization for Sum256/Sum512 2020-02-02 14:53:41 -05:00
go.mod initial commit 2020-01-09 15:10:01 -05:00

README.md

blake3

GoDoc Go Report Card

go get lukechampine.com/blake3

blake3 implements the BLAKE3 cryptographic hash function.

This implementation is a port of the Rust reference implementation, refactored into more idiomatic Go style and with a handful of performance tweaks. Performance is not great, not terrible. Eventually an assembly-optimized implementation will be merged into x/crypto, and then you should switch to that. In the meantime, you can use this package for code that needs BLAKE3 compatibility and doesn't need to be blazing fast.