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 v6 2/7] fs: crypto: invoke crypto API for ESSIV handling
Date: Fri, 28 Jun 2019 11:00:38 -0700 [thread overview]
Message-ID: <20190628180037.GC103946@gmail.com> (raw)
In-Reply-To: <20190628152112.914-3-ard.biesheuvel@linaro.org>
On Fri, Jun 28, 2019 at 05:21:07PM +0200, Ard Biesheuvel wrote:
> diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c
> index dcd91a3fbe49..f39667d4316a 100644
> --- a/fs/crypto/keyinfo.c
> +++ b/fs/crypto/keyinfo.c
> @@ -13,14 +13,10 @@
> #include <linux/hashtable.h>
> #include <linux/scatterlist.h>
> #include <linux/ratelimit.h>
> -#include <crypto/aes.h>
> #include <crypto/algapi.h>
> -#include <crypto/sha.h>
> #include <crypto/skcipher.h>
> #include "fscrypt_private.h"
>
> -static struct crypto_shash *essiv_hash_tfm;
> -
> /* Table of keys referenced by FS_POLICY_FLAG_DIRECT_KEY policies */
> static DEFINE_HASHTABLE(fscrypt_master_keys, 6); /* 6 bits = 64 buckets */
> static DEFINE_SPINLOCK(fscrypt_master_keys_lock);
> @@ -144,10 +140,9 @@ static struct fscrypt_mode available_modes[] = {
> },
> [FS_ENCRYPTION_MODE_AES_128_CBC] = {
> .friendly_name = "AES-128-CBC",
> - .cipher_str = "cbc(aes)",
> + .cipher_str = "essiv(cbc(aes),aes,sha256)",
> .keysize = 16,
> - .ivsize = 16,
> - .needs_essiv = true,
> + .ivsize = 8,
> },
Now that the essiv template takes the same size IV, the .ivsize here needs to be
left as 16.
- Eric
next prev parent reply other threads:[~2019-06-28 18:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 15:21 [PATCH v6 0/7] crypto: switch to crypto API for ESSIV generation Ard Biesheuvel
2019-06-28 15:21 ` [PATCH v6 1/7] crypto: essiv - create wrapper template " Ard Biesheuvel
2019-06-29 4:23 ` Eric Biggers
2019-06-28 15:21 ` [PATCH v6 2/7] fs: crypto: invoke crypto API for ESSIV handling Ard Biesheuvel
2019-06-28 18:00 ` Eric Biggers [this message]
2019-06-28 18:09 ` Ard Biesheuvel
2019-06-28 15:21 ` [PATCH v6 3/7] md: dm-crypt: infer ESSIV block cipher from cipher string directly Ard Biesheuvel
2019-07-01 8:58 ` Milan Broz
2019-06-28 15:21 ` [PATCH v6 4/7] md: dm-crypt: switch to ESSIV crypto API template Ard Biesheuvel
2019-07-01 8:59 ` Milan Broz
2019-07-02 8:07 ` [dm-devel] " Ard Biesheuvel
2019-07-02 16:30 ` Ard Biesheuvel
2019-06-28 15:21 ` [PATCH v6 5/7] crypto: essiv - add test vector for essiv(cbc(aes),aes,sha256) Ard Biesheuvel
2019-06-28 15:21 ` [PATCH v6 6/7] crypto: arm64/aes-cts-cbc - factor out CBC en/decryption of a walk Ard Biesheuvel
2019-06-28 15:21 ` [PATCH v6 7/7] crypto: arm64/aes - implement accelerated ESSIV/CBC mode 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=20190628180037.GC103946@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