Message ID | 20211124200700.15888-1-chang.seok.bae@intel.com (mailing list archive) |
---|---|
Headers | show |
Series | x86: Support Key Locker | expand |
On Wed, Nov 24, 2021 at 12:06:45PM -0800, Chang S. Bae wrote: > > == Non Use Cases == > > Bare metal disk encryption is the only use case intended by these patches. If that's the case, why are so many encryption modes being added (ECB, CTR, CBC, and XTS)? Wouldn't just XTS be sufficient? > * PATCH10-15: For the x86 crypto library, it first prepares the AES-NI code > to accommodate the new AES implementation. Then incrementally add base > functions and various modes support -- ECB, CBC, CTR, and XTS. The code > was found to pass the crypto test. Did you test with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y? - Eric
On Nov 29, 2021, at 19:27, Eric Biggers <ebiggers@kernel.org> wrote: > On Wed, Nov 24, 2021 at 12:06:45PM -0800, Chang S. Bae wrote: >> >> == Non Use Cases == >> >> Bare metal disk encryption is the only use case intended by these patches. > > If that's the case, why are so many encryption modes being added (ECB, CTR, CBC, > and XTS)? Wouldn't just XTS be sufficient? Right, it would reduce the crypt library changes significantly. But it is clueless whether XTS is sufficient to support DM-crypt, because a user may select the kernel’s crypto API via ‘capi:', [1]. >> * PATCH10-15: For the x86 crypto library, it first prepares the AES-NI code >> to accommodate the new AES implementation. Then incrementally add base >> functions and various modes support -- ECB, CBC, CTR, and XTS. The code >> was found to pass the crypto test. > > Did you test with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y? Yes. Thanks, Chang [1] https://gitlab.com/cryptsetup/cryptsetup/-/wikis/DMCrypt
On Tue, Nov 30, 2021 at 06:36:15AM +0000, Bae, Chang Seok wrote: > On Nov 29, 2021, at 19:27, Eric Biggers <ebiggers@kernel.org> wrote: > > On Wed, Nov 24, 2021 at 12:06:45PM -0800, Chang S. Bae wrote: > >> > >> == Non Use Cases == > >> > >> Bare metal disk encryption is the only use case intended by these patches. > > > > If that's the case, why are so many encryption modes being added (ECB, CTR, CBC, > > and XTS)? Wouldn't just XTS be sufficient? > > Right, it would reduce the crypt library changes significantly. But it is > clueless whether XTS is sufficient to support DM-crypt, because a user may > select the kernel’s crypto API via ‘capi:', [1]. > Just because dm-crypt allows you to create a ECB or CTR encrypted disk does not mean that it is a good idea. - Eric
On Nov 29, 2021, at 23:23, Eric Biggers <ebiggers@kernel.org> wrote: > On Tue, Nov 30, 2021 at 06:36:15AM +0000, Bae, Chang Seok wrote: >> On Nov 29, 2021, at 19:27, Eric Biggers <ebiggers@kernel.org> wrote: >>> On Wed, Nov 24, 2021 at 12:06:45PM -0800, Chang S. Bae wrote: >>>> >>>> == Non Use Cases == >>>> >>>> Bare metal disk encryption is the only use case intended by these patches. >>> >>> If that's the case, why are so many encryption modes being added (ECB, CTR, CBC, >>> and XTS)? Wouldn't just XTS be sufficient? >> >> Right, it would reduce the crypt library changes significantly. But it is >> clueless whether XTS is sufficient to support DM-crypt, because a user may >> select the kernel’s crypto API via ‘capi:', [1]. > > Just because dm-crypt allows you to create a ECB or CTR encrypted disk does not > mean that it is a good idea. Okay, it sounds like at least ECB and CTR supports are not practically needed. I have no problem trimming down to exclude them. Thanks, Chang