0001 # SPDX-License-Identifier: GPL-2.0-only
0002 config FS_ENCRYPTION
0003 bool "FS Encryption (Per-file encryption)"
0004 select CRYPTO
0005 select CRYPTO_HASH
0006 select CRYPTO_SKCIPHER
0007 select CRYPTO_LIB_SHA256
0008 select KEYS
0009 help
0010 Enable encryption of files and directories. This
0011 feature is similar to ecryptfs, but it is more memory
0012 efficient since it avoids caching the encrypted and
0013 decrypted pages in the page cache. Currently Ext4,
0014 F2FS and UBIFS make use of this feature.
0015
0016 # Filesystems supporting encryption must select this if FS_ENCRYPTION. This
0017 # allows the algorithms to be built as modules when all the filesystems are,
0018 # whereas selecting them from FS_ENCRYPTION would force them to be built-in.
0019 #
0020 # Note: this option only pulls in the algorithms that filesystem encryption
0021 # needs "by default". If userspace will use "non-default" encryption modes such
0022 # as Adiantum encryption, then those other modes need to be explicitly enabled
0023 # in the crypto API; see Documentation/filesystems/fscrypt.rst for details.
0024 #
0025 # Also note that this option only pulls in the generic implementations of the
0026 # algorithms, not any per-architecture optimized implementations. It is
0027 # strongly recommended to enable optimized implementations too. It is safe to
0028 # disable these generic implementations if corresponding optimized
0029 # implementations will always be available too; for this reason, these are soft
0030 # dependencies ('imply' rather than 'select'). Only disable these generic
0031 # implementations if you're sure they will never be needed, though.
0032 config FS_ENCRYPTION_ALGS
0033 tristate
0034 imply CRYPTO_AES
0035 imply CRYPTO_CBC
0036 imply CRYPTO_CTS
0037 imply CRYPTO_ECB
0038 imply CRYPTO_HMAC
0039 imply CRYPTO_SHA512
0040 imply CRYPTO_XTS
0041
0042 config FS_ENCRYPTION_INLINE_CRYPT
0043 bool "Enable fscrypt to use inline crypto"
0044 depends on FS_ENCRYPTION && BLK_INLINE_ENCRYPTION
0045 help
0046 Enable fscrypt to use inline encryption hardware if available.