Page MenuHomeSolus

Cryptsetup missing key algorithms and ciphers
Closed, ResolvedPublic

Description

When running cryptsetup benchmark on solus with kernel linux 4.8.6 I get the output below. Niether dm_crypt module nor algif_skcipher are loaded. From the best I can tell these important kernel modules for encryption were not compiled into the solus kernel. One I need the use of the crypto services of the kernel. Second I installed solus with the LVM luks encrypt option, but if cryptsetup is missing all the crypt services how did it decrypt my drive?

I ran into this issue on my gentoo box and it is a matter of tracking down the right crypto options in the kernel to get this functionality. Thanks for your time and effort gents.

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       478364 iterations per second for 256-bit key
PBKDF2-sha256     631672 iterations per second for 256-bit key
PBKDF2-sha512     516031 iterations per second for 256-bit key
PBKDF2-ripemd160  284629 iterations per second for 256-bit key
PBKDF2-whirlpool  194757 iterations per second for 256-bit key
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b           N/A           N/A
 serpent-cbc   128b           N/A           N/A
 twofish-cbc   128b           N/A           N/A
     aes-cbc   256b           N/A           N/A
 serpent-cbc   256b           N/A           N/A
 twofish-cbc   256b           N/A           N/A
     aes-xts   256b           N/A           N/A
 serpent-xts   256b           N/A           N/A
 twofish-xts   256b           N/A           N/A
     aes-xts   512b           N/A           N/A
 serpent-xts   512b           N/A           N/A
 twofish-xts   512b           N/A           N/A
Required kernel crypto interface not available.
Ensure you have algif_skcipher kernel module loaded.

Event Timeline

tedward renamed this task from Cryptsetup missing key algrithms and ciphers to Cryptsetup missing key algorithms and ciphers.Nov 13 2016, 1:48 PM
tedward created this task.
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set

Proposed diff:

diff --git a/files/configs/kernel-x86_64-config b/files/configs/kernel-x86_64-config
index 719c45e..98da590 100644
--- a/files/configs/kernel-x86_64-config
+++ b/files/configs/kernel-x86_64-config
@@ -6524,7 +6524,7 @@ CONFIG_CRYPTO_DH=y
 CONFIG_CRYPTO_ECDH=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
-# CONFIG_CRYPTO_USER is not set
+CONFIG_CRYPTO_USER=y
 CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 CONFIG_CRYPTO_GF128MUL=y
 CONFIG_CRYPTO_NULL=y
@@ -6608,9 +6608,9 @@ CONFIG_CRYPTO_AES_X86_64=y
 CONFIG_CRYPTO_AES_NI_INTEL=y
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_BLOWFISH_COMMON=m
-# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_BLOWFISH_COMMON=y
+CONFIG_CRYPTO_BLOWFISH_X86_64=y
 CONFIG_CRYPTO_CAMELLIA=m
 # CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
 # CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set
@@ -6629,16 +6629,16 @@ CONFIG_CRYPTO_SALSA20=m
 CONFIG_CRYPTO_CHACHA20=m
 CONFIG_CRYPTO_CHACHA20_X86_64=m
 CONFIG_CRYPTO_SEED=m
-CONFIG_CRYPTO_SERPENT=m
-# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
-# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
-# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y
+CONFIG_CRYPTO_SERPENT_AVX_X86_64=y
+CONFIG_CRYPTO_SERPENT_AVX2_X86_64=y
 CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
-# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
-# CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_CRYPTO_TWOFISH_X86_64=y
+CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y
+CONFIG_CRYPTO_TWOFISH_AVX_X86_64=y
 
 #
 # Compression
@@ -6661,9 +6661,9 @@ CONFIG_CRYPTO_DRBG=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_USER_API=y
 CONFIG_CRYPTO_USER_API_HASH=y
-# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
+CONFIG_CRYPTO_USER_API_SKCIPHER=y
 CONFIG_CRYPTO_USER_API_RNG=y
-CONFIG_CRYPTO_USER_API_AEAD=m
+CONFIG_CRYPTO_USER_API_AEAD=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_DEV_PADLOCK=m
 CONFIG_CRYPTO_DEV_PADLOCK_AES=m

@tedward please let me know if this will be what you're looking for

ikey, my apologies for taking awhile to respond, I was on travel today. That does look like it would capture what I need. Thank you for your quick response.

JoshStrobl triaged this task as High priority.Nov 14 2016, 8:18 PM
JoshStrobl edited projects, added Software; removed Restricted Project.
DataDrake closed this task as Resolved.Dec 29 2016, 2:58 AM
DataDrake added a subscriber: DataDrake.

@tedward feel free to reopen this if you still don't have all the ciphers you need. As of this moment, the current kernel build has all of the proposed changes enabled.