1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-04 15:06:13 +02:00
BLAKE3/c/blake3_c_rust_bindings
Jack O'Connor 8d84cfc0af remove a mis-optimization that hurt performance for uneven updates
If the total number of chunks hashed so far is e.g. 1, and update() is
called with e.g. 8 more chunks, we can't compress all 8 together. We
have to break the input up, to make sure that that 1 lone chunk CV gets
merged with its proper sibling, and that in general the correct layout
of the tree is preserved. What we should do is hash 1-2-4-1 chunks of
input, using increasing powers of 2 (with some cleanup at the end). What
we were doing was 2-2-2-2 chunks. This was the result of a mistaken
optimization that got us stuck with an always-odd number of chunks so
far.

Fixes https://github.com/BLAKE3-team/BLAKE3/issues/69.
2020-02-25 11:40:37 -05:00
..
benches remove a mis-optimization that hurt performance for uneven updates 2020-02-25 11:40:37 -05:00
src port compress_subtree_to_parent_node from Rust to C 2020-01-22 21:32:39 -05:00
Cargo.toml integrate assembly implementations into blake3_c_rust_bindings 2020-02-12 10:23:17 -05:00
README.md remove an obsolete remark about performance 2020-01-27 13:04:36 -05:00
build.rs more file renaming, use underscores more consistently 2020-02-12 18:41:41 -05:00

These are Rust bindings for the C implementation of BLAKE3. As there is a native Rust implementation of BLAKE3 provided in this same repo, these bindings are not expected to be used in production. They're intended for testing and benchmarking.