1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-04-19 07:53:48 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Joel Rosdahl 2dd4e57f68 Fix typos 2023-05-23 14:39:27 -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 04571021fb add Hasher::count 2021-11-04 20:37:05 -04:00
Jack O'Connor 4b7babbe99 more cleaup of undocumented API 2021-03-28 20:04:51 -04:00
Jack O'Connor 71d67e0810 make derive_key() return an array 2021-02-28 18:10:59 -05:00
Jack O'Connor ae3e8e6b3a add more test cases at shorter input lengths 2020-09-29 10:51:49 -04:00
Jack O'Connor 2f6f56f347 stop being a jerk and add the context string to test_vectors.json 2020-06-29 16:38:53 -04:00
Jack O'Connor e06a0f255a refactor the Cargo feature set
The biggest change here is that assembly implementations are enabled by
default.

Added features:
- "pure" (Pure Rust, with no C or assembly implementations.)

Removed features:
- "c" (Now basically the default.)

Renamed features;
- "c_prefer_intrinsics" -> "prefer_intrinsics"
- "c_neon" -> "neon"

Unchanged:
- "rayon"
- "std" (Still the only feature on by default.)
2020-03-29 18:02:03 -04:00
Jack O'Connor efbfa0463c integrate assembly implementations into the blake3 crate 2020-02-12 10:23:17 -05:00
Jack O'Connor 92d421dea1 add a larger test case
One thing I like to test is that, if I hack simd_degree to be higher
than MAX_SIMD_DEGREE, assertions fire. This requires a test case long
enough to exceed that number of chunks.
2020-01-22 21:19:47 -05:00
Jack O'Connor b04974461a include the right context string in the test_vectors.json comment
I must've written the comment one way, and then changed the context
string later, without realizing that I'd copied it. Apologies to
everyone whose time I wasted with this.

Fixes https://github.com/BLAKE3-team/BLAKE3/issues/15.
2020-01-12 17:07:23 -05:00
Jack O'Connor bef2034c0b fix cross_test.sh
This is a hacky test script, and it broke when I added a feature flag,
while our CI was past quota :(
2020-01-09 16:49:37 -05:00
Jack O'Connor 80260dc763 switch to the new permutations 2020-01-05 14:57:17 -05:00
Jack O'Connor 72ba63ca86 turn on AVX-512 in the test vectors 2020-01-04 21:49:38 -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 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 b9a05913ee fix the test_vectors build 2019-12-12 14:07:58 -05:00
Jack O'Connor 6823655aed run the test vectors on cross tests (ARM, MIPS) on CI 2019-12-11 23:19:58 -05:00
Jack O'Connor c8d21fab95 account for Windows newlines when checking for test vector changes 2019-12-11 22:41:59 -05:00
Jack O'Connor d68882da0d test_checked_in_vectors_up_to_date 2019-12-11 11:04:41 -05:00
Jack O'Connor c81d5c2522 test against test_vectors.json in CI 2019-12-11 10:50:18 -05:00
Jack O'Connor 48b3fba833 check in test_vectors.json
This file is generated with:

cd ./test_vectors
cargo run --bin generate > ./test_vectors.json
2019-12-11 10:47:12 -05:00
Jack O'Connor d183149b2e add the test_vectors sub-crate 2019-12-11 10:14:24 -05:00