Skip to content

remove xxhash / xxh64 requirement, mentions - #9750

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:remove-xxh64
Jun 10, 2026
Merged

remove xxhash / xxh64 requirement, mentions#9750
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:remove-xxh64

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.86%. Comparing base (c35bc66) to head (31202ea).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9750   +/-   ##
=======================================
  Coverage   84.86%   84.86%           
=======================================
  Files          92       92           
  Lines       14968    14968           
  Branches     2233     2233           
=======================================
  Hits        12703    12703           
- Misses       1571     1572    +1     
+ Partials      694      693    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
ThomasWaldmann merged commit d2cdeaf into borgbackup:master Jun 10, 2026
16 checks passed
@ThomasWaldmann
ThomasWaldmann deleted the remove-xxh64 branch June 10, 2026 12:00
ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this pull request Jul 29, 2026
XXH64 (and the XXH64FileHashingWrapper) were removed in borgbackup#9672 / borgbackup#9750,
which switched borg 2.x file integrity to SHA256. But borg 1.x wrote
XXH64 checksums into the repo index/hints integrity data, so we need
XXH64 to verify those files when reading a borg 1.x (legacy) repository
during `borg transfer`.

Rather than re-introducing the external "xxhash" PyPI package (and the
libxxhash system dependency on msys2 that borgbackup#9750 dropped), add a small,
dependency-free, streaming XXH64 implementation in cython to
crypto.low_level. It is only used on the read path; borg 2.x native
repos keep using SHA256. XXH64 is non-cryptographic and must not be used
as a security mechanism.

Tests use the official xxHash sanity-check vectors (the test buffer
generator is transcribed verbatim from xxHash tests/sanity_test.c) and
cover all code paths, streaming vs one-shot, and a legacy XXH64
integrity round-trip through IntegrityCheckedFile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant