From 8e2f5a621b5bfcedc77f19168d4ee4afb724798a Mon Sep 17 00:00:00 2001 From: elandorr <56206745+elandorr@users.noreply.github.com> Date: Sun, 14 May 2023 07:09:45 +0000 Subject: [PATCH 1/2] escape --- src/borg/archiver/create_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/archiver/create_cmd.py b/src/borg/archiver/create_cmd.py index fbf9b6455..19f88d994 100644 --- a/src/borg/archiver/create_cmd.py +++ b/src/borg/archiver/create_cmd.py @@ -813,7 +813,7 @@ class CreateMixIn: "--paths-delimiter", action=Highlander, metavar="DELIM", - help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: \\n) ", + help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: ``\\n``) ", ) exclude_group = define_exclusion_group(subparser, tag_files=True) From e086d2a8f6bd16328d589e52f5eef0af579692aa Mon Sep 17 00:00:00 2001 From: elandorr <56206745+elandorr@users.noreply.github.com> Date: Sun, 14 May 2023 07:14:48 +0000 Subject: [PATCH 2/2] markup fix + note about MAX_DATA_SIZE --- src/borg/archiver/help_cmd.py | 55 ++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/src/borg/archiver/help_cmd.py b/src/borg/archiver/help_cmd.py index 6ead8daaf..8bc8d178e 100644 --- a/src/borg/archiver/help_cmd.py +++ b/src/borg/archiver/help_cmd.py @@ -385,29 +385,44 @@ class HelpMixIn: obfuscate,SPEC,C[,L] Use compressed-size obfuscation to make fingerprinting attacks based on - the observable stored chunk size more difficult. - Note: - - you must combine this with encryption or it won't make any sense. - - your repo size will be bigger, of course. + the observable stored chunk size more difficult. Note: - The SPEC value will determine how the size obfuscation will work: + - You must combine this with encryption, or it won't make any sense. + - Your repo size will be bigger, of course. + - A chunk is limited by the constant ``MAX_DATA_SIZE`` (cur. ~20MiB). + + The SPEC value determines how the size obfuscation works: + + *Relative random reciprocal size variation* (multiplicative) - Relative random reciprocal size variation: Size will increase by a factor, relative to the compressed data size. - Smaller factors are often used, larger factors rarely. - 1: factor 0.01 .. 100.0 - 2: factor 0.1 .. 1000.0 - 3: factor 1.0 .. 10000.0 - 4: factor 10.0 .. 100000.0 - 5: factor 100.0 .. 1000000.0 - 6: factor 1000.0 .. 10000000.0 + Smaller factors are used often, larger factors rarely. - Add a randomly sized padding up to the given size: - 110: 1kiB - ... - 120: 1MiB - ... - 123: 8MiB (max.) + Available factors:: + + 1: 0.01 .. 100 + 2: 0.1 .. 1,000 + 3: 1 .. 10,000 + 4: 10 .. 100,000 + 5: 100 .. 1,000,000 + 6: 1,000 .. 10,000,000 + + Example probabilities for SPEC ``1``:: + + 90 % 0.01 .. 0.1 + 9 % 0.1 .. 1 + 0.9 % 1 .. 10 + 0.09% 10 .. 100 + + *Randomly sized padding up to the given size* (additive) + + :: + + 110: 1kiB (2 ^ (SPEC - 100)) + ... + 120: 1MiB + ... + 123: 8MiB (max.) Examples:: @@ -418,7 +433,7 @@ class HelpMixIn: borg create --compression zlib,1 REPO::ARCHIVE data borg create --compression auto,lzma,6 REPO::ARCHIVE data borg create --compression auto,lzma ... - borg create --compression obfuscate,3,none ... + borg create --compression obfuscate,110,none ... borg create --compression obfuscate,3,auto,zstd,10 ... borg create --compression obfuscate,2,zstd,6 ...\n\n""" )