hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/fs/crypto/Kconfig
....@@ -1,8 +1,10 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 config FS_ENCRYPTION
23 bool "FS Encryption (Per-file encryption)"
34 select CRYPTO
45 select CRYPTO_HASH
5
- select CRYPTO_BLKCIPHER
6
+ select CRYPTO_SKCIPHER
7
+ select CRYPTO_LIB_SHA256
68 select KEYS
79 help
810 Enable encryption of files and directories. This
....@@ -12,17 +14,30 @@
1214 F2FS and UBIFS make use of this feature.
1315
1416 # Filesystems supporting encryption must select this if FS_ENCRYPTION. This
15
-# allows the algorithms to be built as modules when all the filesystems are.
17
+# allows the algorithms to be built as modules when all the filesystems are,
18
+# whereas selecting them from FS_ENCRYPTION would force them to be built-in.
19
+#
20
+# Note: this option only pulls in the algorithms that filesystem encryption
21
+# needs "by default". If userspace will use "non-default" encryption modes such
22
+# as Adiantum encryption, then those other modes need to be explicitly enabled
23
+# in the crypto API; see Documentation/filesystems/fscrypt.rst for details.
24
+#
25
+# Also note that this option only pulls in the generic implementations of the
26
+# algorithms, not any per-architecture optimized implementations. It is
27
+# strongly recommended to enable optimized implementations too. It is safe to
28
+# disable these generic implementations if corresponding optimized
29
+# implementations will always be available too; for this reason, these are soft
30
+# dependencies ('imply' rather than 'select'). Only disable these generic
31
+# implementations if you're sure they will never be needed, though.
1632 config FS_ENCRYPTION_ALGS
1733 tristate
18
- select CRYPTO_AES
19
- select CRYPTO_CBC
20
- select CRYPTO_CTS
21
- select CRYPTO_ECB
22
- select CRYPTO_HMAC
23
- select CRYPTO_SHA256
24
- select CRYPTO_SHA512
25
- select CRYPTO_XTS
34
+ imply CRYPTO_AES
35
+ imply CRYPTO_CBC
36
+ imply CRYPTO_CTS
37
+ imply CRYPTO_ECB
38
+ imply CRYPTO_HMAC
39
+ imply CRYPTO_SHA512
40
+ imply CRYPTO_XTS
2641
2742 config FS_ENCRYPTION_INLINE_CRYPT
2843 bool "Enable fscrypt to use inline crypto"