From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
linux-fscrypt@vger.kernel.org,
Gilad Ben-Yossef <gilad@benyossef.com>,
dm-devel@redhat.com, linux-crypto@vger.kernel.org,
Milan Broz <gmazyland@gmail.com>
Subject: Re: [PATCH v3 2/6] fs: crypto: invoke crypto API for ESSIV handling
Date: Wed, 19 Jun 2019 15:45:51 -0700 [thread overview]
Message-ID: <20190619224550.GD33328@gmail.com> (raw)
In-Reply-To: <20190619162921.12509-3-ard.biesheuvel@linaro.org>
On Wed, Jun 19, 2019 at 06:29:17PM +0200, 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>
> ---
> fs/crypto/Kconfig | 1 +
> fs/crypto/crypto.c | 5 --
> fs/crypto/fscrypt_private.h | 9 --
> fs/crypto/keyinfo.c | 88 +-------------------
> 4 files changed, 3 insertions(+), 100 deletions(-)
>
> diff --git a/fs/crypto/Kconfig b/fs/crypto/Kconfig
> index 24ed99e2eca0..b0292da8613c 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 CRYPTO_SHA256
Selecting CRYPTO_ESSIV is fine for now, but I'd really like to de-bloat the
dependencies of FS_ENCRYPTION (probably in a separate patch) by removing
CRYPTO_ESSIV and CRYPTO_SHA256 and documenting in the encryption modes section
of Documentation/filesystems/fscrypt.rst that people need to select them
themselves if they want to use AES-128-CBC. I already took that approach when I
added Adiantum support, so we don't force all fscrypt users to build Adiantum,
ChaCha, Poly1305, etc. into their kernels.
- Eric
WARNING: multiple messages have this Message-ID (diff)
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 v3 2/6] fs: crypto: invoke crypto API for ESSIV handling
Date: Wed, 19 Jun 2019 15:45:51 -0700 [thread overview]
Message-ID: <20190619224550.GD33328@gmail.com> (raw)
In-Reply-To: <20190619162921.12509-3-ard.biesheuvel@linaro.org>
On Wed, Jun 19, 2019 at 06:29:17PM +0200, 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>
> ---
> fs/crypto/Kconfig | 1 +
> fs/crypto/crypto.c | 5 --
> fs/crypto/fscrypt_private.h | 9 --
> fs/crypto/keyinfo.c | 88 +-------------------
> 4 files changed, 3 insertions(+), 100 deletions(-)
>
> diff --git a/fs/crypto/Kconfig b/fs/crypto/Kconfig
> index 24ed99e2eca0..b0292da8613c 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 CRYPTO_SHA256
Selecting CRYPTO_ESSIV is fine for now, but I'd really like to de-bloat the
dependencies of FS_ENCRYPTION (probably in a separate patch) by removing
CRYPTO_ESSIV and CRYPTO_SHA256 and documenting in the encryption modes section
of Documentation/filesystems/fscrypt.rst that people need to select them
themselves if they want to use AES-128-CBC. I already took that approach when I
added Adiantum support, so we don't force all fscrypt users to build Adiantum,
ChaCha, Poly1305, etc. into their kernels.
- Eric
next prev parent reply other threads:[~2019-06-19 22:45 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 16:29 [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-19 16:29 ` [PATCH v3 1/6] crypto: essiv - create wrapper template " Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-20 1:04 ` Eric Biggers
2019-06-20 1:04 ` Eric Biggers
2019-06-20 1:13 ` Herbert Xu
2019-06-20 1:13 ` Herbert Xu
2019-06-20 1:17 ` Herbert Xu
2019-06-20 1:17 ` Herbert Xu
2019-06-20 7:30 ` Ard Biesheuvel
2019-06-20 7:30 ` Ard Biesheuvel
2019-06-20 12:52 ` Herbert Xu
2019-06-20 12:52 ` Herbert Xu
2019-06-20 12:53 ` Herbert Xu
2019-06-20 12:53 ` Herbert Xu
2019-06-20 13:02 ` Ard Biesheuvel
2019-06-20 13:02 ` Ard Biesheuvel
2019-06-20 13:35 ` Ard Biesheuvel
2019-06-20 13:35 ` Ard Biesheuvel
2019-06-20 13:40 ` Herbert Xu
2019-06-20 13:40 ` Herbert Xu
2019-06-20 13:53 ` Ard Biesheuvel
2019-06-20 13:53 ` Ard Biesheuvel
2019-06-21 1:06 ` Herbert Xu
2019-06-21 1:06 ` Herbert Xu
2019-06-21 5:39 ` Ard Biesheuvel
2019-06-21 5:39 ` Ard Biesheuvel
2019-06-21 6:44 ` Milan Broz
2019-06-21 6:44 ` Milan Broz
2019-06-20 18:27 ` Eric Biggers
2019-06-20 18:27 ` Eric Biggers
2019-06-19 16:29 ` [PATCH v3 2/6] fs: crypto: invoke crypto API for ESSIV handling Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-19 22:45 ` Eric Biggers [this message]
2019-06-19 22:45 ` Eric Biggers
2019-06-19 16:29 ` [PATCH v3 3/6] md: dm-crypt: infer ESSIV block cipher from cipher string directly Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-19 16:29 ` [PATCH v3 4/6] md: dm-crypt: switch to ESSIV crypto API template Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-19 16:29 ` [PATCH v3 5/6] crypto: essiv - add test vector for essiv(cbc(aes), aes, sha256) Ard Biesheuvel
2019-06-19 16:29 ` [PATCH v3 5/6] crypto: essiv - add test vector for essiv(cbc(aes),aes,sha256) Ard Biesheuvel
2019-06-19 16:29 ` [PATCH v3 6/6] crypto: arm64/aes - implement accelerated ESSIV/CBC mode Ard Biesheuvel
2019-06-19 16:29 ` Ard Biesheuvel
2019-06-19 22:37 ` Eric Biggers
2019-06-19 22:37 ` Eric Biggers
2019-06-19 22:43 ` Ard Biesheuvel
2019-06-19 22:43 ` Ard Biesheuvel
2019-06-20 11:29 ` Milan Broz
2019-06-20 11:29 ` Milan Broz
2019-06-26 4:32 ` Eric Biggers
2019-06-26 4:32 ` Eric Biggers
2019-06-20 7:07 ` [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation Gilad Ben-Yossef
2019-06-20 7:07 ` Gilad Ben-Yossef
2019-06-20 11:22 ` Milan Broz
2019-06-20 11:22 ` Milan Broz
2019-06-20 11:54 ` Ard Biesheuvel
2019-06-20 11:54 ` Ard Biesheuvel
2019-06-20 12:09 ` Milan Broz
2019-06-20 12:09 ` Milan Broz
2019-06-20 13:14 ` Milan Broz
2019-06-20 13:14 ` Milan Broz
2019-06-20 13:52 ` Ard Biesheuvel
2019-06-20 13:52 ` Ard Biesheuvel
2019-06-21 7:01 ` Milan Broz
2019-06-21 7:01 ` Milan Broz
2019-06-21 7:06 ` Ard Biesheuvel
2019-06-21 7:06 ` [dm-devel] " Ard Biesheuvel
2019-06-21 7:06 ` Ard Biesheuvel
2019-06-21 7:37 ` Ard Biesheuvel
2019-06-21 7:37 ` 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=20190619224550.GD33328@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.