aboutsummaryrefslogtreecommitdiff
path: root/reference_impl/reference_impl.rs
AgeCommit message (Collapse)Author
2021-02-28rename the "context string" to the "purpose string"purpose_stringJack O'Connor
Apart from being pretty ambiguous in general, the term "context string" has the specific problem that it isn't clear whether it should be describing the input or the output. In fact, it's quite important that it describes the output, because the whole point is to domain-separate different outputs that derive from the *same* input. To make that clearer, rename the "context string" to the "purpose string" in documentation.
2020-01-15more consistent use of Self in the reference implJack O'Connor
2020-01-14add comments to the reference implJack O'Connor
2020-01-10Fix misspelled words_from_little_endian_bytesLeonard Buskin
2020-01-09switch the reference impl to use the single permutationJack O'Connor
2020-01-05switch to the new permutationsJack O'Connor
2020-01-04comment punctuation nitJack O'Connor
2019-12-28make derive_key take a key of any lengthJack O'Connor
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-24switch back to counting trailing 0 bitsJack O'Connor
These things are totally equivalent, and I keep going back and forth, but now I think this is slightly clearer.
2019-12-24use self.flags instead of self.chunk_state.flags in the reference implJack O'Connor
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-24switch from counting trailing 0 bits to counting trailing 1 bitsJack O'Connor
2019-12-23get rid of unnecessary variables in push_chunk_chaining_valueJack O'Connor
2019-12-23add a parent_cv helper function to the reference implJack O'Connor
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-22rework push_chunk_chaining_value in terms of trailing 0'sJack O'Connor
2019-12-14a few more comments in reference_impl.rsJack O'Connor
2019-12-12update MAX_DEPTHJack O'Connor
2019-12-12rename "offset" to "counter" and always increment it by 1Jack O'Connor
This is simpler than sometimes incrementing by CHUNK_LEN and other times incrementing by BLOCK_LEN.
2019-12-12reduce the CHUNK_LEN from 2048 bytes to 1024 bytesJack O'Connor
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-08s/subtree_stack/cv_stack/ in reference_impl.rsJack O'Connor
This fits better with the current wording of the spec.
2019-12-06add struct HasherJack O'Connor
2019-12-02add the reference implementationJack O'Connor