From: Eric Biggers <ebiggers@kernel.org>
To: Dongsoo Lee <letrhee@nsr.re.kr>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Jens Axboe <axboe@kernel.dk>, "Theodore Y. Ts'o" <tytso@mit.edu>,
Jaegeuk Kim <jaegeuk@kernel.org>,
linux-crypto@vger.kernel.org, linux-block@vger.kernel.org,
linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] fscrypt: Add LEA-256-XTS, LEA-256-CTS support
Date: Tue, 27 Jun 2023 23:38:30 -0700 [thread overview]
Message-ID: <20230628063830.GA7920@sol.localdomain> (raw)
In-Reply-To: <20230626084703.907331-5-letrhee@nsr.re.kr>
On Mon, Jun 26, 2023 at 05:47:03PM +0900, Dongsoo Lee wrote:
> when SIMD instructions are available, it performs even faster.
This will only be true once there is actually an applicable implementation of
LEA-XTS and LEA-CTS using SIMD instructions included in the kernel.
Perhaps it is your plan to go through and accelerate LEA-XTS and LEA-CTS for the
common CPU architectures. However, it is not included in this patchset yet, so
it should not be claimed in the documentation yet.
> Particularly, it outperforms AES when the dedicated crypto
> +instructions for AES are unavailable, regardless of the presence of SIMD
> +instructions. However, it is not recommended to use LEA unless there is
> +a clear reason (such as the absence of dedicated crypto instructions for
> +AES or a mandatory requirement) to do so. Also, to enable LEA support,
> +it needs to be enabled in the kernel crypto API.
I think I'd prefer that you omit the mention of the "absence of dedicated crypto
instructions" use case for now. fscrypt already supports another algorithm that
fulfills exactly that use case (Adiantum), and that algorithm already has
optimized implementations for arm32, arm64, and x86_64. LEA does not have that
yet. So it does not really bring anything new to the table. I'm also unsure it
would be appropriate to recommend a "lightweight" cipher at this point...
That would leave "mandatory requirement" as the rationale, at least for now,
similar to SM4.
- Eric
next prev parent reply other threads:[~2023-06-28 9:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 8:46 [PATCH v3 0/4] crypto: LEA block cipher implementation Dongsoo Lee
2023-06-26 8:47 ` [PATCH v3 3/4] blk-crypto: Add LEA-256-XTS blk-crypto support Dongsoo Lee
[not found] ` <20230626084703.907331-5-letrhee@nsr.re.kr>
2023-06-28 6:38 ` Eric Biggers [this message]
2023-06-29 10:01 ` [PATCH v3 4/4] fscrypt: Add LEA-256-XTS, LEA-256-CTS support Dongsoo Lee
2023-06-30 2:59 ` Eric Biggers
2023-06-30 4:45 ` Dongsoo Lee
2023-06-30 6:59 ` Eric Biggers
2023-06-30 7:53 ` Dongsoo Lee
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=20230628063830.GA7920@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jaegeuk@kernel.org \
--cc=letrhee@nsr.re.kr \
--cc=linux-block@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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