From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-crypto@vger.kernel.org,
Herbert Xu <herbert@gondor.apana.org.au>,
dm-devel@redhat.com, linux-fscrypt@vger.kernel.org,
Gilad Ben-Yossef <gilad@benyossef.com>,
Milan Broz <gmazyland@gmail.com>
Subject: Re: [PATCH v10 2/7] fs: crypto: invoke crypto API for ESSIV handling
Date: Mon, 12 Aug 2019 12:47:48 -0700 [thread overview]
Message-ID: <20190812194747.GB131059@gmail.com> (raw)
In-Reply-To: <20190812145324.27090-3-ard.biesheuvel@linaro.org>
On Mon, Aug 12, 2019 at 05:53:19PM +0300, Ard Biesheuvel wrote:
> Instead of open coding the calculations for ESSIV handling, use a
> ESSIV skcipher which does all of this under the hood.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This looks fine (except for one comment below), but this heavily conflicts with
the fscrypt patches planned for v5.4. So I suggest moving this to the end of
the series and having Herbert take only 1-6, and I'll apply this one to the
fscrypt tree later.
Thanks!
> ---
> fs/crypto/Kconfig | 1 +
> fs/crypto/crypto.c | 5 --
> fs/crypto/fscrypt_private.h | 9 --
> fs/crypto/keyinfo.c | 92 +-------------------
> 4 files changed, 4 insertions(+), 103 deletions(-)
>
> diff --git a/fs/crypto/Kconfig b/fs/crypto/Kconfig
> index 5fdf24877c17..6f3d59b880b7 100644
> --- a/fs/crypto/Kconfig
> +++ b/fs/crypto/Kconfig
> @@ -5,6 +5,7 @@ config FS_ENCRYPTION
> select CRYPTO_AES
> select CRYPTO_CBC
> select CRYPTO_ECB
> + select CRYPTO_ESSIV
> select CRYPTO_XTS
> select CRYPTO_CTS
> select KEYS
In v5.3 I removed the 'select CRYPTO_SHA256', so now ESSIV shouldn't be selected
here either. Instead we should just update the documentation:
diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst
index 82efa41b0e6c02..a1e2ab12a99943 100644
--- a/Documentation/filesystems/fscrypt.rst
+++ b/Documentation/filesystems/fscrypt.rst
@@ -193,7 +193,8 @@ If unsure, you should use the (AES-256-XTS, AES-256-CTS-CBC) pair.
AES-128-CBC was added only for low-powered embedded devices with
crypto accelerators such as CAAM or CESA that do not support XTS. To
use AES-128-CBC, CONFIG_CRYPTO_SHA256 (or another SHA-256
-implementation) must be enabled so that ESSIV can be used.
+implementation) and CONFIG_CRYPTO_ESSIV must be enabled so that ESSIV
+can be used.
Adiantum is a (primarily) stream cipher-based mode that is fast even
on CPUs without dedicated crypto instructions. It's also a true
next prev parent reply other threads:[~2019-08-12 19:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 14:53 [PATCH v10 0/7] crypto: switch to crypto API for ESSIV generation Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 1/7] crypto: essiv - create wrapper template " Ard Biesheuvel
2019-08-12 19:38 ` Eric Biggers
2019-08-13 5:17 ` Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 2/7] fs: crypto: invoke crypto API for ESSIV handling Ard Biesheuvel
2019-08-12 19:47 ` Eric Biggers [this message]
2019-08-13 5:09 ` Ard Biesheuvel
2019-08-13 18:00 ` [dm-devel] " Eric Biggers
2019-08-13 18:16 ` Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 3/7] md: dm-crypt: switch to ESSIV crypto API template Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 4/7] crypto: essiv - add tests for essiv in cbc(aes)+sha256 mode Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 5/7] crypto: arm64/aes-cts-cbc - factor out CBC en/decryption of a walk Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 6/7] crypto: arm64/aes - implement accelerated ESSIV/CBC mode Ard Biesheuvel
2019-08-12 14:53 ` [PATCH v10 7/7] md: dm-crypt: omit parsing of the encapsulated cipher Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190812194747.GB131059@gmail.com \
--to=ebiggers@kernel.org \
--cc=ard.biesheuvel@linaro.org \
--cc=dm-devel@redhat.com \
--cc=gilad@benyossef.com \
--cc=gmazyland@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).