From: Eric Biggers <ebiggers@kernel.org>
To: Maxim Fomin <maxim@fomin.one>
Cc: cryptsetup@lists.linux.dev
Subject: Re: Cryptsetup and hardware accelerated AES-XTS
Date: Sat, 20 Jul 2024 10:36:11 -0700 [thread overview]
Message-ID: <20240720173611.GA51708@sol.localdomain> (raw)
In-Reply-To: <LzHpD7N7NryfAL3OI3b2QBM6UuT5QZuCCjpgxI7WERzccWwpn26f5urbFY5P1dqmYHIz3KRYd4qCo9pIOQtVBO2gtjgp-cBHiUrlN0DTrSs=@fomin.one>
On Sat, Jul 20, 2024 at 12:15:23PM +0000, Maxim Fomin wrote:
> Hi!
>
> Recently linux kernel got[1] faster AES-XTS on modern x86_64 CPUs thanks to VAES and AVX-10/512. I decided to dig deeper into this issue and found the article[2] from 2020 stating that dm-crypt can be configured to use faster (synchronous and hardware accelerated) algorithms with 'capi:' prefix. Can cryptsetup be configured to ask dm-crypt to use hardware accelerated algorithms?
>
> [1] https://lore.kernel.org/lkml/20240403004404.GC2576@sol.localdomain/T/#m83293b2699f9a5da04fc5780ee402191dace3926
>
> [2] https://blog.cloudflare.com/speeding-up-linux-disk-encryption/
>
> Best regards,
> Maxim
>
You don't need to use "capi:". Just make sure CONFIG_CRYPTO_AES_NI_INTEL=y is
enabled in your kernel (which it already should have been since it was needed
for AES-NI acceleration before), and the new code will be used automatically if
your CPU supports it.
- Eric
next prev parent reply other threads:[~2024-07-20 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 12:15 Cryptsetup and hardware accelerated AES-XTS Maxim Fomin
2024-07-20 17:36 ` Eric Biggers [this message]
2024-07-21 9:14 ` Maxim Fomin
2024-07-21 15:58 ` Eric Biggers
2024-07-22 10:36 ` Maxim Fomin
2024-07-22 15:32 ` Eric Biggers
2024-07-22 8:25 ` Milan Broz
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=20240720173611.GA51708@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=cryptsetup@lists.linux.dev \
--cc=maxim@fomin.one \
/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