1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-04-25 14:55:10 +02:00
Commit Graph

41 Commits

Author SHA1 Message Date
Joel Rosdahl 2dd4e57f68 Fix typos 2023-05-23 14:39:27 -07:00
Jack O'Connor 09df11731e replace a copy-pasted Rust API reference in the C docs 2022-07-22 10:48:33 -07:00
Fangrui Song 9114ff8ed1 add prototypes to fix -Wstrict-prototypes warnings 2022-04-09 11:00:17 -07:00
Jack O'Connor 48c4621edc add "(if any)" regarding keying in the security notes 2022-03-04 10:19:14 -05:00
Jack O'Connor 3e67a8f45b correct the security notes for the C API 2022-03-03 12:06:14 -05:00
Jack O'Connor d295410aad simplify a bit more 2022-03-03 11:52:58 -05:00
Jack O'Connor b3c06e46ed simplify the security notes, avoid referring to entropy 2022-03-02 19:05:15 -05:00
Jack O'Connor 153d46e11a copy the same notes to the C docs 2022-03-02 17:55:05 -05:00
Jack O'Connor 7d8c005071 add blake3_hasher_reset to the C API 2022-01-07 15:51:35 -05:00
Jack O'Connor ea37dbd4b0 a small capitalization change 2021-10-21 17:23:51 -04:00
rsdy 2aa7c963be Use BLAKE3_USE_NEON=0 instead of BLAKE3_NO_NEON def 2021-10-12 23:23:25 +01:00
rsdy c5941a2731 Make the C implementation default to using NEON on aarch64 2021-10-08 12:45:04 +01:00
Jack O'Connor 32758e34a4 handle IO errors in example.c 2021-08-24 12:15:46 -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 1074f02d57 clarify C build instructions a bit 2021-02-18 15:34:40 -05:00
Jack O'Connor aea29ace2d replace the 'Differences' section with 'Multithreading' 2021-02-05 17:25:45 -05:00
Jack O'Connor 09546a677d include example.c 2020-10-20 12:51:30 -04:00
Jack O'Connor b928701893 readme tweaks 2020-10-20 12:05:27 -04:00
Jack O'Connor a01fd16011 add some horizontal rules to the C readme 2020-09-10 17:38:35 -04:00
Jack O'Connor 44fd9efbc2 C readme edits 2020-09-10 16:40:25 -04:00
Jack O'Connor 27b7f610e0
Merge pull request #114 from k0001/no-cstr
C: Add blake3_hasher_init_derive_key_len
2020-09-10 14:54:15 -05:00
Renzo Carbonara b205e0efa1 C: rename blake3_hasher_init_derive_key_raw and documentation 2020-09-01 13:20:16 +03:00
Samuel Neves 3340e32c7f
Merge pull request #110 from mkrupcale/sse2
Add SSE2 implementations
2020-08-31 18:56:55 +01:00
Renzo Carbonara 31e4080aa2 C: Add blake3_hasher_init_derive_key_len
blake3_hasher_init_derive_key_len is an alternative version of
blake3_hasher_init_derive_key which takes the context and its
length as separate parameters, and not together as a C string.

The motivation for this addition is making it easier for
bindings to this C library to call this function without
having to first copy over the context bytes just to add
one 0x00 byte at the end.

