Kconfig 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Key management configuration
  4. #
  5. config KEYS
  6. bool "Enable access key retention support"
  7. select ASSOCIATIVE_ARRAY
  8. help
  9. This option provides support for retaining authentication tokens and
  10. access keys in the kernel.
  11. It also includes provision of methods by which such keys might be
  12. associated with a process so that network filesystems, encryption
  13. support and the like can find them.
  14. Furthermore, a special type of key is available that acts as keyring:
  15. a searchable sequence of keys. Each process is equipped with access
  16. to five standard keyrings: UID-specific, GID-specific, session,
  17. process and thread.
  18. If you are unsure as to whether this is required, answer N.
  19. config KEYS_REQUEST_CACHE
  20. bool "Enable temporary caching of the last request_key() result"
  21. depends on KEYS
  22. help
  23. This option causes the result of the last successful request_key()
  24. call that didn't upcall to the kernel to be cached temporarily in the
  25. task_struct. The cache is cleared by exit and just prior to the
  26. resumption of userspace.
  27. This allows the key used for multiple step processes where each step
  28. wants to request a key that is likely the same as the one requested
  29. by the last step to save on the searching.
  30. An example of such a process is a pathwalk through a network
  31. filesystem in which each method needs to request an authentication
  32. key. Pathwalk will call multiple methods for each dentry traversed
  33. (permission, d_revalidate, lookup, getxattr, getacl, ...).
  34. config PERSISTENT_KEYRINGS
  35. bool "Enable register of persistent per-UID keyrings"
  36. depends on KEYS
  37. help
  38. This option provides a register of persistent per-UID keyrings,
  39. primarily aimed at Kerberos key storage. The keyrings are persistent
  40. in the sense that they stay around after all processes of that UID
  41. have exited, not that they survive the machine being rebooted.
  42. A particular keyring may be accessed by either the user whose keyring
  43. it is or by a process with administrative privileges. The active
  44. LSMs gets to rule on which admin-level processes get to access the
  45. cache.
  46. Keyrings are created and added into the register upon demand and get
  47. removed if they expire (a default timeout is set upon creation).
  48. config BIG_KEYS
  49. bool "Large payload keys"
  50. depends on KEYS
  51. depends on TMPFS
  52. depends on CRYPTO_LIB_CHACHA20POLY1305 = y
  53. help
  54. This option provides support for holding large keys within the kernel
  55. (for example Kerberos ticket caches). The data may be stored out to
  56. swapspace by tmpfs.
  57. If you are unsure as to whether this is required, answer N.
  58. config TRUSTED_KEYS
  59. tristate "TRUSTED KEYS"
  60. depends on KEYS
  61. help
  62. This option provides support for creating, sealing, and unsealing
  63. keys in the kernel. Trusted keys are random number symmetric keys,
  64. generated and sealed by a trust source selected at kernel boot-time.
  65. Userspace will only ever see encrypted blobs.
  66. If you are unsure as to whether this is required, answer N.
  67. if TRUSTED_KEYS
  68. source "security/keys/trusted-keys/Kconfig"
  69. endif
  70. config ENCRYPTED_KEYS
  71. tristate "ENCRYPTED KEYS"
  72. depends on KEYS
  73. select CRYPTO
  74. select CRYPTO_HMAC
  75. select CRYPTO_AES
  76. select CRYPTO_CBC
  77. select CRYPTO_SHA256
  78. select CRYPTO_RNG
  79. help
  80. This option provides support for create/encrypting/decrypting keys
  81. in the kernel. Encrypted keys are instantiated using kernel
  82. generated random numbers or provided decrypted data, and are
  83. encrypted/decrypted with a 'master' symmetric key. The 'master'
  84. key can be either a trusted-key or user-key type. Only encrypted
  85. blobs are ever output to Userspace.
  86. If you are unsure as to whether this is required, answer N.
  87. config USER_DECRYPTED_DATA
  88. bool "Allow encrypted keys with user decrypted data"
  89. depends on ENCRYPTED_KEYS
  90. help
  91. This option provides support for instantiating encrypted keys using
  92. user-provided decrypted data. The decrypted data must be hex-ascii
  93. encoded.
  94. If you are unsure as to whether this is required, answer N.
  95. config KEY_DH_OPERATIONS
  96. bool "Diffie-Hellman operations on retained keys"
  97. depends on KEYS
  98. select CRYPTO
  99. select CRYPTO_KDF800108_CTR
  100. select CRYPTO_DH
  101. help
  102. This option provides support for calculating Diffie-Hellman
  103. public keys and shared secrets using values stored as keys
  104. in the kernel.
  105. If you are unsure as to whether this is required, answer N.
  106. config KEY_NOTIFICATIONS
  107. bool "Provide key/keyring change notifications"
  108. depends on KEYS && WATCH_QUEUE
  109. help
  110. This option provides support for getting change notifications
  111. on keys and keyrings on which the caller has View permission.
  112. This makes use of pipes to handle the notification buffer and
  113. provides KEYCTL_WATCH_KEY to enable/disable watches.