[RFC PATCH 2/9] KEYS: keycrypt: Add the sw backend

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Nov 18 14:21:48 UTC 2026


> Systems with neither a TEE nor a crypto engine able to keep keys still
> want keys that user space cannot read and that are bound to one
> algorithm and purpose, and the same interface on every device.
> 
> Add the "sw" backend, of the kernel tier: it seals each key with
> AES-256-GCM under a key derived with HMAC-SHA256 from a "trusted" key
> named by master=, authenticating the keycrypt header with it, and runs
> the operations with the kernel's crypto library. A loaded key is in
> clear in kernel memory until revoked or destroyed, which the kernel
> log says when the backend registers and when the first key is loaded;
> the backend is chosen only by tier=kernel, by backend=sw, or when no
> backend of a higher tier is registered, and a system that must not use
> it raises the system tier above it (CONFIG_KEYCRYPT_SYSTEM_TIER_*), or
> leaves this option off.
> 
> In that derivation the trusted key's material is what the HMAC
> processes, under a label and a random salt as its key, and not the
> other way round: AF_ALG lets user space name a trusted key by its
> serial number as the key of an HMAC socket, so with the material as the
> key anyone allowed to search the master could recompute the sealing
> key of every blob.
> 
> It depends on TRUSTED_KEYS and is a module when trusted keys are one.
> 
> Signed-off-by: Rodolfo Giometti <giometti at enneenne.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118140421.584086-1-giometti@enneenne.com?part=2




More information about the Linux-security-module-archive mailing list