1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-10 08:36:18 +02:00
Commit Graph

426 Commits

Author SHA1 Message Date
rsdy 0a0bb7126e Implement better target detection for NEON 2021-10-07 12:41:53 +01:00
JP Aumasson db436a50c2
linkfix 2021-09-17 10:40:59 +02:00
Jack O'Connor 7d8f7101f1 replace an assert!(... != ...) with an assert_ne! 2021-09-10 13:16:53 -04:00
Jack O'Connor c4582c9779 clarify that OutputReader::position is equivalent to Seek::stream_position 2021-09-10 12:59:13 -04:00
Jack O'Connor 3baa54476a link to the paper in the derive_key docs 2021-09-10 12:48:58 -04:00
David Burkett 038be4571a check length arg (out_len_ll) instead of default value (out_len) 2021-09-01 13:41:24 -04:00
Jack O'Connor 080b333015 explicitly #error on big-endian ARM 2021-08-24 15:00:15 -04:00
Jack O'Connor b8e2dda186 add a redundant loop condition to silence GCC warnings
See:
https://github.com/BLAKE3-team/BLAKE3/issues/94
https://github.com/BLAKE3-team/BLAKE3/issues/183
https://github.com/BLAKE3-team/BLAKE3/issues/189
2021-08-24 14:05:42 -04:00
Jack O'Connor 32758e34a4 handle IO errors in example.c 2021-08-24 12:15:46 -04:00
Jack O'Connor 4032a51a32 update the version number in the b3sum readme 2021-07-27 16:37:57 -04:00
Jack O'Connor b404c851c2 version 1.0.0
Changes since 0.3.8:
- Add Hash::from_hex() and implement FromStr for Hash.
- Implement Display for Hash, equivalent to Hash::to_hex().
- Implement PartialEq<[u8]> for Hash, using constant_time_eq.
- Change derive_key() to return a 32-byte array. As with hash() and
  keyed_hash(), callers who want a non-default output length can use
  Hasher::finalize_xof().
- Replace Hasher::update_with_join() with Hasher::update_rayon(). The
  former was excessively generic, and the Join trait leaked
  implementation details. As part of this change, the Join trait is no
  longer public.
- Upgraded arrayvec to 0.7.0, which uses const generics. This bumps the
  minimum supported Rust compiler version to 1.51.
- Gate the digest and crypto-mac trait implementations behind an
  unstable feature, "traits-preview". As part of this change upgrade
  crypto-mac to 0.11.0.
2021-07-25 12:42:09 -04:00
Jack O'Connor 5aef6849bb update README examples 2021-07-25 12:42:09 -04:00
Jack O'Connor 037de38bfe upgrade to arrayvec 0.7.0
This version uses const generics, which bumps our minimum supported
compiler version to 1.51.
2021-05-18 12:28:29 -04:00
Jack O'Connor aa52ce3a4b upgrade crypto-mac to 0.11.0 2021-05-18 12:28:09 -04:00
Jack O'Connor 7cd208afcf explicitly document the properties of short outputs
Suggested by @joshtriplett at:
https://github.com/BLAKE3-team/BLAKE3/issues/168#issuecomment-829609667
2021-05-18 11:02:05 -04:00
Jack O'Connor 4b7babbe99 more cleaup of undocumented API 2021-03-28 20:04:51 -04:00
Jack O'Connor dab97de401 update doc comments on guts module 2021-03-28 15:21:02 -04:00
P.M f7088f24f8
comment cleanup in build.rs (#164) 2021-03-22 11:33:54 -04:00
Jack O'Connor 9ef2f4d9a8 implement Display for Hash 2021-03-21 21:14:44 -04:00
Jack O'Connor 05292a018b get rid of the standalone "*_rayon" functions
These clutter the toplevel API, and their prominence might lead callers
to prefer them as a first resort, which probably isn't a good idea.
Restricting multithreading to `Hasher::update_rayon` feels better,
similar to what we've done with `Hasher::finalize_xof`. (But I think
`update_rayon` is still an improvement over the trait-based interface
that it replaced.)
2021-03-21 21:14:13 -04:00
Jack O'Connor 07b746b1b4 gate digest and crypto-mac implementations behind "traits-preview"
This approach was suggested by @tarcieri at
https://github.com/BLAKE3-team/BLAKE3/pull/157.
2021-03-21 15:53:26 -04:00
Paul Grandperrin 421745b033 Cargo.toml: update crypto-mac to 0.10.0 2021-03-21 15:50:30 -04:00
Jack O'Connor 7155e5bb71 Rayon-related doc fixes 2021-03-20 15:25:14 -04:00
Jack O'Connor b228f46e03 add *_rayon methods 2021-03-14 00:26:18 -05:00
Jack O'Connor ea72822620 re-privatize the Join trait 2021-03-14 00:08:21 -05:00
Jack O'Connor 71d67e0810 make derive_key() return an array 2021-02-28 18:10:59 -05:00
Jack O'Connor 134bb24686 impl PartialEq<[u8]> for Hash 2021-02-28 17:50:06 -05:00
Samuel Neves 0359065018 Another movd/movq inconsistency.
- Visual Studio <= 2015 does not support AVX-512 either way;
 - Visual Studio 2017 does not tolerate vmovd with 64-bit operands;
 - Visual Studio 2019 does not care.
