linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] crypto: set CRYPTO_TFM_NEED_KEY if ->setkey() fails
@ 2019-01-07  2:47 Eric Biggers
  2019-01-07  2:47 ` [PATCH 1/3] crypto: hash - " Eric Biggers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Biggers @ 2019-01-07  2:47 UTC (permalink / raw)
  To: linux-crypto, Herbert Xu

This series makes the crypto API mark shash, ahash, skcipher, and aead
tfms as needing a key again if setting a key fails, since on failure
many algorithms can leave the tfm in an intermediate state that is
neither the old key nor the new key -- and use of such tfms for hashing,
encryption, or decryption will produce bogus results or crashes.

Eric Biggers (3):
  crypto: hash - set CRYPTO_TFM_NEED_KEY if ->setkey() fails
  crypto: skcipher - set CRYPTO_TFM_NEED_KEY if ->setkey() fails
  crypto: aead - set CRYPTO_TFM_NEED_KEY if ->setkey() fails

 crypto/aead.c     |  4 +++-
 crypto/ahash.c    | 28 +++++++++++++++++++---------
 crypto/shash.c    | 18 +++++++++++++-----
 crypto/skcipher.c | 27 ++++++++++++++++++---------
 4 files changed, 53 insertions(+), 24 deletions(-)

-- 
2.20.1

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

end of thread, other threads:[~2019-01-18 10:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07  2:47 [PATCH 0/3] crypto: set CRYPTO_TFM_NEED_KEY if ->setkey() fails Eric Biggers
2019-01-07  2:47 ` [PATCH 1/3] crypto: hash - " Eric Biggers
2019-01-07  2:47 ` [PATCH 2/3] crypto: skcipher " Eric Biggers
2019-01-07  2:47 ` [PATCH 3/3] crypto: aead " Eric Biggers
2019-01-18 10:55 ` [PATCH 0/3] crypto: " 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).