Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3645082pxj; Tue, 11 May 2021 08:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxipXSMsHlGWUvfr9JWCqoNH5cpF6d0TKDJYPc8r6DC0Xm/UTMptOIixBagecBR/91mGTur X-Received: by 2002:a05:6402:204b:: with SMTP id bc11mr37564038edb.40.1620748163326; Tue, 11 May 2021 08:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620748163; cv=none; d=google.com; s=arc-20160816; b=AV8PivhDsp21RKp8kkxh/KG7ut08tyWwNQKCKKP7qBYdJxThd+gpNSUadbSZwm1Mek tnsYX+0QPbvxKiKDqXaOe6+TBm9qmbQ7YTWbNhykIh6PjQp48m3d1zwN1IoL1Ha5vJtu Xq+fkUuQld6zaxOnymJQtU6JEwFG++WEpK14HW3Vuy+W5Rz5QYDcOGGdnsH4yinSncNM kQlKUORSupvaQ1CuPWT5v6AD8s0qC8DnrgkmaPoJ7jy6WXBZZd9dYmAiTHJ2Dq/qvmxa h8PfC3ciBXaeS77AO4c/5CXclW59fbDKaD34CUKsplJH1eRb16cR9uNquHzbss6VpHgK grqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qvGu5N9e3J5qm0k5VqgtPfsGKPldGY91CooQ0ICs9+M=; b=q7aSXCfudHy5Y9fE8RezHort5NtHzKnkiWk2BC6dMvCI1hF0XYyyxB11zx9BsA/itO lLwj9j0YTrIz0ON49wlMd9EyDvRHnlUuYbamO1pv/KvPNYyH8gj/hVkUW3Y3TpE1HAOh 00HXEzPmcjqSV8yq3L0T0Y0C2KaA1SMNmvI0/O94ZhYaDRfoDFVfGVbU6NsDcG9WHWB4 8DFBZDtltVhoEq8vR27Z32aRyQsPmzrRveIR19D+hSIPscwTp9Fr5RrDpwfC9rO/ygXx kkE9sXtq36j1IK8maX0F3x1cSiu/JYRthitFg2MzOUSNi00KrCBPVi9YWcA1l1XZ9GsF twUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V5borhno; 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 bi10si16653943edb.15.2021.05.11.08.48.50; Tue, 11 May 2021 08:49:23 -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=k20201202 header.b=V5borhno; 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 S231792AbhEKPte (ORCPT + 99 others); Tue, 11 May 2021 11:49:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:48432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbhEKPte (ORCPT ); Tue, 11 May 2021 11:49:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 14D42611BE for ; Tue, 11 May 2021 15:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620748108; bh=qvGu5N9e3J5qm0k5VqgtPfsGKPldGY91CooQ0ICs9+M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V5borhnociiZs3ZXmAyJ9i7Nci/cpDtfmpTkPWYcqegVxJqdS7/3ApHbg4N82WDx5 A51dhH/RY0f7PtG1SQ50qs3itvHSUQT3J5qfEJkTmjFq6CrdSznHZ7DU6DfBCnM5fp VfIv5WHdZTir/RbQMY2NdpzIW+B+0daMx6GWi6VNNtPSwVmbZafd34T4TMVw9boWtr UxbXuuIM/AqKrRD0Cezazs27yzqVqx6omM2xi1JnnggHuSULv491AfySGZ0Nsd37Ew 4GiIj0ZgP08cyWPisoEDDq00my2ehxbc8oyrtW+Crh7EO87XNTOc4EPEI7sRcWmul4 QipDYHpG9gFkg== Received: by mail-ot1-f42.google.com with SMTP id d25-20020a0568300459b02902f886f7dd43so4455806otc.6 for ; Tue, 11 May 2021 08:48:28 -0700 (PDT) X-Gm-Message-State: AOAM533t5xdJbxzu+TbhP+YIVZH2pgXRtGBPTomGgmGP48WJxO/yz0SG jYptaG/OSH2E7blx7I8/HkqyqoGZISYDN+ZBBxg= X-Received: by 2002:a05:6830:4da:: with SMTP id s26mr26516091otd.77.1620748107244; Tue, 11 May 2021 08:48:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Tue, 11 May 2021 17:48:16 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: or should block size for xts.c set to 1 instead of AES block size? To: Kestrel seventyfour , Herbert Xu , Eric Biggers Cc: Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 7 May 2021 at 08:12, Kestrel seventyfour wrote: > > Hi, > > one more thought, shouldn't the block size for generic xts set to 1 in > order to reflect that any input size length is allowed to the > algorithm? > I think this was discussed at some point on the list, and Herbert seemed to suggest that 1 was a better choice than AES_BLOCK_SIZE. You'd have to set the chunksize, though, to ensure that the input is presented in the right granularity, i.e., to ensure that the skcipher walk layer never presents less than chunksize bytes unless it is the end of the input. However, this is a flag day change, so you'd need to update all implementations at the same time. Otherwise, the extended tests (which compare accelerated implementations with xts(ecb(aes-generic))) will start failing on the cra_blocksize mismatch.