Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp983337rdh; Fri, 24 Nov 2023 02:43:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IElZaE9brEMdLik5faEYaKS/1P8Be5Ry99Cvp7N1MC8jM5WnsXiWLtMaBkgMhXeuiznLRE4 X-Received: by 2002:a9d:6ac8:0:b0:6d7:ecc8:5613 with SMTP id m8-20020a9d6ac8000000b006d7ecc85613mr2519533otq.31.1700822584766; Fri, 24 Nov 2023 02:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700822584; cv=none; d=google.com; s=arc-20160816; b=bJp/s3rmB0+lM7yX5A3bNnNUdjG9j/lQOAvt+UcujrToEo6nx1DW+g0BluF7wyotJi L20M/AsuMyNgjUtvAL8AqssWoZTTGFMFTav1DoNP0d/Gz8F/5VAiYxTPH3CtdsfZinV5 /oBgzfiZGUqnMA7GoTzVyJDNsLeg2GNVnKbETBNMhr1xj3reR0COhZCRE/olwYaV4nwJ F7lF0H+Gav2c5vYeaqSolYSth15xFzbF2Mg7Vapq3SKMGhDrVSYted1uE5IpHTwCutKx es7xqZp/UlHZELKXZz5NCyv/wF9sFK+tF/NO2vhQOKKFBCVUD8YQhQquh7fiJFqZpSyw gVpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=oTlgjd11/19Zht3wnGADnuXYYIjQ8R3rMzDaxRo7cYw=; fh=gvAaTn7V2ako+socwadq3mowY+XpjEU7R+nroQHn0Qk=; b=nU93wakNUDcSwms9TDZishtzeYcA52UtylSq5LaBOi6U1ug57hp/sso69zLQcWtC5w fhnPeYNLjdAU0+tsjMmTC8UOHaxdMMfZdzAOsG/BREIOG8wQcITmMFPVLdStnInv4nHR rSs7ZkRojMTMBdHVCqjv/vFtnvPmzlB60ELBog5x00gKpBIOt+bwk2ihams3JiEc/PG/ jq1L34iIODcA3yb15TEsuGQHLj0uVC8KSuzcQniDN5uTv0cOX0rjCnfCz6D5I7qIU4Mt yUABCSDwTSHuviwFX5C2p7te1WMuTkpEM27MTYHBKGuHaKV1N2Y8PUPf3YbSk2JIoxIv m1MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-262-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ca12-20020a056a02068c00b005bdff953b76si3582746pgb.197.2023.11.24.02.43.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:43:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-262-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3A43D281878 for ; Fri, 24 Nov 2023 10:43:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9EBE1A712 for ; Fri, 24 Nov 2023 10:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5A0DA4 for ; Fri, 24 Nov 2023 02:27:20 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1r6TP2-0036OO-Gi; Fri, 24 Nov 2023 18:27:17 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 24 Nov 2023 18:27:25 +0800 Date: Fri, 24 Nov 2023 18:27:25 +0800 From: Herbert Xu To: Eric Biggers Cc: Linux Crypto Mailing List , Ard Biesheuvel Subject: Re: [PATCH 4/8] crypto: skcipher - Add lskcipher Message-ID: References: <20230914082828.895403-1-herbert@gondor.apana.org.au> <20230914082828.895403-5-herbert@gondor.apana.org.au> <20230920062551.GB2739@sol.localdomain> <20230922031030.GB935@sol.localdomain> <20231117054231.GC972@sol.localdomain> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Nov 17, 2023 at 05:07:22PM +0800, Herbert Xu wrote: > On Thu, Nov 16, 2023 at 09:42:31PM -0800, Eric Biggers wrote: > . > > crypto_lskcipher_crypt_sg() assumes that a single en/decryption operation can be > > broken up into multiple ones. I think you're arguing that since there's no OK I see where some of the confusion is coming from. The current skcipher interface assumes that the underlying algorithm can be chained. So the implementation of chacha is actually wrong as it stands and it will produce incorrect results when used through if_alg. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt