Skip to content

file checksums: add new signature algorithm xxh128#1359

Merged
arogge merged 11 commits intobareos:masterfrom
arogge:dev/arogge/master/add-xxh128
Feb 27, 2023
Merged

file checksums: add new signature algorithm xxh128#1359
arogge merged 11 commits intobareos:masterfrom
arogge:dev/arogge/master/add-xxh128

Conversation

@arogge
Copy link
Member

@arogge arogge commented Jan 19, 2023

This PR adds support for a new signature algorithm xxh128 (xxHash 3 128-bits). The hashing is not cryptographically safe, but is is a lot faster than all other algorithms we support.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@pstorz pstorz self-requested a review January 20, 2023 10:29
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments. Does it make sense to have a hash speed test?
Either as extra binary or as commandline switch to bareos-fd?

That way everybody could check the speed test of the different hashtypes on their real hardware.

As OpenSSL is a hard requirement, these cannot be used anymore and thus
will be removed.
@arogge arogge force-pushed the dev/arogge/master/add-xxh128 branch from 0f2191b to 9d077b5 Compare February 24, 2023 09:33
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@pstorz pstorz changed the title Add new signature algorithm xxh128 file checksums: add new signature algorithm xxh128 Feb 24, 2023
@arogge arogge force-pushed the dev/arogge/master/add-xxh128 branch from 6b7066e to 2a4c076 Compare February 24, 2023 09:52
Refactor the code on crypto_openssl so that we can add another digest
that is not openssl-based. This mostly adds another level of
indirection by moving digest update and finalize into class scope and
making Digest a base-class with no ties to OpenSSL.

TL;DR use virtual dispatch so we can call something that is not OpenSSL
@arogge arogge force-pushed the dev/arogge/master/add-xxh128 branch from 2a4c076 to d0ff9c0 Compare February 24, 2023 10:42
git-subtree-dir: third-party/xxHash
git-subtree-split: 35b0373c697b5f160d3db26b1cbb45a0d5ba788c
Add CMake configuration for xxHash library
Registers the xxHash128 checksum in every place configurable hashes are
done.
Change "Signature" in bareos systemtest's fileset to xxh128.
Add documentation for the new Signature XXH128 to the FileSet Option
documentation.
We only want to ignore the files in the third-party subdirectories, not
the ones in the toplevel, that we write ourselves.
@arogge arogge force-pushed the dev/arogge/master/add-xxh128 branch from d0ff9c0 to dd35d95 Compare February 24, 2023 10:47
@arogge arogge merged commit 2c7a676 into bareos:master Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants