Skip to content

Commit d23704e

Browse files
buzhash64: docs
1 parent b9646f2 commit d23704e

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

docs/internals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ specified when the backup was performed.
1919
Deduplication is performed globally across all data in the repository
2020
(multiple backups and even multiple hosts), both on data and file
2121
metadata, using :ref:`chunks` created by the chunker using the
22-
Buzhash_ algorithm ("buzhash" chunker) or a simpler fixed blocksize
23-
algorithm ("fixed" chunker).
22+
Buzhash_ algorithm ("buzhash" and "buzhash64" chunker) or a simpler
23+
fixed blocksize algorithm ("fixed" chunker).
2424

2525
To perform the repository-wide deduplication, a hash of each
2626
chunk is checked against the :ref:`chunks cache <cache>`, which is a

docs/internals/data-structures.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ Borg has these chunkers:
399399
supporting a header block of different size.
400400
- "buzhash": variable, content-defined blocksize, uses a rolling hash
401401
computed by the Buzhash_ algorithm.
402+
- "buzhash64": similar to "buzhash", but improved 64bit implementation
402403

403404
For some more general usage hints see also ``--chunker-params``.
404405

@@ -469,6 +470,16 @@ for the repository, and stored encrypted in the keyfile. This is to prevent
469470
chunk size based fingerprinting attacks on your encrypted repo contents (to
470471
guess what files you have based on a specific set of chunk sizes).
471472

473+
"buzhash64" chunker
474+
+++++++++++++++++++
475+
476+
Similar to "buzhash", but using 64bit wide hash values.
477+
478+
The buzhash table is cryptographically derived from secret key material.
479+
480+
These changes should improve resistance against attacks and also solve
481+
some of the issues of the original (32bit / XORed table) implementation.
482+
472483
.. _cache:
473484

474485
The cache

docs/internals/security.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,19 @@ The chunks stored in the repo are the (compressed, encrypted and authenticated)
361361
output of the chunker. The sizes of these stored chunks are influenced by the
362362
compression, encryption and authentication.
363363

364-
buzhash chunker
365-
~~~~~~~~~~~~~~~
364+
buzhash and buzhash64 chunker
365+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366366

367-
The buzhash chunker chunks according to the input data, the chunker's
368-
parameters and the secret chunker seed (which all influence the chunk boundary
367+
The buzhash chunkers chunk according to the input data, the chunker's
368+
parameters and secret key material (which all influence the chunk boundary
369369
positions).
370370

371+
Secret key material:
372+
373+
- "buzhash": chunker seed (32bits), used for XORing the hardcoded buzhash table
374+
- "buzhash64": bh64_key (256bits) is derived from ID key, used to cryptographically
375+
generate the table.
376+
371377
Small files below some specific threshold (default: 512 KiB) result in only one
372378
chunk (identical content / size as the original file), bigger files result in
373379
multiple chunks.

0 commit comments

Comments
 (0)