remove xxhash / xxh64 requirement, mentions - #9750
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.