Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp324601ybk; Wed, 20 May 2020 00:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuZn6TFUTjdngO+c2DD2Sir1YlUqxAScnyAKDw0CEe84Kb59zsdGB7nuGzF/brtGPEO16H X-Received: by 2002:a50:c90b:: with SMTP id o11mr2029162edh.311.1589958625866; Wed, 20 May 2020 00:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589958625; cv=none; d=google.com; s=arc-20160816; b=qt5+pHxLT3y+M9FEFHav2BH1wyJYVq/F4lLZYYLuTjSwxWL2QZNYbv3YmAMsnWXy6S gaZC+v1eh/anL9F9FOwWGgkVF+cReIDNI0AdFQcxwPP++U1wvEEARJftX4pZKqfbMOq1 oIFJgbY/1QDWVebOIWLMG3iFEGeXoa/o7PIkVIugG3Roxq1BpaaJjwpc4zHn7sNuqeZt QYBYKYZgSTpjSyyYiF8dHvziEW/biHVymvDmjDhL+RbY/uieXdNAax6WDdfbmuX+Z/Fn XCm8m1wo8kS69GToyKDWG3O6rNhZ3cl47cxwjwmm3/4qmJS9CIU80MAyaSd3A+6EM7ry 2aQQ== 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=4sY4q9CroctrXjv/UwpUkw02mR25DQOr6OzfqIelbjE=; b=ckDEPTfq3N2ZgwAdC6TTM0QrlL4XwUhSZjjuJljOokOSmapY1WvONM7LJllIwLNnUf sumx4hqZSQNZKDXRp6YUO6X2iDfj0WgExRVEJGPlouKLgEBtkfBEIMStGNBTKw2rLDaZ TqclkkFrTLYCz7JubIdOVcIaI0+rNW6/OBF7AoP//wRs2nY0u5OHkgEeVBfGaLo2leR2 8gNHbcyfqc8nRET1YJiCYUhIoIsLVN+O8LhCYAZIfdGsw4tnPDxpq7+i/rXkBgnvtq+I aySwqJhLeEde2gJ2ba+M0PM+C14L3rY2xpm6usEJ+yiWTHJGY2IRwtoX0vik9lJivAGQ f0xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RJO6YFoh; 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 c9si624367edx.597.2020.05.20.00.10.01; Wed, 20 May 2020 00:10:25 -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=RJO6YFoh; 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 S1726369AbgETHJ4 (ORCPT + 99 others); Wed, 20 May 2020 03:09:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgETHJ4 (ORCPT ); Wed, 20 May 2020 03:09:56 -0400 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BCEC206BE for ; Wed, 20 May 2020 07:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589958595; bh=4sY4q9CroctrXjv/UwpUkw02mR25DQOr6OzfqIelbjE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RJO6YFoh2r5xPKUS6+X6N3myoxI8Wb9pyEgiYSYFMZF8Rp6LabwukwbmDBcQofqA1 c9JyndZq0tRfuaoGNGRYAkvPltuf4oeg5/BA9O4tA3yILprA1eofYt718Ob2Shbe6h 9sC95/7QYTZgKKPwqpNa2CwHm3f1k4WZ1EKysEAw= Received: by mail-io1-f41.google.com with SMTP id x5so2033756ioh.6 for ; Wed, 20 May 2020 00:09:55 -0700 (PDT) X-Gm-Message-State: AOAM530QjXg2IxE2Cq+uSor5vGBYK/y31u2gPdCehbskImiOsJjCMBhM pVM7YjuvEFd8WelGNPBqpL4JU1QVIkiK7kkl/Aw= X-Received: by 2002:a05:6638:41b:: with SMTP id q27mr2996869jap.68.1589958594942; Wed, 20 May 2020 00:09:54 -0700 (PDT) MIME-Version: 1.0 References: <20200519190211.76855-1-ardb@kernel.org> <16394356.0UTfFWEGjO@tauon.chronox.de> <2010567.jSmZeKYv2B@tauon.chronox.de> In-Reply-To: <2010567.jSmZeKYv2B@tauon.chronox.de> From: Ard Biesheuvel Date: Wed, 20 May 2020 09:09:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr To: Stephan Mueller Cc: Linux Crypto Mailing List , Linux ARM , Eric Biggers 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 Wed, 20 May 2020 at 09:01, Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 08:54:10 CEST schrieb Ard Biesheuvel: > > Hi Ard, > > > On Wed, 20 May 2020 at 08:47, Stephan Mueller wrote: ... > > > The state of all block chaining modes we currently have is defined with > > > the > > > IV. That is the reason why I mentioned it can be implemented stateless > > > when I am able to get the IV output from the previous operation. > > > > But it is simply the same as the penultimate block of ciphertext. So > > you can simply capture it after encrypt, or before decrypt. There is > > really no need to rely on the CTS transformation to pass it back to > > you via the buffer that is only specified to provide an input to the > > CTS transform. > > Let me recheck that as I am not fully sure on that one. But if it can be > handled that way, it would make life easier. Please refer to patch 2. The .iv_out test vectors were all simply copied from the appropriate offset into the associated .ctext member.