Eric Biggers
ebc4176551
blk-crypto: add basic hardware-wrapped key support
...
To prevent keys from being compromised if an attacker acquires read
access to kernel memory, some inline encryption hardware can accept keys
which are wrapped by a per-boot hardware-internal key. This avoids
needing to keep the raw keys in kernel memory, without limiting the
number of keys that can be used. Such hardware also supports deriving a
"software secret" for cryptographic tasks that can't be handled by
inline encryption; this is needed for fscrypt to work properly.
To support this hardware, allow struct blk_crypto_key to represent a
hardware-wrapped key as an alternative to a raw key, and make drivers
set flags in struct blk_crypto_profile to indicate which types of keys
they support. Also add the ->derive_sw_secret() low-level operation,
which drivers supporting wrapped keys must implement.
For more information, see the detailed documentation which this patch
adds to Documentation/block/inline-encryption.rst.
Signed-off-by: Eric Biggers <ebiggers@google.com >
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org > # sm8650
Link: https://lore.kernel.org/r/20250204060041.409950-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2025-02-10 09:54:19 -07:00
..
2025-01-30 09:13:35 -08:00
2024-10-08 14:41:53 +02:00
2024-10-08 14:41:53 +02:00
2025-01-30 09:13:35 -08:00
2024-10-28 13:16:56 +01:00
2025-02-06 22:35:11 -05:00
2024-09-18 11:44:43 +02:00
2024-08-07 11:33:21 +02:00
2025-02-05 08:13:07 -08:00
2025-01-28 13:48:37 +01:00
2025-01-31 10:30:34 -08:00
2025-01-30 09:13:35 -08:00
2024-11-14 07:45:20 +01:00
2024-07-15 11:14:59 -07:00
2025-02-10 09:54:19 -07:00
2025-01-30 08:22:31 +01:00
2025-01-28 13:48:37 +01:00
2024-12-19 13:11:24 -06:00
2025-01-27 19:25:23 -05:00
2025-01-22 13:28:17 +01:00
2024-10-15 15:58:36 +02:00
2025-02-07 10:27:25 +01:00
2025-01-30 09:13:35 -08:00
2024-11-15 11:34:57 +01:00
2024-09-16 09:14:02 +02:00
2025-01-30 09:13:35 -08:00
2025-01-27 20:58:58 -08:00
2025-01-27 19:25:24 -05:00
2024-11-06 10:42:06 +01:00
2025-01-30 09:13:35 -08:00
2025-02-07 10:27:25 +01:00
2025-01-30 09:13:35 -08:00
2024-11-18 09:35:30 -08:00
2025-01-31 09:33:54 -08:00
2024-10-08 14:41:53 +02:00
2025-01-25 20:22:30 -08:00
2025-01-26 18:36:23 -08:00
2024-12-05 13:52:37 +01:00
2025-01-22 19:55:08 -08:00
2024-12-05 12:31:40 +01:00
2025-01-27 19:25:23 -05:00
2025-02-01 15:07:56 -08:00
2025-01-28 13:48:37 +01:00
2024-08-07 11:33:36 +02:00
2025-01-20 09:29:11 -08:00
2025-01-30 09:13:35 -08:00
2025-01-21 11:34:43 -05:00
2025-01-28 14:23:46 -08:00
2025-02-01 03:53:26 -08:00
2024-10-02 17:23:23 -04:00
2025-02-07 10:27:26 +01:00
2024-12-30 11:37:40 +03:00
2025-02-01 03:53:24 -08:00
2024-08-07 11:33:21 +02:00
2024-06-20 09:46:01 +02:00
2025-01-31 09:40:31 -08:00
2025-02-01 15:07:56 -08:00
2025-01-30 09:13:35 -08:00
2025-01-20 13:37:14 -08:00
2024-12-03 10:40:36 +01:00
2025-01-28 13:48:37 +01:00
2024-08-21 22:32:58 +02:00
2025-02-06 10:01:22 -06:00
2025-01-24 22:47:22 -08:00
2025-01-09 10:43:58 +01:00
2024-08-07 11:33:36 +02:00
2024-07-22 18:25:47 -07:00
2025-01-27 19:25:23 -05:00
2025-01-18 15:31:35 +01:00
2024-11-26 22:54:24 +01:00
2024-11-12 19:02:12 -05:00
2024-12-11 14:11:23 -08:00
2025-02-07 10:27:24 +01:00
2025-01-28 13:48:37 +01:00
2025-02-03 08:51:24 -08:00
2024-10-02 12:02:15 -07:00
2025-01-28 13:48:37 +01:00
2025-01-27 19:25:45 -05:00
2024-10-10 10:20:51 +02:00
2024-12-02 11:25:09 +01:00
2024-12-11 17:45:18 +01:00
2024-12-11 17:45:18 +01:00
2025-01-10 08:49:05 -08:00
2025-01-20 13:27:58 -08:00
2024-08-07 11:26:54 -07:00
2024-11-23 09:58:07 -08:00
2024-10-22 11:16:57 +02:00
2024-10-17 18:38:49 +01:00
2025-01-28 13:48:37 +01:00
2024-10-07 13:51:47 +02:00
2025-02-07 09:22:31 -08:00
2024-08-19 13:45:02 +02:00
2024-07-24 20:59:29 +02:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2025-01-28 13:48:37 +01:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-02-07 10:27:27 +01:00
2025-01-20 09:40:49 -08:00
2024-12-22 11:29:52 +01:00
2024-12-21 01:36:17 -05:00
2024-11-13 14:08:34 +01:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-06-19 13:13:55 -07:00
2024-11-03 01:28:06 -05:00
2025-01-30 09:13:35 -08:00
2025-01-28 13:48:37 +01:00
2024-10-21 16:29:38 +02:00
2024-09-24 15:29:42 -07:00
2025-01-09 16:58:54 +01:00
2024-10-28 13:26:54 +01:00
2025-01-30 09:13:35 -08:00
2025-02-07 10:27:26 +01:00
2025-01-09 16:58:52 +01:00
2025-02-07 10:27:26 +01:00
2025-02-07 10:27:28 +01:00
2025-02-07 10:27:26 +01:00
2024-12-22 11:29:52 +01:00
2024-10-22 11:16:59 +02:00
2024-06-28 14:36:43 +02:00
2024-11-18 12:24:06 -08:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:07 -05:00
2025-01-13 16:24:16 +01:00
2024-10-22 11:16:57 +02:00
2024-11-03 01:28:06 -05:00
2025-01-25 20:22:31 -08:00
2025-02-07 10:27:24 +01:00
2024-11-03 01:28:06 -05:00
2025-01-25 20:22:23 -08:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-19 16:35:06 -08:00
2025-01-28 13:48:37 +01:00
2024-11-03 01:28:06 -05:00
2024-11-06 13:00:01 -05:00