diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-07-11 15:26:50 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-11 14:01:28 -0700 |
commit | 11ff107a853f9ef6ad31ac6e3ed0f15fb8ada27f (patch) | |
tree | ac401bcb900731f0448ffdc489252e2ba8c5eb14 /meta-oe/recipes-crypto | |
parent | 41f6815e0865b6d1c187a07806dc1f02e40ef45c (diff) | |
download | meta-openembedded-11ff107a853f9ef6ad31ac6e3ed0f15fb8ada27f.tar.gz |
cryptsetup: set the default luks format to LUKS1
The cryptsetup 2.1 uses LUKS2 format as the default LUKS format. This
change introduced the following issues:
* LUKS2 requires kernel userspace crypto API to be available
(CONFIG_CRYPTO_USER_API and CONFIG_CRYPTO_USER_API_SKCIPHER). But
linux-yocto doesn't enable these options by default. If missing these
kernel modules, the cryptsetup will fall back to using dmcrypt-device
for keyslot processing.
$ cryptsetup --debug --type luks luksFormat /dev/sda3
[snip]
Checking if cipher aes-xts-plain64 is usable.
Userspace crypto wrapper cannot use aes-xts-plain64 (-95).
Using dmcrypt to access keyslot area.
[snip]
* The grub can not decrypt a LUKS2 encrypted boot partition because it
doesn't support LUKS2 now.
See grub bug: https://savannah.gnu.org/bugs/?55093
Add a PACKAGCONFIG for luks format and set the default LUKS format to
LUKS1. The users can specify '--type luks2' in cryptsetup command line
if they want to use LUKS2.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-crypto')
-rw-r--r-- | meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.1.0.bb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.1.0.bb b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.1.0.bb index a500b1898..deaede857 100644 --- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.1.0.bb +++ b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.1.0.bb | |||
@@ -65,6 +65,7 @@ PACKAGECONFIG[gcrypt] = "--with-crypto_backend=gcrypt,,libgcrypt" | |||
65 | PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" | 65 | PACKAGECONFIG[nss] = "--with-crypto_backend=nss,,nss" |
66 | PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" | 66 | PACKAGECONFIG[kernel] = "--with-crypto_backend=kernel" |
67 | PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" | 67 | PACKAGECONFIG[nettle] = "--with-crypto_backend=nettle,,nettle" |
68 | PACKAGECONFIG[luks2] = "--with-default-luks-format=LUKS2,--with-default-luks-format=LUKS1" | ||
68 | 69 | ||
69 | RRECOMMENDS_${PN} = "kernel-module-aes-generic \ | 70 | RRECOMMENDS_${PN} = "kernel-module-aes-generic \ |
70 | kernel-module-dm-crypt \ | 71 | kernel-module-dm-crypt \ |