1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-04-16 17:24:10 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
Jack O'Connor 4ec3be8bfa format the state matrix better in reference_impl.rs 2024-03-20 15:44:05 -07:00
Jack O'Connor a9750c7fec upgrade all Cargo.toml files to edition=2021
The MSRV is already 1.60, so this doesn't affect much. The only impact
to other code is that we no longer need to explicitly import TryInto.
2023-03-25 16:36:37 -07:00
Jack O'Connor da4c792d80 add an assert and remove an iter_mut in reference_impl
Suggested in https://github.com/rust-lang/rust-clippy/issues/8039.
2021-11-30 14:05:08 -05:00
Jack O'Connor 1042917e16 make field ordering more consistent in the reference impl 2021-10-29 14:44:42 -04:00
Jack O'Connor 600f0b51fe distinguish between key and key_words in the reference impl 2021-10-29 14:04:22 -04:00
Jack O'Connor e60934a129 more consistent use of Self in the reference impl 2020-01-15 10:41:06 -05:00
Jack O'Connor c8c442a99b add comments to the reference impl 2020-01-14 15:22:22 -05:00
Leonard Buskin 0397d42740 Fix misspelled words_from_little_endian_bytes 2020-01-10 09:54:35 -05:00
Jack O'Connor 56ced5b422 switch the reference impl to use the single permutation 2020-01-09 09:21:07 -05:00
Jack O'Connor 80260dc763 switch to the new permutations 2020-01-05 14:57:17 -05:00
Jack O'Connor 5b4f79fc7f comment punctuation nit 2020-01-04 10:30:59 -05:00
Jack O'Connor 2fac7447e0 make derive_key take a key of any length
The previous version of this API called for a key of exactly 256 bits.
That's good for optimal performance, but it would mean losing the
use-with-other-algorithms property for applications whose input keys are
a different size. There's no way for an abstraction over the previous
version to provide reliable domain separation for the "extract" step.
2019-12-28 17:56:29 -06:00
Jack O'Connor ba28064963 switch back to counting trailing 0 bits
These things are totally equivalent, and I keep going back and forth,
but now I think this is slightly clearer.
2019-12-24 16:51:43 -06:00
Jack O'Connor c9ffbdd365 use self.flags instead of self.chunk_state.flags in the reference impl
This is clearer, and because of padding requirements it doesn't change
the size of the Hasher struct. (We have a test for this.)
2019-12-24 13:30:04 -06:00
Jack O'Connor 8aae07f91a switch from counting trailing 0 bits to counting trailing 1 bits 2019-12-24 13:12:18 -06:00
Jack O'Connor 6c1155a41d get rid of unnecessary variables in push_chunk_chaining_value 2019-12-23 15:47:40 -06:00
Jack O'Connor 3016ddcb3a add a parent_cv helper function to the reference impl
Also use fewer array references (the compiler doesn't care) be more
explicit with a `new_cv` mutable variable. This clarifies
push_chunk_chaining_value just a bit. Since that's the trickiest
function in the entire thing, it's good to clarify it. (It also gets
excerpted directly into the spec.)
2019-12-23 15:14:13 -06:00
Jack O'Connor e800e0659f rework push_chunk_chaining_value in terms of trailing 0's 2019-12-22 16:31:47 -05:00
Jack O'Connor e6e4e6d687 a few more comments in reference_impl.rs 2019-12-14 09:55:50 -05:00
Jack O'Connor a52d4daa98 update MAX_DEPTH 2019-12-12 23:40:13 -05:00
Jack O'Connor b5f1e925f7 rename "offset" to "counter" and always increment it by 1
This is simpler than sometimes incrementing by CHUNK_LEN and other times
incrementing by BLOCK_LEN.
2019-12-12 21:41:30 -05:00
Jack O'Connor a5cc3b2867 reduce the CHUNK_LEN from 2048 bytes to 1024 bytes
Smaller chunk sizes are a big benefit for parallelism at shorter input
lengths, and recent benchmarks show that this reduction has a relative
small cost in terms of peak throughput. It's also a nice round number.
2019-12-12 20:39:00 -05:00
Jack O'Connor 0c44497290 s/subtree_stack/cv_stack/ in reference_impl.rs
This fits better with the current wording of the spec.
2019-12-08 23:31:18 -05:00
Jack O'Connor 47ef3ad01f add struct Hasher 2019-12-06 15:13:27 -05:00
Jack O'Connor 2030966062 add the reference implementation 2019-12-02 17:03:07 -05:00