Kconfig 4.85 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0-only
2 3 4 5 6 7
#
# Key management configuration
#

config KEYS
	bool "Enable access key retention support"
8
	select ASSOCIATIVE_ARRAY
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
	help
	  This option provides support for retaining authentication tokens and
	  access keys in the kernel.

	  It also includes provision of methods by which such keys might be
	  associated with a process so that network filesystems, encryption
	  support and the like can find them.

	  Furthermore, a special type of key is available that acts as keyring:
	  a searchable sequence of keys. Each process is equipped with access
	  to five standard keyrings: UID-specific, GID-specific, session,
	  process and thread.

	  If you are unsure as to whether this is required, answer N.

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
config KEYS_REQUEST_CACHE
	bool "Enable temporary caching of the last request_key() result"
	depends on KEYS
	help
	  This option causes the result of the last successful request_key()
	  call that didn't upcall to the kernel to be cached temporarily in the
	  task_struct.  The cache is cleared by exit and just prior to the
	  resumption of userspace.

	  This allows the key used for multiple step processes where each step
	  wants to request a key that is likely the same as the one requested
	  by the last step to save on the searching.

	  An example of such a process is a pathwalk through a network
	  filesystem in which each method needs to request an authentication
	  key.  Pathwalk will call multiple methods for each dentry traversed
	  (permission, d_revalidate, lookup, getxattr, getacl, ...).

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
config PERSISTENT_KEYRINGS
	bool "Enable register of persistent per-UID keyrings"
	depends on KEYS
	help
	  This option provides a register of persistent per-UID keyrings,
	  primarily aimed at Kerberos key storage.  The keyrings are persistent
	  in the sense that they stay around after all processes of that UID
	  have exited, not that they survive the machine being rebooted.

	  A particular keyring may be accessed by either the user whose keyring
	  it is or by a process with administrative privileges.  The active
	  LSMs gets to rule on which admin-level processes get to access the
	  cache.

	  Keyrings are created and added into the register upon demand and get
	  removed if they expire (a default timeout is set upon creation).

59
config BIG_KEYS
Josh Boyer's avatar
Josh Boyer committed
60
	bool "Large payload keys"
61 62
	depends on KEYS
	depends on TMPFS
63
	depends on CRYPTO_LIB_CHACHA20POLY1305 = y
64 65 66 67 68 69 70
	help
	  This option provides support for holding large keys within the kernel
	  (for example Kerberos ticket caches).  The data may be stored out to
	  swapspace by tmpfs.

	  If you are unsure as to whether this is required, answer N.

71 72 73 74 75 76
config TRUSTED_KEYS
	tristate "TRUSTED KEYS"
	depends on KEYS && TCG_TPM
	select CRYPTO
	select CRYPTO_HMAC
	select CRYPTO_SHA1
77
	select CRYPTO_HASH_INFO
78 79 80
	select ASN1_ENCODER
	select OID_REGISTRY
	select ASN1
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
	help
	  This option provides support for creating, sealing, and unsealing
	  keys in the kernel. Trusted keys are random number symmetric keys,
	  generated and RSA-sealed by the TPM. The TPM only unseals the keys,
	  if the boot PCRs and other criteria match.  Userspace will only ever
	  see encrypted blobs.

	  If you are unsure as to whether this is required, answer N.

config ENCRYPTED_KEYS
	tristate "ENCRYPTED KEYS"
	depends on KEYS
	select CRYPTO
	select CRYPTO_HMAC
	select CRYPTO_AES
	select CRYPTO_CBC
	select CRYPTO_SHA256
	select CRYPTO_RNG
	help
	  This option provides support for create/encrypting/decrypting keys
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
	  in the kernel.  Encrypted keys are instantiated using kernel
	  generated random numbers or provided decrypted data, and are
	  encrypted/decrypted with a 'master' symmetric key. The 'master'
	  key can be either a trusted-key or user-key type. Only encrypted
	  blobs are ever output to Userspace.

	  If you are unsure as to whether this is required, answer N.

config USER_DECRYPTED_DATA
	bool "Allow encrypted keys with user decrypted data"
	depends on ENCRYPTED_KEYS
	help
	  This option provides support for instantiating encrypted keys using
	  user-provided decrypted data.  The decrypted data must be hex-ascii
	  encoded.
116 117

	  If you are unsure as to whether this is required, answer N.
118 119 120 121

config KEY_DH_OPERATIONS
       bool "Diffie-Hellman operations on retained keys"
       depends on KEYS
122
       select CRYPTO
123
       select CRYPTO_KDF800108_CTR
124
       select CRYPTO_DH
125 126 127 128 129 130
       help
	 This option provides support for calculating Diffie-Hellman
	 public keys and shared secrets using values stored as keys
	 in the kernel.

	 If you are unsure as to whether this is required, answer N.
131 132 133 134 135

config KEY_NOTIFICATIONS
	bool "Provide key/keyring change notifications"
	depends on KEYS && WATCH_QUEUE
	help
136 137 138 139
	  This option provides support for getting change notifications
	  on keys and keyrings on which the caller has View permission.
	  This makes use of pipes to handle the notification buffer and
	  provides KEYCTL_WATCH_KEY to enable/disable watches.