2021-02-26 00:17:12 +00:00
Paul Grandperrin 0872f98c15 Cargo.toml: upgrade all non API breaking dependencies 2021-02-25 11:16:27 -05:00
Jack O'Connor 1074f02d57 clarify C build instructions a bit 2021-02-18 15:34:40 -05:00
Jack O'Connor e2ae3bdd94 delete an unused constant
Fixes https://github.com/BLAKE3-team/BLAKE3/issues/152.
2021-02-15 14:24:37 -05:00
Jack O'Connor 8969cdd2f8 clang-format a few files
Some of the SIMD code is still unformatted, so for now I'm only touching
the files that just have a couple small changes.
2021-02-15 14:24:37 -05:00
Samuel Neves 8c350836b8 revert unwanted changes 2021-02-06 22:25:40 +00:00
Samuel Neves 953654e25e
More movd/movq discrepancies. Fixes #149. (#150)
This should be irrelevant, but some toolchains will not accept movd with 64-bit arguments.
2021-02-06 20:02:53 +00:00
Jack O'Connor aea29ace2d replace the 'Differences' section with 'Multithreading' 2021-02-05 17:25:45 -05:00
Jack O'Connor 0c26ed52a8 rename ParseError to HexError and update docs 2021-02-04 15:43:44 -05:00
Jack O'Connor cc21dd0132 implement Error for ParseError, make it opaque, and support from_hex(&[u8]) 2021-02-04 15:36:29 -05:00
Jack O'Connor 9e08f5c38d merge "Adding from_hex and implementing FromStr for Hash"
https://github.com/BLAKE3-team/BLAKE3/pull/24
2021-02-03 11:53:56 -05:00
Samuel Neves 3a8204f5f3
Replace movq by movd on MSVC assembly targets (#143) 2021-01-13 11:56:42 +00:00
Jack O'Connor aa23d15fa0 link to JNI bindings also 2020-12-06 12:08:37 -05:00
Alexandre Mutel 6532271a11 Add a link to the .NET version 2020-12-06 12:02:09 -05:00
Jack O'Connor 9493228b13 clarify the derive_key example to discourage passwords 2020-12-02 12:10:19 -05:00
Samuel Neves fdce1eb783
Merge pull request #131 from divinity76/blake3-version-function
add blake3_version(void) / BLAKE3_VERSION_STRING
2020-10-30 12:34:41 +00:00
Hans Henrik Bergan a2f9515785 add blake3_version(void) / BLAKE3_VERSION_STRING
related discussion here: https://github.com/BLAKE3-team/BLAKE3/issues/130
2020-10-29 23:18:34 +01:00
Jack O'Connor 09546a677d include example.c 2020-10-20 12:51:30 -04:00
Jack O'Connor dae5dc5ef3
Merge pull request #128 from divinity76/features-unused-fix
fix disabled-optimization -Wall -Werror
2020-10-20 12:23:35 -04:00
Jack O'Connor b928701893 readme tweaks 2020-10-20 12:05:27 -04:00
Hans Henrik Bergan c7c4bfafab fix disabled-optimization -Wall -Werror
patch by Samuel Neves ( https://github.com/sneves )

if you tried to compile blake3_dispatch.c with
-Wall -Werror -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512

something like this would happen:

hans@xDevAd:~/projects/BLAKE3/c$ gcc -O0 -o example example.c blake3.c blake3_dispatch.c blake3_portable.c     blake3_sse2_x86-64_unix.S blake3_sse41_x86-64_unix.S blake3_avx2_x86-64_unix.S     blake3_avx512_x86-64_unix.S -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 -Wall -Wextra -Wpedantic -Werror
blake3_dispatch.c: In function ‘blake3_compress_in_place’:
blake3_dispatch.c:139:26: error: unused variable ‘features’ [-Werror=unused-variable]
  139 |   const enum cpu_feature features = get_cpu_features();
      |                          ^~~~~~~~
blake3_dispatch.c: In function ‘blake3_compress_xof’:
blake3_dispatch.c:167:26: error: unused variable ‘features’ [-Werror=unused-variable]
  167 |   const enum cpu_feature features = get_cpu_features();
      |                          ^~~~~~~~
blake3_dispatch.c: In function ‘blake3_hash_many’:
blake3_dispatch.c:195:26: error: unused variable ‘features’ [-Werror=unused-variable]
  195 |   const enum cpu_feature features = get_cpu_features();
      |                          ^~~~~~~~
blake3_dispatch.c: In function ‘blake3_simd_degree’:
blake3_dispatch.c:244:26: error: unused variable ‘features’ [-Werror=unused-variable]
  244 |   const enum cpu_feature features = get_cpu_features();
      |                          ^~~~~~~~
cc1: all warnings being treated as errors
2020-10-20 05:49:23 +02:00
Jack O'Connor 5361572c4a make account names into links 2020-10-16 23:23:15 -04:00
Jack O'Connor 1e98c47c7f link to the Cryptography FM interview 2020-10-16 23:21:33 -04:00