Milan Broz
919f4df1a7
Remove wip-bitlocker branch from CI.
2019-12-31 12:20:06 +01:00
Milan Broz
71a1698bf2
Add bitlk.c to translation.
2019-12-31 11:16:01 +01:00
Milan Broz
a987dd95b8
Remove unused bitlk params structure.
2019-12-30 21:57:42 +01:00
Milan Broz
ab6ab8e65c
Fix BITLK command aliases descriptions.
2019-12-30 21:53:06 +01:00
Milan Broz
3b28d66410
Add BitLocker man page extentsion.
2019-12-30 21:53:06 +01:00
Milan Broz
eee46ef2f4
Detect support for BitLocker EBOIV and Elephant diffuser.
...
If kernel is missing support, print a more friendly error.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
3c189b4183
bitlk: Fix displaying key length in bitlkDump
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
fd5ab0edf7
bitlk: Add Smart Card protected VMKs
...
Test image protected with smart card is included.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
420387a7a5
bitlk: Ignore unknown metadata entries for unsupported VMKs
...
VMKs (keyslots) protected with a smart card or TPM have some
additional metadata entries that are currently unkwnon. We can
safely ignore these because we don't support unlocking the device
using these VMKs so we should still be able to parse the metadata
and unlock the device using other VMKs like the recovery password.
2019-12-30 21:53:06 +01:00
Milan Broz
fc740f8b6d
Simplify bitlk test and be sure to load dm-crypt module.
2019-12-30 21:53:06 +01:00
Vojtech Trefny
834059ddfa
Do not hardcode number of DM segments for BitLocker devices
...
Sometimes there is no gap between the metadata so we don't want to
create a dm-crypt segment there.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
5ec2fbcd38
Allow empty passphrases when opening BitLocker devices
...
It's probably not possible to create a BitLocker device with an
empty passphrase but we want to support it. And it's definitely
better to ask for the passphrase again instead of returning
ENOMEM.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
2fbf5cd79f
Covert the BitLocker test images to sparse images
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
64ebe95751
Check sha256 sums of the bitlk images in tests
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
77109b3a33
Edit BitLocker test images to be compatible with older blkid
...
We need to keep the mirror NTFS MFT too because older versions of
blkid check it too.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
b43429e684
Fix parsing BitLocker metadata on Big Endian architectures
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
97e39f0744
Fix displaying error for not supported BitLocker key decryption
...
'crypt_bitlk_decrypt_key' can also fail because of wrong
passphrase and other reasons.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
fad592b512
Fix open on devices with no supported VMKs
2019-12-30 21:53:06 +01:00
Milan Broz
565de3c536
Fix check for bitlk iv overflow in crypto backend.
2019-12-30 21:53:06 +01:00
Milan Broz
c802269ea3
Bitlk: fix some additional gcc warnings.
2019-12-30 21:53:06 +01:00
Milan Broz
06268963fb
Bitlk: clean up some inlcudes and warnings.
2019-12-30 21:53:06 +01:00
Milan Broz
2227797691
Bitlk: move test for older blkid.
2019-12-30 21:53:06 +01:00
Milan Broz
f0888c1fe0
Add AEAD define on older kernel headers.
2019-12-30 21:53:06 +01:00
Milan Broz
eda2e62589
Add other backends (Nettle, NSS) for Bitlk decryption (through kernel wrapper).
2019-12-30 21:53:06 +01:00
Milan Broz
494d8ec04c
Add kernel backend for Bitlk key decryption.
2019-12-30 21:53:06 +01:00
Milan Broz
bb8088ca0f
Another fix for ancient systems.
2019-12-30 21:53:06 +01:00
Milan Broz
26f4bc39fc
Fix tes for very old bash.
2019-12-30 21:53:06 +01:00
Milan Broz
025e4d9fc6
Fix bitlk test on older systems.
2019-12-30 21:53:06 +01:00
Milan Broz
b2774d57ba
Bitlk: Propagare errno from key decryption.
2019-12-30 21:53:06 +01:00
Milan Broz
51edfb4ec9
Bitlk: add gcrypt key backend.
2019-12-30 21:53:06 +01:00
Milan Broz
79019b1ced
Bitlk: Move crypt key handling to crypto backend.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
bc87140b5b
Do not declare control variables in for loops
...
C89 doesn't like this.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
1c5251069b
Define UUID_STR_LEN not defined in older versions of libuuid
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
0b6dfefcec
Add tests and test images for BitLocker
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
a9e32c55c0
Fix parsing BitLocker metadata from latest Windows
...
Newest version added a new metadata entry to the recovery
passphrase protected VMK containing two new timestamps. We are
ignoring these for now.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
a494228407
Do not try to activate partially decrypted BitLocker devices
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
9932b5fc5c
Do not try to activate BitLocker devices with diffuser
...
The CBC mode with Elephant Diffuser is currently not supported
by DM crypt.
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
966ba44a33
Add support for opening of BitLocker devices
...
It's now possible to open/activate the device using passphrase or
recovery passphrase. Support is limited to devices using encryption
modes supported in the DM crypt module (AES-XTS and AES-CBC).
2019-12-30 21:53:06 +01:00
Vojtěch Trefný
62c872eb49
Add support for parsing BitLocker metadata
...
Currently only support for metadata version 2 is implemented.
2019-12-30 21:53:06 +01:00
Milan Broz
434fee2e13
Add empty template for BITLK device type.
...
Also add DM_ZERO type for multi-segment mapping.
2019-12-30 21:53:06 +01:00
Andrei Shevchuk
d3f829c065
Add note on integrity mode not supporting discards (TRIM)
2019-12-23 14:31:46 +00:00
Ondrej Kozina
83934bdcf3
Clarify LUKS2 error message related to reencryption.
...
Original messages could evoke reencryption is currently
in progress. That was inaccurate because code only
detected flag marking such device is in transition state
from metadata pov. We should not imply anything about
running processes. That's detected via reencryption locks.
2019-11-28 16:38:53 +01:00
Ondrej Kozina
3691add163
Minor code cleanup.
2019-11-28 16:38:53 +01:00
Ondrej Kozina
cc7a9e4607
Fix lookup function for keyslot-segment assignment.
...
In reencryption we can have more than 3 segments.
2019-11-28 16:38:53 +01:00
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