blob: 2d0c8922f63506ce99f4813cc1c0bd314adeba0f [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Jaegeuk Kim0b81d072015-05-15 16:26:10 -07002config FS_ENCRYPTION
Chandan Rajendra643fa962018-12-12 15:20:12 +05303 bool "FS Encryption (Per-file encryption)"
Jaegeuk Kim0b81d072015-05-15 16:26:10 -07004 select CRYPTO
Herbert Xuede7a092019-12-27 10:47:00 +08005 select CRYPTO_HASH
6 select CRYPTO_SKCIPHER
Eric Biggersbd0d97b2020-07-21 15:59:16 -07007 select CRYPTO_LIB_SHA256
Jaegeuk Kim0b81d072015-05-15 16:26:10 -07008 select KEYS
Jaegeuk Kim0b81d072015-05-15 16:26:10 -07009 help
10 Enable encryption of files and directories. This
11 feature is similar to ecryptfs, but it is more memory
12 efficient since it avoids caching the encrypted and
Chandan Rajendra643fa962018-12-12 15:20:12 +053013 decrypted pages in the page cache. Currently Ext4,
14 F2FS and UBIFS make use of this feature.
Herbert Xuede7a092019-12-27 10:47:00 +080015
16# Filesystems supporting encryption must select this if FS_ENCRYPTION. This
Ard Biesheuvela0fc2032021-04-21 09:55:10 +020017# 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.
Herbert Xuede7a092019-12-27 10:47:00 +080032config FS_ENCRYPTION_ALGS
33 tristate
Ard Biesheuvela0fc2032021-04-21 09:55:10 +020034 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
Satya Tangirala5fee3602020-07-02 01:56:05 +000041
42config FS_ENCRYPTION_INLINE_CRYPT
43 bool "Enable fscrypt to use inline crypto"
44 depends on FS_ENCRYPTION && BLK_INLINE_ENCRYPTION
45 help
46 Enable fscrypt to use inline encryption hardware if available.