Re: [PATCH v1] virtio-blk: Add inline encryption support
Linlin Zhang <[email protected]>
| Newsgroups | dev.linux.lists.virtio-dev |
|---|---|
| Message-ID | <[email protected]> |
On 8/19/2026 12:29 PM, Eric Biggers wrote:
> On Fri, Aug 14, 2026 at 07:23:01AM -0700, Linlin Zhang wrote:
>> +\begin{lstlisting}
>> +#define VIRTIO_BLK_CRYPTO_MODE_AES_256_XTS 1
>> +#define VIRTIO_BLK_CRYPTO_MODE_AES_128_CBC_ESSIV 2
>> +#define VIRTIO_BLK_CRYPTO_MODE_ADIANTUM 3
>> +#define VIRTIO_BLK_CRYPTO_MODE_SM4_XTS 4
>> +\end{lstlisting}
>
> Is there a use case for any of these other than AES-256-XTS? I guess
> you copied this list from the fscrypt file contents encryption modes.
> But there are a variety of historical reasons for fscrypt's list.
> There's no reason for virtio-blk to have exactly the same list.
>
> For inline encryption hardware, AES-256-XTS is the one that is actually
> used.
>
> Let's simply specify AES-256-XTS for now, unless there's an actual
> reason to support more.
>
> - Eric
ACK.Thanks for your comments!
I'm not sure if the crypto modes except AES_256_XTS is supported or not by
other vendors' inline encryption hardware. so, I made them aligned with the
crypto modes defined in blk-crypto driver to avoid the functional deficiency.
With your confirmation, I agree to only maintain AES-256-XTS for now.