xref: /openbmc/linux/security/keys/Kconfig (revision 7743c48e)
1f0894940SDavid Howells#
2f0894940SDavid Howells# Key management configuration
3f0894940SDavid Howells#
4f0894940SDavid Howells
5f0894940SDavid Howellsconfig KEYS
6f0894940SDavid Howells	bool "Enable access key retention support"
7b2a4df20SDavid Howells	select ASSOCIATIVE_ARRAY
8f0894940SDavid Howells	help
9f0894940SDavid Howells	  This option provides support for retaining authentication tokens and
10f0894940SDavid Howells	  access keys in the kernel.
11f0894940SDavid Howells
12f0894940SDavid Howells	  It also includes provision of methods by which such keys might be
13f0894940SDavid Howells	  associated with a process so that network filesystems, encryption
14f0894940SDavid Howells	  support and the like can find them.
15f0894940SDavid Howells
16f0894940SDavid Howells	  Furthermore, a special type of key is available that acts as keyring:
17f0894940SDavid Howells	  a searchable sequence of keys. Each process is equipped with access
18f0894940SDavid Howells	  to five standard keyrings: UID-specific, GID-specific, session,
19f0894940SDavid Howells	  process and thread.
20f0894940SDavid Howells
21f0894940SDavid Howells	  If you are unsure as to whether this is required, answer N.
22f0894940SDavid Howells
2347b2c3ffSBilal Amarniconfig KEYS_COMPAT
2447b2c3ffSBilal Amarni	def_bool y
2547b2c3ffSBilal Amarni	depends on COMPAT && KEYS
2647b2c3ffSBilal Amarni
277743c48eSDavid Howellsconfig KEYS_REQUEST_CACHE
287743c48eSDavid Howells	bool "Enable temporary caching of the last request_key() result"
297743c48eSDavid Howells	depends on KEYS
307743c48eSDavid Howells	help
317743c48eSDavid Howells	  This option causes the result of the last successful request_key()
327743c48eSDavid Howells	  call that didn't upcall to the kernel to be cached temporarily in the
337743c48eSDavid Howells	  task_struct.  The cache is cleared by exit and just prior to the
347743c48eSDavid Howells	  resumption of userspace.
357743c48eSDavid Howells
367743c48eSDavid Howells	  This allows the key used for multiple step processes where each step
377743c48eSDavid Howells	  wants to request a key that is likely the same as the one requested
387743c48eSDavid Howells	  by the last step to save on the searching.
397743c48eSDavid Howells
407743c48eSDavid Howells	  An example of such a process is a pathwalk through a network
417743c48eSDavid Howells	  filesystem in which each method needs to request an authentication
427743c48eSDavid Howells	  key.  Pathwalk will call multiple methods for each dentry traversed
437743c48eSDavid Howells	  (permission, d_revalidate, lookup, getxattr, getacl, ...).
447743c48eSDavid Howells
45f36f8c75SDavid Howellsconfig PERSISTENT_KEYRINGS
46f36f8c75SDavid Howells	bool "Enable register of persistent per-UID keyrings"
47f36f8c75SDavid Howells	depends on KEYS
48f36f8c75SDavid Howells	help
49f36f8c75SDavid Howells	  This option provides a register of persistent per-UID keyrings,
50f36f8c75SDavid Howells	  primarily aimed at Kerberos key storage.  The keyrings are persistent
51f36f8c75SDavid Howells	  in the sense that they stay around after all processes of that UID
52f36f8c75SDavid Howells	  have exited, not that they survive the machine being rebooted.
53f36f8c75SDavid Howells
54f36f8c75SDavid Howells	  A particular keyring may be accessed by either the user whose keyring
55f36f8c75SDavid Howells	  it is or by a process with administrative privileges.  The active
56f36f8c75SDavid Howells	  LSMs gets to rule on which admin-level processes get to access the
57f36f8c75SDavid Howells	  cache.
58f36f8c75SDavid Howells
59f36f8c75SDavid Howells	  Keyrings are created and added into the register upon demand and get
60f36f8c75SDavid Howells	  removed if they expire (a default timeout is set upon creation).
61f36f8c75SDavid Howells
62ab3c3587SDavid Howellsconfig BIG_KEYS
632eaf6b5dSJosh Boyer	bool "Large payload keys"
64ab3c3587SDavid Howells	depends on KEYS
65ab3c3587SDavid Howells	depends on TMPFS
663cd18d19SArnd Bergmann	select CRYPTO
6713100a72SKirill Marinushkin	select CRYPTO_AES
68428490e3SJason A. Donenfeld	select CRYPTO_GCM
69ab3c3587SDavid Howells	help
70ab3c3587SDavid Howells	  This option provides support for holding large keys within the kernel
71ab3c3587SDavid Howells	  (for example Kerberos ticket caches).  The data may be stored out to
72ab3c3587SDavid Howells	  swapspace by tmpfs.
73ab3c3587SDavid Howells
74ab3c3587SDavid Howells	  If you are unsure as to whether this is required, answer N.
75ab3c3587SDavid Howells
76f0894940SDavid Howellsconfig TRUSTED_KEYS
77f0894940SDavid Howells	tristate "TRUSTED KEYS"
78f0894940SDavid Howells	depends on KEYS && TCG_TPM
79f0894940SDavid Howells	select CRYPTO
80f0894940SDavid Howells	select CRYPTO_HMAC
81f0894940SDavid Howells	select CRYPTO_SHA1
825ca4c20cSJarkko Sakkinen	select CRYPTO_HASH_INFO
83f0894940SDavid Howells	help
84f0894940SDavid Howells	  This option provides support for creating, sealing, and unsealing
85f0894940SDavid Howells	  keys in the kernel. Trusted keys are random number symmetric keys,
86f0894940SDavid Howells	  generated and RSA-sealed by the TPM. The TPM only unseals the keys,
87f0894940SDavid Howells	  if the boot PCRs and other criteria match.  Userspace will only ever
88f0894940SDavid Howells	  see encrypted blobs.
89f0894940SDavid Howells
90f0894940SDavid Howells	  If you are unsure as to whether this is required, answer N.
91f0894940SDavid Howells
92f0894940SDavid Howellsconfig ENCRYPTED_KEYS
93f0894940SDavid Howells	tristate "ENCRYPTED KEYS"
94f0894940SDavid Howells	depends on KEYS
95f0894940SDavid Howells	select CRYPTO
96f0894940SDavid Howells	select CRYPTO_HMAC
97f0894940SDavid Howells	select CRYPTO_AES
98f0894940SDavid Howells	select CRYPTO_CBC
99f0894940SDavid Howells	select CRYPTO_SHA256
100f0894940SDavid Howells	select CRYPTO_RNG
101f0894940SDavid Howells	help
102f0894940SDavid Howells	  This option provides support for create/encrypting/decrypting keys
103f0894940SDavid Howells	  in the kernel.  Encrypted keys are kernel generated random numbers,
104f0894940SDavid Howells	  which are encrypted/decrypted with a 'master' symmetric key. The
105f0894940SDavid Howells	  'master' key can be either a trusted-key or user-key type.
106f0894940SDavid Howells	  Userspace only ever sees/stores encrypted blobs.
107f0894940SDavid Howells
108f0894940SDavid Howells	  If you are unsure as to whether this is required, answer N.
109ddbb4114SMat Martineau
110ddbb4114SMat Martineauconfig KEY_DH_OPERATIONS
111ddbb4114SMat Martineau       bool "Diffie-Hellman operations on retained keys"
112ddbb4114SMat Martineau       depends on KEYS
1134cd4ca7cSStephan Müller       select CRYPTO
114f1c316a3SStephan Mueller       select CRYPTO_HASH
1157cbe0932SMat Martineau       select CRYPTO_DH
116ddbb4114SMat Martineau       help
117ddbb4114SMat Martineau	 This option provides support for calculating Diffie-Hellman
118ddbb4114SMat Martineau	 public keys and shared secrets using values stored as keys
119ddbb4114SMat Martineau	 in the kernel.
120ddbb4114SMat Martineau
121ddbb4114SMat Martineau	 If you are unsure as to whether this is required, answer N.
122