Commit Graph

184 Commits

Author SHA1 Message Date
Matthew Dolan
29b25f324a
Correct assertion 2021-06-28 06:58:04 +01:00
Yann Collet
f257e949ea updated version number to v0.8.1
to distinguish from latest release during support
as we are introducing more and more changes within `dev`.
2021-06-27 22:55:04 -07:00
Takayuki Matsuoka
219b3e3ccf Fix make usan runtime error 2021-05-26 10:14:45 +09:00
Yann Collet
55be05e5c8 added compilation flag XXH_NO_XXH3
which removes generation of XXH3 symbols from library
resulting in smaller binary size.
2021-04-18 09:06:20 -07:00
Yann Collet
1f2dc264af fixed incorrect assert condition
close #522
reported by @La-cu-na
2021-04-08 09:45:56 -07:00
Yann Collet
7bf3d9f331
removed XXH64's switch finalizer (#521)
which performs generally worse than simpler loop finalizer
(see https://github.com/Cyan4973/xxHash/pull/519#issuecomment-807868078)
especially on 32-bit / arm systems.
The switch finalizer also largely increases the binary size of XXH64 function.

removed XXH_REROLL_XXH64 which is no longer needed.

simplifies the code base.
2021-03-26 08:28:41 -07:00
easyaspi314 (Devin)
94e7193eea
AArch64 tuning, put asm guard in macro (#519)
- AArch64 does not benefit enough from unrolling XXH64_finalize to
   justify the code size increase.
 - Include aarch64 in the XXH32 asm guard. Clang autovectorizes this
   incorrectly. 2.5->4 GB/s on Clang 11 + Snapdragon 730G.
 - Replace the asm guards with a macro.
2021-03-25 14:59:27 -07:00
Yann Collet
4dab857945 strict c90 compliance
added travisCI tests
added minor fixes
2021-03-12 10:58:26 -08:00
Neal Richardson
a340845f94
Fix the solaris patch 2021-02-22 15:52:38 -08:00
Yann Collet
4254f6e46d
Revert "solaris restrict keyword fix" 2021-02-22 14:57:36 -08:00
Travers
c865e556c9 fix to solaris restrict keyword with c++ 2021-02-22 09:41:20 -08:00
Travers
01fc2e6294 solaris restrict keyword fix 2021-02-20 17:29:41 -08:00
Yann Collet
a470f2ef95 update default memory access for armv6
Now uses `memcpy()` (method 0) by default
fix #490
2021-02-02 06:40:22 -08:00
Thomas Waldmann
91759f7e01 fix typos (work done by Andrea Gelmini) 2021-01-07 18:55:54 +01:00
Yann Collet
6b44373c2f check that bufferedSize remains within bounds
to detect situations like #482
2020-12-09 15:44:00 -08:00
Yann Collet
b23f2e19e5 simplify XXH3 reset
single function XXH3_reset_internal()
2020-12-09 15:40:03 -08:00
Tim Gates
3e8cc41d2a
docs: fix simple typo, minumum -> minimum
There is a small typo in xxh_x86dispatch.c, xxhash.h.

Should read `minimum` rather than `minumum`.
2020-11-20 08:52:07 +11:00
jonsykkel
967060b1d1
fixed CRITICAL typo in comment 2020-11-13 06:15:08 +01:00
easyaspi314 (Devin)
81e11d991b Disable disabled dispatch paths in xxhash.h
Now, when `XXH_DISPATCH_AVX*` is zero, the codepaths will be properly
disabled, preventing any issues from old compilers.

Fixes #464 (again).
2020-10-19 10:25:03 -04:00
easyaspi314 (Devin)
f9a4ab5123 Add missing XXH3 implementation group 2020-10-16 15:47:45 -04:00
easyaspi314 (Devin)
960709597b Finish XXH32 internal documentation. 2020-10-16 15:44:35 -04:00
easyaspi314 (Devin)
7179055461 Fix comment typos 2020-10-15 20:14:44 -04:00
easyaspi314 (Devin)
e1784dda98 [WIP] Doxygenize and redocument some funcs
XXH32's API, XXH*_state_s, the config macros, and some other things are
documented in Doxygen format, basic Doxyfile added.

Some functions were also redocumented in detail.

Still need to work on structuring the main page (set it to README.md?).

How to view docs for now:

 $ sudo apt install doxygen
 $ npm install -g http-server # or you can use LLVM's scan-view
 $ doxygen && hs doxygen/html -s -c-1 -o
2020-10-15 18:33:27 -04:00
Yann Collet
d83cce5b91 fix prefetching for x86 32-bit target on MSVC 2020-09-30 15:56:07 -07:00
Yann Collet
7ee691763b refactor xxh3 presentation in code comments
hopefully clarifying #449
2020-09-15 11:21:58 -07:00
Niklas Hambüchen
9481f42a62 xxhash.h: Update "still in development" comments
v0.8.0 marked XXH3 as stable.
2020-08-13 18:39:35 +02:00
Yann Collet
cd59de7b58 fix altivec.h redefinition issue
fix #426
2020-07-23 16:37:57 -07:00
Yann Collet
b1c22850f4 move validated XXH3 prototypes into stable 2020-07-23 14:14:59 -07:00
Yann Collet
2c992d0cc7 merge xxh3 implementation within xxhash.h
xxh3.h is no longer necessary
but remains available,
in case some programs do #include "xxh3.h" directly.

Also : bumped version number to v0.8.0
2020-07-23 10:24:51 -07:00
Yann Collet
662b223eef slightly improved streaming speed on small
by reducing memset() even more

note : required re-organizing members order
2020-07-10 23:34:17 -07:00
Yann Collet
18f0991cef do not regenerate secret from seed
when state was already used with the same `seed` previously.
This skips secret generation when `seed` remains constant.

Also : improves streaming speed on small data
thanks to lighter memset() during reset().
2020-07-10 22:11:45 -07:00
Yann Collet
f41dc60ff1 updated comments on _withSecret() variants
re-inforce the need for a high entropy source for `secret`.
2020-06-24 17:03:00 -07:00
Yann Collet
972ae45bf5 Merge branch 'dev' into x86dispatch_table 2020-06-11 17:52:14 -07:00
Yann Collet
27e33ac174
Merge pull request #386 from Cyan4973/kdf
Key Derivation function
2020-06-11 17:50:51 -07:00
Yann Collet
8dff3b89ee moved XXH3_generateSecret() into experimental section
so that its outcome remain non-binding
even after XXH3 / XXH128 get stabilized.
2020-06-11 17:22:58 -07:00
Yann Collet
35fad7a3de shortened a few names
handle unused function warning
2020-06-09 21:15:50 -07:00
Yann Collet
c546d08ff3 kdf v3
Following comments from @koraa :
- fix endianess issue, by using canonical representation
- all segments are derived from first one, in order to reduce dependency chain
- all derived segments use a seed, which is a combination raw custom seed content and segNb
- updated documentation

This variant breaks the possibility for an actor
to derive the entire secret from the knowledge of one of its segments
since it requires the seed, which is derived from original custom seed,
which is not present anywhere, condensed in the scrambling operation.
2020-06-05 16:46:55 -07:00
Yann Collet
58922a773b secret generator v2
update 128-bit scrambler at each 16-bytes round.
ensure there is no delta-correlation possible between segments,
even when the initial custom seed is poor (<= 16 bytes, or full of `\0` characters).
2020-06-05 00:37:56 -07:00
Yann Collet
37a68f29df remove alignment check on aarch64
as this architecture offers decent performance for unaligned memory accesses (like x86/x64).

This circumvent the problem described in #383,
as the direct read path using `const xxh_u32*` will not be generated by default.

Note however that this does not go at the root of the problem,
which is a possibility of strict-aliasing issue
when using the direct read path _and_ inlining xxh32.
This issue however is more difficult to solve without a reproduction case.

I also used this opportunity to fix or reinforce documentation.
2020-06-04 00:05:24 -07:00
Yann Collet
4d0ec6e6ed first version of kdf 2020-06-02 22:41:24 -07:00
Yann Collet
e3ad2c907f support for secretSize > 4 GB in streaming mode
fix #368
2020-05-20 19:21:25 -07:00
Yann Collet
6af67b92b7 Merge branch 'dev' into moveXXH3state 2020-05-20 14:31:11 -07:00
easyaspi314 (Devin)
da20cf1156 Fix minor formatting issue 2020-05-20 16:41:53 -04:00
easyaspi314 (Devin)
3eb1a010a0 Clean up namespace
- Every symbol, typedef, and macro is prefixed with XXH or xxh.
 - For compatibility with legacy code that messes with the internals,
   XXH_OLD_NAMES can be defined to wrap the old names in macros. This
   also brings back U32 and friends.
2020-05-20 16:36:24 -04:00
Yann Collet
a97e8a88a2 make XXH3_state_t movable
also fix XXH3_copyState()
when copying a state initialized with a seed.

fix #365
2020-05-20 10:45:27 -07:00
James Z.M. Gao
4b12376862 add optimized implementation for AVX512 targets 2020-04-06 15:58:26 +08:00
easyaspi314 (Devin)
7ea2940fd6 Fix a few warnings
- Trailing comma in enum in xxhsum.c
 - Extra semicolon
 - Non-constant brace list initializers
2020-03-16 12:29:49 -04:00
Yann Collet
77294d27ae updated version number
in order to distinguish users of the release from potential users of the development version
2020-03-12 14:45:51 -07:00
Yann Collet
1dc959b74d
Merge pull request #332 from easyaspi314/documentation-v2
More documentation and cleanup
2020-03-09 15:16:40 -07:00
Yann Collet
3f06265869
Merge pull request #330 from easyaspi314/align-malloc
[HOTFIX] Align malloc, use createState/freeState in sanity check
2020-03-08 23:28:38 -07:00