diff --git a/crypto/essiv.c b/crypto/essiv.c index fc7a69c9f42c0..ec81bdea25631 100644 --- a/crypto/essiv.c +++ b/crypto/essiv.c @@ -119,9 +119,11 @@ static int essiv_aead_setkey(struct crypto_aead *tfm, const u8 *key, crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); crypto_cipher_set_flags(tctx->essiv_cipher, crypto_aead_get_flags(tfm) & CRYPTO_TFM_REQ_MASK); + err = crypto_cipher_setkey(tctx->essiv_cipher, salt, + crypto_shash_digestsize(tctx->hash)); out: memzero_explicit(&keys, sizeof(keys)); - return err; + return err; } static int essiv_aead_setauthsize(struct crypto_aead *tfm,