linux/Documentation/crypto
Frederick Lawler 7984ceb134 crypto: af_alg - Support symmetric encryption via keyring keys
We want to leverage keyring to store sensitive keys, and then use those
keys for symmetric encryption via the crypto API. Among the key types we
wish to support are: user, logon, encrypted, and trusted.

User key types are already able to have their data copied to user space,
but logon does not support this. Further, trusted and encrypted keys will
return their encrypted data back to user space on read, which does not
make them ideal for symmetric encryption.

To support symmetric encryption for these key types, add a new
ALG_SET_KEY_BY_KEY_SERIAL setsockopt() option to the crypto API. This
allows users to pass a key_serial_t to the crypto API to perform
symmetric encryption. The behavior is the same as ALG_SET_KEY, but
the crypto key data is copied in kernel space from a keyring key,
which allows for the support of logon, encrypted, and trusted key types.

Keyring keys must have the KEY_(POS|USR|GRP|OTH)_SEARCH permission set
to leverage this feature. This follows the asymmetric_key type where key
lookup calls eventually lead to keyring_search_rcu() without the
KEYRING_SEARCH_NO_CHECK_PERM flag set.

Signed-off-by: Frederick Lawler <fred@cloudflare.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-10-28 12:36:34 +08:00
..
api-aead.rst crypto: doc - optimize compilation 2016-12-13 16:38:07 -07:00
api-akcipher.rst crypto: doc - optimize compilation 2016-12-13 16:38:07 -07:00
api-digest.rst crypto: doc - Fix hash export state information 2017-02-03 18:16:11 +08:00
api-intro.rst It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
api-kpp.rst crypto: doc - optimize compilation 2016-12-13 16:38:07 -07:00
api-rng.rst crypto: doc - optimize compilation 2016-12-13 16:38:07 -07:00
api-samples.rst crypto: doc - improve the skcipher API example code 2019-06-13 14:31:40 +08:00
api-skcipher.rst crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
api.rst crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
architecture.rst crypto: ablkcipher - remove deprecated and unused ablkcipher support 2019-11-17 09:02:49 +08:00
asymmetric-keys.rst docs: crypto: convert asymmetric-keys.txt to ReST 2020-06-19 14:03:46 -06:00
async-tx-api.rst docs: crypto: convert async-tx-api.txt to ReST format 2020-06-19 14:05:15 -06:00
crypto_engine.rst crypto: engine - Add KPP Support to Crypto Engine 2021-10-29 21:04:03 +08:00
descore-readme.rst docs: crypto: descore-readme.txt: convert to ReST format 2020-06-19 14:05:22 -06:00
devel-algos.rst crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
index.rst docs: crypto: descore-readme.txt: convert to ReST format 2020-06-19 14:05:22 -06:00
intro.rst
userspace-if.rst crypto: af_alg - Support symmetric encryption via keyring keys 2022-10-28 12:36:34 +08:00