Go to file
Marek Marczykowski-Górecki 418d749680
backup: use 'scrypt' tool for backup encryption and integrity protection
`openssl dgst` and `openssl enc` used previously poorly handle key
stretching - in case of `openssl enc` encryption key is derived using
single MD5 iteration, without even any salt. This hardly prevent
brute force or even rainbow tables attacks. To make things worse, the
same key is used for encryption and integrity protection which ease
brute force even further.
All this is still about brute force attacks, so when using long, high
entropy passphrase, it should be still relatively safe. But lets do
better.
According to discussion in QubesOS/qubes-issues#971, scrypt algorithm is
a good choice for key stretching (it isn't the best of all existing, but
a good one and widely adopted). At the same time, lets switch away from
`openssl` tool, as it is very limited and apparently not designed for
production use. Use `scrypt` tool, which is very simple and does exactly
what we need - encrypt the data and integrity protect it. Its archive
format have own (simple) header with data required by the `scrypt`
algorithm, including salt. Internally data is encrypted with AES256-CTR
and integrity protected with HMAC-SHA256. For details see:
https://github.com/tarsnap/scrypt/blob/master/FORMAT

This means change of backup format. Mainly:

1. HMAC is stored in scrypt header, so don't use separate file for it.
Instead have data in files with `.enc` extension.
2. For compatibility leave `backup-header` and `backup-header.hmac`. But
`backup-header.hmac` is really scrypt-encrypted version of `backup-header`.
3. For each file, prepend its identifier to the passphrase, to
authenticate filename itself too. Having this we can guard against
reordering archive files within a single backup and across backups. This
identifier is built as:

        backup ID (from backup-header)!filename!

For backup-header itself, there is no backup ID (just 'backup-header!').

Fixes QubesOS/qubes-issues#971
2016-10-28 11:53:32 +02:00
ci Extend ci/pylintrc 2016-06-23 13:16:10 +02:00
contrib contrib: import-graph creates smaller, more readable graph 2016-04-27 17:51:18 +02:00
core Merge remote-tracking branch 'origin/master' into core3-devel 2016-08-08 00:11:46 +02:00
core-modules Merge remote-tracking branch 'origin/master' into core3-devel 2016-08-08 00:11:46 +02:00
dispvm dispvm: error out on saved-cows.tar creation error 2016-08-07 00:41:59 +02:00
doc qubes/tools: qvm-backup and qvm-backup-restore tools 2016-09-21 16:02:50 +02:00
etc Replace pool config parsing logic 2016-04-25 07:16:37 +02:00
linux block-snapshot: set qubes.xml path for test VMs 2016-08-09 05:14:11 +02:00
qubes backup: use 'scrypt' tool for backup encryption and integrity protection 2016-10-28 11:53:32 +02:00
qubes-rpc qubes/tools/qvm-features: add tool for managing qvm-features 2016-05-19 03:02:24 +02:00
qubes-rpc-policy Merge branch 'master' into core3-devel 2016-06-13 19:03:46 +02:00
qvm-tools Merge remote-tracking branch 'origin/master' into core3-devel 2016-08-08 00:11:46 +02:00
relaxng qubes: new devices API 2016-09-03 20:40:39 +02:00
rpm_spec backup: use 'scrypt' tool for backup encryption and integrity protection 2016-10-28 11:53:32 +02:00
templates qubes/ext/pci: implement pci-no-strict-reset/BDF feature 2016-09-03 20:41:06 +02:00
test-packages test-packages/dbus: add SystemBus 2016-06-10 21:27:29 +02:00
tests tests: port vm_qrexec_gui to core3 API 2016-08-17 22:41:57 +02:00
.coveragerc add config for coverage.py 2015-10-12 16:40:46 +02:00
.gitignore run-tests: Script for running tests in repo 2016-04-20 13:54:56 +02:00
.pylintrc Remove obsolete options from .pylintrc 2016-07-21 12:21:00 +02:00
.travis.yml Revert "Travis add python-lvm2 dependency" 2016-08-04 17:46:41 +02:00
installer.wxs windows/installer: configurable destination directory 2014-11-19 12:50:31 +01:00
LICENSE Added LICENSE 2010-04-05 21:21:27 +02:00
Makefile qubes/tools: allow calling qvm-device as qvm-devclass (like qvm-pci) 2016-09-03 20:41:05 +02:00
Makefile.builder windows: installer 2014-11-19 12:50:30 +01:00
README.md README: add travis button 2016-06-16 17:39:38 +02:00
run-tests travis-ci config file 2016-06-10 21:27:26 +02:00
setup.cfg Add yapf configuration to setup.cfg 2016-07-21 12:11:34 +02:00
setup.py qubes/ext/pci: move PCI devices handling to an extension 2016-09-03 20:41:03 +02:00
version version 3.2.8 2016-08-07 16:11:49 +02:00

Qubes core, version 3

Build Status

This is development branch of the Qubes OS core. This branch is subject to rebase without warning until further notice.

API documentation is available: https://qubes-core-admin.readthedocs.org/en/latest/.