Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp611388pxx; Mon, 26 Oct 2020 16:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ50N4mEk7di+kX6fctSCFfPXBat/41PsZnolHjvbJllvLXD3KSd4WwL4qhDkJAiEl+UPp X-Received: by 2002:a17:907:270f:: with SMTP id w15mr17562363ejk.505.1603756289973; Mon, 26 Oct 2020 16:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603756289; cv=none; d=google.com; s=arc-20160816; b=Sc0tE+kV6cv5H+iPO0YOwBfz6k5xME0rVfx6LNvghDV8lyKu/gZ5g2Yu4aGXFMl/hL 7WxC2QmPSiK9q7AAK1ve8Sh8UdXYpfUkBSjeR9m3Bywy/UspQk6e4MVkqHliI7Aje0HB zUOdPAKyCPX5uJLkpuaOwKSVEzNd0FPxNk9KT3gC0Z6ntWwU19oSgz4wQoWP2CvSSHt9 pWowsVt3t9xQbpG8j/EQAv/DJIRfzs6Az7qE4ouZ3TJ9v81vvsw6nN908SO4mDQ0NaNK rj7WVLo0zYufYcFHSYbIKlEeXkv2+pm2rFzV71kco899fEoPLw1vPKtG2MXb1MyCl+CL Yl8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hChaP/gyMyok/nQ90mNhQW62l3Toswa10hOb0nPHbAI=; b=Yw9UB4bg4pvG0a22Dnsq3qBcX95bjzLuf2YmyIIn2GUHChY2VXg9wcbts/oRrefNtV db4HAop4kuyOhirF3gT0TLYPnZ5re3tLpqmYowdKZ1oF4No4odb9RR7MKwbEHjhNGZSG TY57ExYMSslD5V6xUbZLTNQhyDup+YRBld9ywOYoiT3l9jY60v56LodpM9L95sKpcBAn XITBbXAG4cKqxByODBL/OtGY9aTalaG2pxz374dlZXWf6M3JmrECf0pFQ53PslKVDv/U 6AzywL+0Nxvh9G2JbY566Z0TrNpdNRWz36HOKdRPjcjB/YEFuAeJV4dBLD0TQ6cUS2fo zHwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e4m0UFZb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si8185455eja.274.2020.10.26.16.51.06; Mon, 26 Oct 2020 16:51:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e4m0UFZb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1790100AbgJZSjj (ORCPT + 99 others); Mon, 26 Oct 2020 14:39:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:38920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1741485AbgJZSjj (ORCPT ); Mon, 26 Oct 2020 14:39:39 -0400 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3E4152084C; Mon, 26 Oct 2020 18:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603737578; bh=7VmhnHRkwkCNWziVvSpwif+hE8EvvT/r7OJAvNDEhz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e4m0UFZbr26BzGxHLiHYpbVuFRZtg9GrOwzWOJU9mVMavylkIeZhVVJFg+/I81tFK SIuOw7GoaH+CT2wdVC8TrnSGWROQxIO1cPzaIti2DC0j2HymzmOgSdVNIatT0f7Rvi XxMVFJUtLfl+5euCYkTAWP4U0nccEK0q7iXc18Wo= Date: Mon, 26 Oct 2020 11:39:36 -0700 From: Eric Biggers To: Milan Broz Cc: Gilad Ben-Yossef , Herbert Xu , "David S. Miller" , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Song Liu , Ofir Drang , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH 3/4] dm crypt: switch to EBOIV crypto API template Message-ID: <20201026183936.GJ858@sol.localdomain> References: <20201026130450.6947-1-gilad@benyossef.com> <20201026130450.6947-4-gilad@benyossef.com> <20201026175231.GG858@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Oct 26, 2020 at 07:29:57PM +0100, Milan Broz wrote: > On 26/10/2020 18:52, Eric Biggers wrote: > > On Mon, Oct 26, 2020 at 03:04:46PM +0200, Gilad Ben-Yossef wrote: > >> Replace the explicit EBOIV handling in the dm-crypt driver with calls > >> into the crypto API, which now possesses the capability to perform > >> this processing within the crypto subsystem. > >> > >> Signed-off-by: Gilad Ben-Yossef > >> > >> --- > >> drivers/md/Kconfig | 1 + > >> drivers/md/dm-crypt.c | 61 ++++++++++++++----------------------------- > >> 2 files changed, 20 insertions(+), 42 deletions(-) > >> > >> diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig > >> index 30ba3573626c..ca6e56a72281 100644 > >> --- a/drivers/md/Kconfig > >> +++ b/drivers/md/Kconfig > >> @@ -273,6 +273,7 @@ config DM_CRYPT > >> select CRYPTO > >> select CRYPTO_CBC > >> select CRYPTO_ESSIV > >> + select CRYPTO_EBOIV > >> help > >> This device-mapper target allows you to create a device that > >> transparently encrypts the data on it. You'll need to activate > > > > Can CRYPTO_EBOIV please not be selected by default? If someone really wants > > Bitlocker compatibility support, they can select this option themselves. > > Please no! Until this move of IV to crypto API, we can rely on > support in dm-crypt (if it is not supported, it is just a very old kernel). > (Actually, this was the first thing I checked in this patchset - if it is > unconditionally enabled for compatibility once dmcrypt is selected.) > > People already use removable devices with BitLocker. > It was the whole point that it works out-of-the-box without enabling anything. > > If you insist on this to be optional, please better keep this IV inside dmcrypt. > (EBOIV has no other use than for disk encryption anyway.) > > Or maybe another option would be to introduce option under dm-crypt Kconfig that > defaults to enabled (like support for foreign/legacy disk encryption schemes) and that > selects these IVs/modes. > But requiring some random switch in crypto API will only confuse users. CONFIG_DM_CRYPT can either select every weird combination of algorithms anyone can ever be using, or it can select some defaults and require any other needed algorithms to be explicitly selected. In reality, dm-crypt has never even selected any particular block ciphers, even AES. Nor has it ever selected XTS. So it's actually always made users (or kernel distributors) explicitly select algorithms. Why the Bitlocker support suddenly different? I'd think a lot of dm-crypt users don't want to bloat their kernels with random legacy algorithms. - Eric