Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1960394ybi; Thu, 20 Jun 2019 06:54:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqybL+a3GVMwz9bvYHzYMMcqNQbuFW8IcI2Bj3F4T0BekRhofQlbj5awcsgAwWJS3quWmyBU X-Received: by 2002:a17:90a:21ac:: with SMTP id q41mr3299921pjc.31.1561038854624; Thu, 20 Jun 2019 06:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561038854; cv=none; d=google.com; s=arc-20160816; b=k5FeeNtukCLhiv86SCJvvekRAa6a0Fg67Wo0DlppQwL6xqLoHyL8m0TQauYtuhG7ct AIckht8/32dZc/WroR0sd6Bp63m9agAiv4phSukHmUbzsWnXIF6LNkEwdtwBCr70rSZs Q1ju8bXfVmhUaJeIoLAy685AmUpYKgUEqLCj05kHl6IJOI4TnsjzsCJ9KcEaWE4SLu02 zalaEsUMqTC1i05YNgIxmVhngoyYKVseCtyLL3imxwyDte3Y63A4L7SPQnPC2YgMb/sB wc6optTM9EmJOLYqBKW9qV8pSVkQzdVuz22P7AlYHoZqbykckz/sLGp6NALNymdY/Ymw 6ILA== 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=X0vIXNw6IkK7+noGSyo5S+Vhxo01kIr5An5KCT/yZtQ=; b=Qg4/BD9MevBlvaUFePGnh3XuzJWJ8Sg7oASgAtPrJrA8Oq9c684Zow4Ti13CRiBtYA DbNJD/J4xqavhcUyL5oF4E7zGodfyNtlakl9pzlo8pprwiyXP/f/ki4bhbef+BrJILrN limAv0VfTfJV69NYiDty48UNRXP6dn9sIE3HKqhUfG9+WW3PgeHecQ1i+ddsg1B8STcY 00Vg0/7Btpyy5cA3eEDVOl9ag/Lt2iGI7idlEHI4tombSnkBa0zU0D2rlTGptUhrojPN 8KAjI9ChHjUe6ZIIw4RkCHM9ybNvq9Vp39KRsj8hgUlgiqGjnpQfblvbgGRdbZvFzvsx 1wGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KlTKFNO1; 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 q10si4363252pjq.46.2019.06.20.06.53.59; Thu, 20 Jun 2019 06:54:14 -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=KlTKFNO1; 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 S1726620AbfFTNx5 (ORCPT + 99 others); Thu, 20 Jun 2019 09:53:57 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:38525 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfFTNx5 (ORCPT ); Thu, 20 Jun 2019 09:53:57 -0400 Received: by mail-io1-f65.google.com with SMTP id j6so1777772ioa.5 for ; Thu, 20 Jun 2019 06:53:57 -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=X0vIXNw6IkK7+noGSyo5S+Vhxo01kIr5An5KCT/yZtQ=; b=KlTKFNO13ZwaLx0eExtpcBtMCOu5xdOL29sS9i/Lyz6IO//LHdBSWp6aDwUbq+n9F1 CABMLheQqbvmE5ZRnv+i+gi4/MHqWbiX45/2e6DMzj3X0aSKoyPMgo5TlAo4BpexecDN ymOq+dE9aGEwWraSCjCtIZgHBcqKFrGsoynePjm74o6khNuewS+AAEv8Kk/qKgGzWR51 o9QpnZnKQy4bNCR4JxzrIbLNRvN24VAfDYzsTMCotz2YV3q/Jh9STqEyYd+AT8YfQ8yt Pn7sHwsODlaIpM04IViHyrtMB1aannx5L184Oh9qrVz82MlLAVYhG+ZCQjJC8PHxdv4g 8lQg== 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=X0vIXNw6IkK7+noGSyo5S+Vhxo01kIr5An5KCT/yZtQ=; b=P2h7SAn7qgafNm+BXFvaZNIKy0XO42LQ3y/KmzCKkBsplHhdTeYxiurI2ULgREtRJO i0Sks1gtFuVa95WcQKvEuDlTjlJsBeUfcvt2Pxr2is6eArQPUumTiZpygVIfpecAiEKE RhKD5KXpX6gmKGiWJ0RgeG1hc0dbf88C4bJDsGGHulzhpp57dwgpTUXbhBZazDLaF/cY MOUogAshkFwMwzQQOgKYoRLp9M45+BeZqAUtgBPqeQ+wSsjGDEaIpxKmkYDPtTAODTOi Aax406TU4ApX8P+g8IW76y3O5pVjQqKkEVJS2+ISsKfBVSqFmmkVbTGDnnNcmNbsgHEy meEA== X-Gm-Message-State: APjAAAWhTP7HeBgFXU0EzLKbcn5bKFEVXGuSA8PbqHFFiDGRiVPvf9BA zQwsZA/d9+N/QSBwloiEnKup4PrRJiRY3l/jJeEl3Av9XBQ= X-Received: by 2002:a02:3308:: with SMTP id c8mr35402333jae.103.1561038836657; Thu, 20 Jun 2019 06:53:56 -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> <20190620134045.fncibzc7eyufd5sj@gondor.apana.org.au> In-Reply-To: <20190620134045.fncibzc7eyufd5sj@gondor.apana.org.au> From: Ard Biesheuvel Date: Thu, 20 Jun 2019 15:53:45 +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:40, Herbert Xu wrote: > > On Thu, Jun 20, 2019 at 03:02:04PM +0200, Ard Biesheuvel wrote: > > > > 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. > > Well whatever we do for ESSIV should also extend to other IV > generators in dm-crypt so that potentially we can have a single > interface for dm-crypt multi-sector processing in future (IOW > you don't have special code for ESSIV vs. other algos). > > That is why we should get the ESSIV interface right as it could > serve as an example for future implementations. > > What do the dm-crypt people think? Are you ever going to need > processing in units other than 4K? > We'd need at least 512 and 4k for dm-crypt, but I don't think the sector size is limited at all tbh