borg/src/borg/helpers
Thomas Waldmann 1b6f928917
ro_type: typed repo objects, see #7670
writing: put type into repoobj metadata
reading: check wanted type against type we got

repoobj metadata is encrypted and authenticated.
repoobj data is encrypted and authenticated, also (separately).
encryption and decryption of both metadata and data get the
same "chunk ID" as AAD, so both are "bound" to that (same) ID.

a repo-side attacker can neither see cleartext metadata/data,
nor successfully tamper with it (AEAD decryption would fail).

also, a repo-side attacker could not replace a repoobj A with a
differently typed repoobj B without borg noticing:
- the metadata/data is cryptographically bound to its ID.
  authentication/decryption would fail on mismatch.
- the type check would fail.

thus, the problem (see CVEs in changelog) solved in borg 1 by the
manifest and archive TAMs is now already solved by the type check.
2023-09-24 20:10:50 +02:00
..
__init__.py remove unused "flags_root" open flags 2023-07-29 23:34:52 +02:00
checks.py fix F401 2023-07-26 01:23:37 +02:00
datastruct.py blacken all the code 2022-07-06 16:34:38 +02:00
errors.py blacken all the code 2022-07-06 16:34:38 +02:00
fs.py get_*_dir: add create=True kw argument 2023-08-27 03:15:12 +02:00
lrucache.py rephrase docstring and remove unused sentinel 2023-06-11 13:56:58 +02:00
misc.py ro_type: typed repo objects, see #7670 2023-09-24 20:10:50 +02:00
msgpack.py allow msgpack 1.0.6 (which has py312 wheels), fixes #7810 2023-09-14 13:47:31 +02:00
nanorst.py move nanorst module to borg.helpers 2022-08-13 22:10:13 +02:00
parseformat.py ro_type: typed repo objects, see #7670 2023-09-24 20:10:50 +02:00
passphrase.py pyupgrade --py39-plus ./**/*.py 2023-04-02 02:14:54 +02:00
process.py fix F401 2023-07-26 01:23:37 +02:00
progress.py channel progress output via logging system 2023-05-29 22:40:47 +02:00
shellpattern.py fix E501 2023-07-26 01:24:20 +02:00
time.py Support for date-based matching during archive listing (#7272) 2023-01-23 15:00:05 +01:00
yes_no.py mypy: rename yes module to yes_no to avoid name collision 2022-07-15 14:46:18 +02:00