netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] crypto: api - Add support for cloning tfms
@ 2023-04-13  6:23 Herbert Xu
  2023-04-13  6:24 ` [PATCH 1/6] crypto: api - Add crypto_tfm_get Herbert Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Herbert Xu @ 2023-04-13  6:23 UTC (permalink / raw)
  To: Linux Crypto Mailing List
  Cc: David Ahern, Eric Dumazet, Paolo Abeni, Jakub Kicinski,
	David S. Miller, Dmitry Safonov, Andy Lutomirski, Ard Biesheuvel,
	Bob Gilligan, Dan Carpenter, David Laight, Dmitry Safonov,
	Eric Biggers, Eric W. Biederman, Francesco Ruggeri,
	Hideaki YOSHIFUJI, Ivan Delalande, Leonard Crestez,
	Salam Noureddine, netdev

Over the years, various networking-related users have needed
per-packet keys for hashing (and potentially for ciphers because
hashing can be derived from ciphers, e.g., CMAC).

Currently this is impossible to do with the Crypto API for two
reasons.  Each key is tied to a tfm object, which cannot be
allocated on the network data path (as it requires sleeping).
Secondly, various drivers rely on the fact that setkey is usually
done right after allocating a tfm object and therefore sleep in
their setkey functions.

This series tries to resolve this by making it possible to clone
an existing tfm object, thus making it possible to allocate new
tfms on the data path.

To do so you simply call crypto_clone_ahash/shash on an existing
tfm object.  Afterwards you may call setkey on it as usual.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-04-18 12:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13  6:23 [PATCH 0/6] crypto: api - Add support for cloning tfms Herbert Xu
2023-04-13  6:24 ` [PATCH 1/6] crypto: api - Add crypto_tfm_get Herbert Xu
2023-04-18 12:27   ` Simon Horman
2023-04-13  6:24 ` [PATCH 2/6] crypto: api - Add crypto_clone_tfm Herbert Xu
2023-04-18 12:28   ` Simon Horman
2023-04-13  6:24 ` [PATCH 3/6] crypto: hash - Add crypto_clone_ahash/shash Herbert Xu
2023-04-18 12:29   ` Simon Horman
2023-04-13  6:24 ` [PATCH 4/6] crypto: hmac - Add support for cloning Herbert Xu
2023-04-13  6:24 ` [PATCH 5/6] crypto: cryptd - Convert hash to use modern init_tfm/exit_tfm Herbert Xu
2023-04-18 12:30   ` Simon Horman
2023-04-13  6:24 ` [PATCH 6/6] crypto: cryptd - Add support for cloning hashes Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).