Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1944617ybi; Thu, 20 Jun 2019 06:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8GfxwUr25OWzxEcIdOhsIe5Gu6xqfix4ZFjdpQ8TsmhysTMkrWSEm4lWrHGYoovQnT/v9 X-Received: by 2002:a62:ee17:: with SMTP id e23mr134233271pfi.130.1561037784002; Thu, 20 Jun 2019 06:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561037783; cv=none; d=google.com; s=arc-20160816; b=yqE+Ae0BDmQO2FwvcbaCpHRBXOI/y10GmqQmJnk9GJ9qn4SqUkHWWlDcduAJSmLr1M ZqiQHKsOLYnMlq8TAFsDHijfaVu2eTJELgkIcdG5RstSlGCXzPWdUMV1d+ruGMQG7nRs exNBUkq5MauXhhoGbXgfjk7so44jI+zjD+WlZR7TbtMEnsubR8U9hDguvz0tNgPGdXA4 Ew5mE7Kdna1lMdXGqowuAno+JpCJUGz1TzgLstezMzTb4OWe1nimTiTz35kzZB9/Li3u GErUd5RVZHg8GAPQje92+NpWHAq3+ymnr+hBvWQCSN4xqHniEe+jlgHjRHCMLmet4+RL Zifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BIDlsIvtATsL3hA5QAEsaHCyI03s2C5u03IcGdawceo=; b=lNCm3FUbAa1im9xjz4v34WuZkaiu404fkueuAjlgyXGK6dvu6UjdW7aaO2PIfMy3tj gyDg3b4a5tJi3EPr/B5uGvvwmuGYddaA98l42CQMKWT45K5Y7HQD6mO+fvRp0o7uN4xd Tk0pEQDBCoInK0FxvMexqyf4nctxnJc3wmUQXCWTZZbmfyRF3YwPG48f/Z3NyIglawFa pkqDjdlemStdP+6FiKv1PIHS5/wlwpzZ8KUI+D+1wC79pGQegBo6OHJmRoDFXcOaIxtI rw1+wQkDWtcdgQsX7P0bBLvfhiFkHc8tdl5dMv5uBXYPXQjoUuio/Q10XIWFdMPEub9n kRzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o9alXZRU; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si6186157pgh.524.2019.06.20.06.36.04; Thu, 20 Jun 2019 06:36:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o9alXZRU; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731981AbfFTNfl (ORCPT + 99 others); Thu, 20 Jun 2019 09:35:41 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:41955 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbfFTNfl (ORCPT ); Thu, 20 Jun 2019 09:35:41 -0400 Received: by mail-io1-f68.google.com with SMTP id w25so20732ioc.8 for ; Thu, 20 Jun 2019 06:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BIDlsIvtATsL3hA5QAEsaHCyI03s2C5u03IcGdawceo=; b=o9alXZRUfb+rgrya2OuK7msSKBSLIOUcWsFtVHJICr1ID4KycIx7HeXphqKApgwkI9 iw0YS5AdA0fd8S83GuH7isN4P46piJaZucQrcO8ruXW+kJlrMAlX7V3RGwNhUMBHwusy CKEO6hOXtvhXh8p3lY2HbCSH+vJY+2boyK2mzZ+5o73aqFC2CzeGmVxRVgquHcMCRso4 CC/ckDTCWo5P1Lhs3Hz5hBXUExB8hoc+AiNI21xrnOnoXE8FK+7zsnyuEz5t7kEGTuGf wCKoKqoq4Tskwk2qh+Y240HsyZpWKtvGadkxkAFffQ3V/GkdyDzDIDUFJ1NZsm/n7kRv xq/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BIDlsIvtATsL3hA5QAEsaHCyI03s2C5u03IcGdawceo=; b=k60Iwk/Gy8vDZqCkkYLZZ9DXYK5UPyHXX1CKLPXVZSSUlzDhwH31uitoLPWxVsrDZv 0n83lPnS0WVNPFnymOINMXidLSuyvOfRDfxfVZB0poSnAVy26syWntDhqjivqb3A7/nd 9jbjsZo9lzCrmrWbNEy0m1C1pgQLvutLsMLwGkCGT7+hRUbk5XdQ9r/QnFTsdaePUEB1 WVwxTE47g523Iab0/a9CDDW+8Etij79jRkg9qmqqeExBpFBXplGlgdZIKRtv2AceAslQ jI1Xbk0EqnAs33k33xYNgpHuBhEVAXb72Xd4AOhJAVis5fxoJsuMp6hxd0lWIAi6jDDs WLzA== X-Gm-Message-State: APjAAAXTvzazAsKI7jqEA2/zU/RXeeaVyEMOJ13TZfXMMcJFko55e6mD I+g/RpMs77mhLH0hu7mJL855lETp48Sv9Lf0Nesm0w== X-Received: by 2002:a02:9143:: with SMTP id b3mr48893jag.12.1561037740085; Thu, 20 Jun 2019 06:35:40 -0700 (PDT) MIME-Version: 1.0 References: <20190619162921.12509-1-ard.biesheuvel@linaro.org> <20190619162921.12509-2-ard.biesheuvel@linaro.org> <20190620010417.GA722@sol.localdomain> <20190620011325.phmxmeqnv2o3wqtr@gondor.apana.org.au> <20190620125339.gqup5623sw4xrsmi@gondor.apana.org.au> In-Reply-To: From: Ard Biesheuvel Date: Thu, 20 Jun 2019 15:35:28 +0200 Message-ID: Subject: Re: [PATCH v3 1/6] crypto: essiv - create wrapper template for ESSIV generation To: Herbert Xu Cc: Eric Biggers , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , device-mapper development , linux-fscrypt@vger.kernel.org, Gilad Ben-Yossef , Milan Broz Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 20 Jun 2019 at 15:02, Ard Biesheuvel wrote: > > On Thu, 20 Jun 2019 at 14:53, Herbert Xu wrote: > > > > On Thu, Jun 20, 2019 at 09:30:41AM +0200, Ard Biesheuvel wrote: > > > > > > Is this the right approach? Or are there better ways to convey this > > > information when instantiating the template? > > > Also, it seems to me that the dm-crypt and fscrypt layers would > > > require major surgery in order to take advantage of this. > > > > Oh and you don't have to make dm-crypt use it from the start. That > > is, you can just make things simple by doing it one sector at a > > time in the dm-crypt code even though the underlying essiv code > > supports multiple sectors. > > > > Someone who cares about this is sure to come along and fix it later. > > > > It also depend on how realistic it is that we will need to support > arbitrary sector sizes in the future. I mean, if we decide today that > essiv() uses an implicit sector size of 4k, we can always add > essiv64k() later, rather than adding lots of complexity now that we > are never going to use. Note that ESSIV is already more or less > deprecated, so there is really no point in inventing these weird and > wonderful things if we want people to move to XTS and plain IV > generation instead. Never mind, the sector size is already variable ...