0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Key management configuration
0004 #
0005
0006 config KEYS
0007 bool "Enable access key retention support"
0008 select ASSOCIATIVE_ARRAY
0009 help
0010 This option provides support for retaining authentication tokens and
0011 access keys in the kernel.
0012
0013 It also includes provision of methods by which such keys might be
0014 associated with a process so that network filesystems, encryption
0015 support and the like can find them.
0016
0017 Furthermore, a special type of key is available that acts as keyring:
0018 a searchable sequence of keys. Each process is equipped with access
0019 to five standard keyrings: UID-specific, GID-specific, session,
0020 process and thread.
0021
0022 If you are unsure as to whether this is required, answer N.
0023
0024 config KEYS_REQUEST_CACHE
0025 bool "Enable temporary caching of the last request_key() result"
0026 depends on KEYS
0027 help
0028 This option causes the result of the last successful request_key()
0029 call that didn't upcall to the kernel to be cached temporarily in the
0030 task_struct. The cache is cleared by exit and just prior to the
0031 resumption of userspace.
0032
0033 This allows the key used for multiple step processes where each step
0034 wants to request a key that is likely the same as the one requested
0035 by the last step to save on the searching.
0036
0037 An example of such a process is a pathwalk through a network
0038 filesystem in which each method needs to request an authentication
0039 key. Pathwalk will call multiple methods for each dentry traversed
0040 (permission, d_revalidate, lookup, getxattr, getacl, ...).
0041
0042 config PERSISTENT_KEYRINGS
0043 bool "Enable register of persistent per-UID keyrings"
0044 depends on KEYS
0045 help
0046 This option provides a register of persistent per-UID keyrings,
0047 primarily aimed at Kerberos key storage. The keyrings are persistent
0048 in the sense that they stay around after all processes of that UID
0049 have exited, not that they survive the machine being rebooted.
0050
0051 A particular keyring may be accessed by either the user whose keyring
0052 it is or by a process with administrative privileges. The active
0053 LSMs gets to rule on which admin-level processes get to access the
0054 cache.
0055
0056 Keyrings are created and added into the register upon demand and get
0057 removed if they expire (a default timeout is set upon creation).
0058
0059 config BIG_KEYS
0060 bool "Large payload keys"
0061 depends on KEYS
0062 depends on TMPFS
0063 depends on CRYPTO_LIB_CHACHA20POLY1305 = y
0064 help
0065 This option provides support for holding large keys within the kernel
0066 (for example Kerberos ticket caches). The data may be stored out to
0067 swapspace by tmpfs.
0068
0069 If you are unsure as to whether this is required, answer N.
0070
0071 config TRUSTED_KEYS
0072 tristate "TRUSTED KEYS"
0073 depends on KEYS
0074 help
0075 This option provides support for creating, sealing, and unsealing
0076 keys in the kernel. Trusted keys are random number symmetric keys,
0077 generated and sealed by a trust source selected at kernel boot-time.
0078 Userspace will only ever see encrypted blobs.
0079
0080 If you are unsure as to whether this is required, answer N.
0081
0082 if TRUSTED_KEYS
0083 source "security/keys/trusted-keys/Kconfig"
0084 endif
0085
0086 config ENCRYPTED_KEYS
0087 tristate "ENCRYPTED KEYS"
0088 depends on KEYS
0089 select CRYPTO
0090 select CRYPTO_HMAC
0091 select CRYPTO_AES
0092 select CRYPTO_CBC
0093 select CRYPTO_SHA256
0094 select CRYPTO_RNG
0095 help
0096 This option provides support for create/encrypting/decrypting keys
0097 in the kernel. Encrypted keys are instantiated using kernel
0098 generated random numbers or provided decrypted data, and are
0099 encrypted/decrypted with a 'master' symmetric key. The 'master'
0100 key can be either a trusted-key or user-key type. Only encrypted
0101 blobs are ever output to Userspace.
0102
0103 If you are unsure as to whether this is required, answer N.
0104
0105 config USER_DECRYPTED_DATA
0106 bool "Allow encrypted keys with user decrypted data"
0107 depends on ENCRYPTED_KEYS
0108 help
0109 This option provides support for instantiating encrypted keys using
0110 user-provided decrypted data. The decrypted data must be hex-ascii
0111 encoded.
0112
0113 If you are unsure as to whether this is required, answer N.
0114
0115 config KEY_DH_OPERATIONS
0116 bool "Diffie-Hellman operations on retained keys"
0117 depends on KEYS
0118 select CRYPTO
0119 select CRYPTO_KDF800108_CTR
0120 select CRYPTO_DH
0121 help
0122 This option provides support for calculating Diffie-Hellman
0123 public keys and shared secrets using values stored as keys
0124 in the kernel.
0125
0126 If you are unsure as to whether this is required, answer N.
0127
0128 config KEY_NOTIFICATIONS
0129 bool "Provide key/keyring change notifications"
0130 depends on KEYS && WATCH_QUEUE
0131 help
0132 This option provides support for getting change notifications
0133 on keys and keyrings on which the caller has View permission.
0134 This makes use of pipes to handle the notification buffer and
0135 provides KEYCTL_WATCH_KEY to enable/disable watches.