162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci# 362306a36Sopenharmony_ci# Key management configuration 462306a36Sopenharmony_ci# 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciconfig KEYS 762306a36Sopenharmony_ci bool "Enable access key retention support" 862306a36Sopenharmony_ci select ASSOCIATIVE_ARRAY 962306a36Sopenharmony_ci help 1062306a36Sopenharmony_ci This option provides support for retaining authentication tokens and 1162306a36Sopenharmony_ci access keys in the kernel. 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci It also includes provision of methods by which such keys might be 1462306a36Sopenharmony_ci associated with a process so that network filesystems, encryption 1562306a36Sopenharmony_ci support and the like can find them. 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci Furthermore, a special type of key is available that acts as keyring: 1862306a36Sopenharmony_ci a searchable sequence of keys. Each process is equipped with access 1962306a36Sopenharmony_ci to five standard keyrings: UID-specific, GID-specific, session, 2062306a36Sopenharmony_ci process and thread. 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciconfig KEYS_REQUEST_CACHE 2562306a36Sopenharmony_ci bool "Enable temporary caching of the last request_key() result" 2662306a36Sopenharmony_ci depends on KEYS 2762306a36Sopenharmony_ci help 2862306a36Sopenharmony_ci This option causes the result of the last successful request_key() 2962306a36Sopenharmony_ci call that didn't upcall to the kernel to be cached temporarily in the 3062306a36Sopenharmony_ci task_struct. The cache is cleared by exit and just prior to the 3162306a36Sopenharmony_ci resumption of userspace. 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci This allows the key used for multiple step processes where each step 3462306a36Sopenharmony_ci wants to request a key that is likely the same as the one requested 3562306a36Sopenharmony_ci by the last step to save on the searching. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci An example of such a process is a pathwalk through a network 3862306a36Sopenharmony_ci filesystem in which each method needs to request an authentication 3962306a36Sopenharmony_ci key. Pathwalk will call multiple methods for each dentry traversed 4062306a36Sopenharmony_ci (permission, d_revalidate, lookup, getxattr, getacl, ...). 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciconfig PERSISTENT_KEYRINGS 4362306a36Sopenharmony_ci bool "Enable register of persistent per-UID keyrings" 4462306a36Sopenharmony_ci depends on KEYS 4562306a36Sopenharmony_ci help 4662306a36Sopenharmony_ci This option provides a register of persistent per-UID keyrings, 4762306a36Sopenharmony_ci primarily aimed at Kerberos key storage. The keyrings are persistent 4862306a36Sopenharmony_ci in the sense that they stay around after all processes of that UID 4962306a36Sopenharmony_ci have exited, not that they survive the machine being rebooted. 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci A particular keyring may be accessed by either the user whose keyring 5262306a36Sopenharmony_ci it is or by a process with administrative privileges. The active 5362306a36Sopenharmony_ci LSMs gets to rule on which admin-level processes get to access the 5462306a36Sopenharmony_ci cache. 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci Keyrings are created and added into the register upon demand and get 5762306a36Sopenharmony_ci removed if they expire (a default timeout is set upon creation). 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ciconfig BIG_KEYS 6062306a36Sopenharmony_ci bool "Large payload keys" 6162306a36Sopenharmony_ci depends on KEYS 6262306a36Sopenharmony_ci depends on TMPFS 6362306a36Sopenharmony_ci depends on CRYPTO_LIB_CHACHA20POLY1305 = y 6462306a36Sopenharmony_ci help 6562306a36Sopenharmony_ci This option provides support for holding large keys within the kernel 6662306a36Sopenharmony_ci (for example Kerberos ticket caches). The data may be stored out to 6762306a36Sopenharmony_ci swapspace by tmpfs. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ciconfig TRUSTED_KEYS 7262306a36Sopenharmony_ci tristate "TRUSTED KEYS" 7362306a36Sopenharmony_ci depends on KEYS 7462306a36Sopenharmony_ci help 7562306a36Sopenharmony_ci This option provides support for creating, sealing, and unsealing 7662306a36Sopenharmony_ci keys in the kernel. Trusted keys are random number symmetric keys, 7762306a36Sopenharmony_ci generated and sealed by a trust source selected at kernel boot-time. 7862306a36Sopenharmony_ci Userspace will only ever see encrypted blobs. 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ciif TRUSTED_KEYS 8362306a36Sopenharmony_cisource "security/keys/trusted-keys/Kconfig" 8462306a36Sopenharmony_ciendif 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ciconfig ENCRYPTED_KEYS 8762306a36Sopenharmony_ci tristate "ENCRYPTED KEYS" 8862306a36Sopenharmony_ci depends on KEYS 8962306a36Sopenharmony_ci select CRYPTO 9062306a36Sopenharmony_ci select CRYPTO_HMAC 9162306a36Sopenharmony_ci select CRYPTO_AES 9262306a36Sopenharmony_ci select CRYPTO_CBC 9362306a36Sopenharmony_ci select CRYPTO_SHA256 9462306a36Sopenharmony_ci select CRYPTO_RNG 9562306a36Sopenharmony_ci help 9662306a36Sopenharmony_ci This option provides support for create/encrypting/decrypting keys 9762306a36Sopenharmony_ci in the kernel. Encrypted keys are instantiated using kernel 9862306a36Sopenharmony_ci generated random numbers or provided decrypted data, and are 9962306a36Sopenharmony_ci encrypted/decrypted with a 'master' symmetric key. The 'master' 10062306a36Sopenharmony_ci key can be either a trusted-key or user-key type. Only encrypted 10162306a36Sopenharmony_ci blobs are ever output to Userspace. 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ciconfig USER_DECRYPTED_DATA 10662306a36Sopenharmony_ci bool "Allow encrypted keys with user decrypted data" 10762306a36Sopenharmony_ci depends on ENCRYPTED_KEYS 10862306a36Sopenharmony_ci help 10962306a36Sopenharmony_ci This option provides support for instantiating encrypted keys using 11062306a36Sopenharmony_ci user-provided decrypted data. The decrypted data must be hex-ascii 11162306a36Sopenharmony_ci encoded. 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ciconfig KEY_DH_OPERATIONS 11662306a36Sopenharmony_ci bool "Diffie-Hellman operations on retained keys" 11762306a36Sopenharmony_ci depends on KEYS 11862306a36Sopenharmony_ci select CRYPTO 11962306a36Sopenharmony_ci select CRYPTO_KDF800108_CTR 12062306a36Sopenharmony_ci select CRYPTO_DH 12162306a36Sopenharmony_ci help 12262306a36Sopenharmony_ci This option provides support for calculating Diffie-Hellman 12362306a36Sopenharmony_ci public keys and shared secrets using values stored as keys 12462306a36Sopenharmony_ci in the kernel. 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci If you are unsure as to whether this is required, answer N. 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ciconfig KEY_NOTIFICATIONS 12962306a36Sopenharmony_ci bool "Provide key/keyring change notifications" 13062306a36Sopenharmony_ci depends on KEYS && WATCH_QUEUE 13162306a36Sopenharmony_ci help 13262306a36Sopenharmony_ci This option provides support for getting change notifications 13362306a36Sopenharmony_ci on keys and keyrings on which the caller has View permission. 13462306a36Sopenharmony_ci This makes use of pipes to handle the notification buffer and 13562306a36Sopenharmony_ci provides KEYCTL_WATCH_KEY to enable/disable watches. 136