Notice that contrary to blake3_hasher_init_derive_key,
blake3_hasher_init_derive_key_len allows the inclusion of a
0x00 byte in the context. Given the rules about context string
selection, this byte is unlikely to be used as part of a context
string. But if for some reason it is ever given, it will be
included in the context string and processed like any other
non-alphanumeric byte would. For compatibility with
blake3_hasher_init_derive_key, bindings should still check for
the absence of 0x00 bytes.
2020-08-30 12:27:33 +03:00
Jack O'Connor c8a5b53e1d wording tweak in the C readme 2020-08-26 16:55:39 -04:00
Matthew Krupcale d91f20dd29 Start SSE2 implementation based on SSE4.1 version
Wire up basic functions and features for SSE2 support using the SSE4.1 version
as a basis without implementing the SSE2 instructions yet.

 * Cargo.toml: add no_sse2 feature
 * benches/bench.rs: wire SSE2 benchmarks
 * build.rs: add SSE2 rust intrinsics and assembly builds
 * c/Makefile.testing: add SSE2 C and assembly targets
 * c/README.md: add SSE2 to C build instructions
 * c/blake3_c_rust_bindings/build.rs: add SSE2 C rust binding builds
 * c/blake3_c_rust_bindings/src/lib.rs: add SSE2 C rust bindings
 * c/blake3_dispatch.c: add SSE2 C dispatch
 * c/blake3_impl.h: add SSE2 C function prototypes
 * c/blake3_sse2.c: add SSE2 C intrinsic file starting with SSE4.1 version
 * c/blake3_sse2_x86-64_{unix.S,windows_gnu.S,windows_msvc.asm}: add SSE2
   assembly files starting with SSE4.1 version
 * src/ffi_sse2.rs: add rust implementation using SSE2 C rust bindings
 * src/lib.rs: add SSE2 rust intrinsics and SSE2 C rust binding rust SSE2 module
   configurations
 * src/platform.rs: add SSE2 rust platform detection and dispatch
 * src/rust_sse2.rs: add SSE2 rust intrinsic file starting with SSE4.1 version
 * tools/instruction_set_support/src/main.rs: add SSE2 feature detection
2020-08-24 00:54:46 -04:00
Jack O'Connor e83cbbb8f5 clarify multithreading support in the C readme
Fixes https://github.com/BLAKE3-team/BLAKE3/issues/99.
2020-07-20 10:01:00 -04:00
Jack O'Connor c26a37f70c C files -> C and assembly files 2020-03-25 17:25:48 -04:00
Jack O'Connor c3639b4255 c/README.md changes
The C implementation now supports output seeking. Also expand the API
section a bit, and reorganize things to put the example on top.
2020-03-25 17:11:36 -04:00
Jack O'Connor 48f2f745d9 clean up the C example a bit 2020-03-01 17:33:36 -05:00
Jack O'Connor fcc14c8c1b more file renaming, use underscores more consistently 2020-02-12 18:41:41 -05:00
Erik Johansson 0281f1ae16 Rename assembly files (blake3-* -> blake3_*)
This gives the assembly files the same prefix as the intrinsics files which
simplifies building when the build system should pick between the assembly and
the intrinsics files.
2020-02-12 23:08:44 +01:00
Jack O'Connor 7ee05ba3bd document how to build the C code with assembly implementations 2020-02-12 13:04:03 -05:00
Jack O'Connor 3c098eecc1 formating in c/README.md 2020-01-29 13:05:44 -05:00
Jack O'Connor af0ef07519 update the c/README.md example to hash stdin 2020-01-29 13:01:40 -05:00
Jack O'Connor 37e153cc60 add NEON support to blake3_dispatch.c
Currently this requires setting the BLAKE3_USE_NEON preprocessor flag.
In the future we may enable this automatically on AArch32/64 or include
some kind of dynamic feature detection. (Though ARM makes this harder
than x86.)

As part of this, get rid of the IS_ARM flag. It wasn't being set
properly when I tried it on a Raspberry Pi.

Closes #30.
2020-01-28 15:59:16 -05:00
Jack O'Connor dec0c49576 add a note about AVX-512 flags 2020-01-27 13:10:25 -05:00
Jack O'Connor 71e605fd5d
typo 2020-01-26 16:12:10 -05:00
Jack O'Connor 1db856a3e5 expand the C README for public consumption 2020-01-26 16:07:51 -05:00
Jack O'Connor af9b44c881 replace the C code README with a "not yet ready" remark 2020-01-09 09:48:52 -05:00
Jack O'Connor a7579d30ad merge BLAKE3-c into this repo
This is commit 4476d9da0e370993823e7ad17592b84e905afd76 of
https://github.com/veorq/BLAKE3-c.
2020-01-09 09:48:52 -05:00