Ondrej Kozina
943fa69da6
Reduce code duplication in LUKS2 keyslot handling.
2019-11-28 16:38:53 +01:00
Ondrej Kozina
3bef291184
Unify low level LUKS2 keyslot unlock and verify code.
...
Function is now unused, see later commit
2019-11-28 16:38:53 +01:00
Ondrej Kozina
7316c53b04
Remove redundant digest id to key assignement.
2019-11-28 16:38:52 +01:00
Ondrej Kozina
5e1d1e1850
Add missing validation when unlocking keys for reencryption.
...
We missed keyslot json validation when unlocking all keys necessary
for reencryption. Also assign appropriate verified digest id to
keys in volume key structure.
2019-11-28 16:38:52 +01:00
Ondrej Kozina
e52c8e148c
Remove unnecessary query for volume key size.
...
In fact we need only stored key size in examined keyslot. It's valid for
default segment volume keys and in case of non-default segment
keys it always returns -1 and fallbacks to stored key size query
instead.
2019-11-28 16:38:52 +01:00
Ondrej Kozina
7eb47f3db1
Split reencryption locking in two variants.
2019-11-28 16:38:52 +01:00
Milan Broz
ec59d31d04
Remove AEAD tests dor MORUS and AEGIS ciphers.
...
These variants were removed from mainline kernel.
2019-11-25 23:16:53 +01:00
Milan Broz
ddd15b63b2
Add backward compatibility flags API.
...
We need to have some way hot to configure old integrity devices
with legacy padding.
For now, also use in tests to not fail checksum with new kernel.
2019-11-25 23:14:58 +01:00
Milan Broz
e91b35a53d
Print info and warning if dm-integrity fix_padding is set.
...
The dump operation prints the fix_padding flag if set.
Also try to print warning if an old kernel is used and th edevice
cannot be activated because of missing fix padding support.
2019-11-25 19:48:54 +01:00
Mikulas Patocka
fb4079aa4d
cryptsetup: add support for the "fix_padding" option
...
This patch adds support for fixed padding to cryptsetup.
* Cryptsetup will accept superblocks version 4.
* If the dm-integrity target version is greater than 1.4, cryptsetup will
add a flag "fix_padding" to the dm-integrity target arguments.
There is still one quirk: if we have an old libdm without
DM_DEVICE_GET_TARGET_VERSION and if dm-integrity module is not loaded,
cryptsetup will not detect that it can use the "fix_padding" option.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com >
2019-11-24 20:58:47 +01:00
Milan Broz
48b203a134
Add crypt_resume_by_volume_key() function.
...
If user has volume key available, LUKS device can be resumed
directly using provided volume key.
No keyslot derivation is needed, only key digest is checked.
Fixes : #502 .
2019-11-24 18:04:41 +01:00
Milan Broz
2746fd708f
Implement active device suspend info.
...
Add CRYPT_ACTIVATE_SUSPENDED bit to crypt_get_active_device() flags
that informs the caller that device is suspended (luksSuspend).
Fixes : #501 .
2019-11-24 16:56:26 +01:00
Ondrej Kozina
684f43d84d
Clarify confirmation prompt text.
...
Fixes : #473
2019-11-22 15:34:16 +01:00
Milan Broz
6b1be52e6b
Fix LUKS1 format if pkbdf benchamr is disabled.
...
We use minimum iteration for key digest in this case
(the same already used in LUKS2).
Fixes : #478 .
2019-11-22 13:02:41 +01:00
Ondrej Kozina
de6258d366
Allow --test-passphrase for detached header alone.
...
Before this fix we required data device specified on cmd line
even though it was not necessary for testing passphrase.
Fixes : #487 .
2019-11-19 14:36:06 +01:00
Ondrej Kozina
5e4dbf33be
Allow --key-file option in legacy offline encryption.
...
The option was ignored for LUKS1 encryption initialization.
Fixes : #491 .
2019-11-19 12:41:14 +01:00
Milan Broz
b03cb3f3d8
Export memory safe functions.
...
Make crypt_safe_alloc/realloc/free and memzero part of API.
2019-11-16 21:28:54 +01:00
Ondrej Kozina
e08401a2ec
Properly fix encryption initialization message.
2019-11-08 13:15:37 +01:00
Ondrej Kozina
0a9e7028ae
Fix LUKS2 encryption initialization with non-zero keyslot.
...
Positive keyslot number was interpreted as a failure.
2019-11-08 13:15:37 +01:00
Milan Broz
ba0ecc54df
Test Bionic distro in Travis.
2019-11-05 22:09:05 +01:00
Milan Broz
6920f9dc27
Set devel version.
2019-11-05 17:56:58 +01:00
Milan Broz
ba2547212e
Allow bitlk branch for CI tests.
2019-11-05 17:53:07 +01:00
Milan Broz
bbe1a8a5b6
Update Readme.md for 2.2.2.
2019-11-01 10:16:05 +01:00
Milan Broz
c82728f04d
Version 2.2.2.
v2.2.2
2019-11-01 09:02:46 +01:00
Milan Broz
cc0d33bca7
Fix DM_DEVICE_GET_TARGET_VERSION detection.
...
Stable libdevampper used changed name for dm task, let's fix it.
2019-10-31 20:35:46 +01:00
Milan Broz
3933ec7dce
Add Ondra to authors.
2019-10-31 20:02:51 +01:00
Petr Pisar
f8c9507612
po: update cs.po (from translationproject.org)
2019-10-31 20:01:51 +01:00
Yuri Kozlov
7c5c9ae8fd
po: update ru.po (from translationproject.org)
2019-10-31 12:10:04 +01:00
Frédéric Marchal
cd00792fe9
po: update fr.po (from translationproject.org)
2019-10-31 12:10:04 +01:00
Ondrej Kozina
df390509b2
Hotfix missing new line character in translated string.
...
Without this fix the message gets immediately overwritten with
reencryption progress bar.
2019-10-31 12:02:55 +01:00
Ondrej Kozina
dd6abe9375
Add luks2-reencryption-test to valgrind checks.
2019-10-22 15:07:57 +02:00
Milan Broz
a3f199d0a3
po: update pot file
2019-10-20 10:40:12 +02:00
Yuri Chornoivan
8e3b85ee12
po: update uk.po (from translationproject.org)
2019-10-20 10:35:43 +02:00
Jakub Bogusz
e60fbfc865
po: update pl.po (from translationproject.org)
2019-10-20 10:35:43 +02:00
Hiroshi Takekawa
a512488fd7
po: update ja.po (from translationproject.org)
2019-10-20 10:35:43 +02:00
Antonio Ceballos
1981d909cf
po: update es.po (from translationproject.org)
2019-10-20 10:35:43 +02:00
Roland Illig
ea14f2c98c
po: update de.po (from translationproject.org)
2019-10-20 10:35:43 +02:00
Milan Broz
c81becf10d
Prepare version tag, and sync po files.
...
(For some reason I unsynced all po files again,
this patch reverts them to the translationproject versions...)
2019-10-18 10:52:33 +02:00
dofrupisla
1433d040ae
Fix luksHeaderRestore occuring twice
2019-10-17 11:07:32 +02:00
Milan Broz
206b70c837
Explicitly print error message if keyslot open failed.
...
The only quiet message now is EPERM (wrong password) that is
processed by the caller.
Fixes #488 .
2019-10-11 14:06:49 +02:00
Ondrej Kozina
bb857dcef2
Silence reencryption compat test.
2019-10-11 12:40:14 +02:00
Ondrej Kozina
5568a780a9
Add missing error message to translation.
2019-10-11 12:40:09 +02:00
Ondrej Kozina
7c2086967b
Add various units for progress speed reporting.
...
The progress function remained silent unless the speed was higher
than minimal delta for double type in MiB/s. That could confuse
users that progress got stucked, but it in fact it was only slow.
Now wipe and reencryption progess functions can report speeds
in B/s up to GiB/s.
2019-10-11 12:40:03 +02:00
Ondrej Kozina
f7fbf4d38c
Fix bogus speed reports after resuming tracked operation.
...
When resuming reencryption operation (both LUKS2 and legacy offline
code) speeds were incorectly calculated from whole progress including
range already reencrypted in previous runs. Now we track speed only
for currently running session.
2019-10-11 12:39:59 +02:00
Ondrej Kozina
0c8cf5c1e0
Switch cryptsetup-reencrypt to use tools_reencrypt_progress.
2019-10-11 12:39:51 +02:00
Milan Broz
33f2af1c09
Change --version option handling and support -V short option.
...
Fixes #480 .
2019-10-10 10:51:04 +02:00
Ondrej Kozina
c9a7e6e4ec
Add blkid wipe report messages to translations.
2019-10-08 15:31:57 +02:00
Ondrej Kozina
86bb4ea8f2
Report offsets when wiping device signatures.
...
Fixes : #489 .
2019-10-08 15:31:57 +02:00
Milan Broz
99c4e83994
Properly support LTLIBINTL setting in Makefiles.
...
Fixes #479 .
2019-10-08 15:26:13 +02:00
Milan Broz
ca2f5a8160
Fix tests in previous commits.
2019-10-08 14:58:07 +02:00