Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1495026rdb; Fri, 1 Dec 2023 20:32:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IE78NHXzBRXDfFVGNF7ln8TpxkQKbIpfUcKrGR8VT4LBaLnbjz8D7hB5mI8kpoYdgltP+KR X-Received: by 2002:a05:6a20:dd92:b0:148:f952:552b with SMTP id kw18-20020a056a20dd9200b00148f952552bmr717216pzb.51.1701491564395; Fri, 01 Dec 2023 20:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701491564; cv=none; d=google.com; s=arc-20160816; b=zDAm+KaUJJoWuyCiad58ieOOJiunudYaFhw/AOPp4Rl8L9JqADuJxhkMEIcrTQ/UhH ZY/CWVtQxJjrqdofJY3VoERLGRZpbJ6908Jj1UMFwxtjxdpiGPOn3toPsj2PI81MG7G5 lzCwy6vya7uOcb7DbbytTWkMmYMuJlLr76mlXoU5dMBFEG8h535gqiYicg1Mu0Y+xPVk taJv2oj3U0rvjWWBeRUWnRN55d2RSNMl8IEnbOlbi70V4nqOExAObHyoW6Kc51NZFy8z 93dwz2zWFPrzrVsNKar+6j7wSDETQVrNDeza7zAntc/7Q6hje3aQqMzV2bfGX9D/hXR/ zFqw== 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=NXqB/gYEWEhvGTWG16yo5MdRrm8tQVGiSqE5pjPtUds=; fh=zuCzOhceXKdBBMBy2HQheaZN/xzO6BMDtt5rCUhZMIw=; b=lhZ2lqWYPRsX4Nc4pjMLY+MN7wFAbbKWpl1+ja3XEuwoYQh477P9baIKHxh52HLOek 3FUekhJiNz2J/ezxrn833UjvOkh9o4ab8p7X2BHJpKTuPlCL2RXQzJXVIluRrGYkjnw6 HMQ6UlfTMTtJ/ipKuaVOoFrI/83CNjHCFyS/V48Ga3NdrY9M9/fa/Qg7yKV4AxanCtPI yf2ZfNgatnTlcP2u3dTKqrJxXpkCjvfPa8YZ3yNsru27P3IKQe0Idqx2NwLc9wWCdTyj euYwO69h6C49zKQEUFDMjEh/HbAl0dKMzy5aZt3kqk0EdF+gwYztDkkin5xo5uDGzCwS FXKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-494-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 d17-20020a056a00245100b006b9fd40d6cfsi4501599pfj.216.2023.12.01.20.32.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 20:32:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-494-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-494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-494-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 A2567281550 for ; Sat, 2 Dec 2023 04:32:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6649DBE67 for ; Sat, 2 Dec 2023 04:32:43 +0000 (UTC) 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 842301B3 for ; Fri, 1 Dec 2023 19:49:14 -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 1r9H08-006116-28; Sat, 02 Dec 2023 11:49:09 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sat, 02 Dec 2023 11:49:17 +0800 Date: Sat, 2 Dec 2023 11:49:17 +0800 From: Herbert Xu To: Eric Biggers Cc: Linux Crypto Mailing List , Ard Biesheuvel , Vadim Fedorenko Subject: [v3 PATCH 0/4] crypto: Fix chaining support for stream ciphers (arc4 only for now) Message-ID: References: <20230920062551.GB2739@sol.localdomain> <20230922031030.GB935@sol.localdomain> <20231117054231.GC972@sol.localdomain> <20231127222803.GC1463@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: v3 updates the documentation for crypto_lskcipher_encrypt/decrypt. v2 fixes a crash when no export/import functions are provided. This series of patches adds the ability to process a skcipher request in a piecemeal fashion, which is currently only possible for selected algorithms such as CBC and CTR. Herbert Xu (4): crypto: skcipher - Add internal state support crypto: skcipher - Make use of internal state crypto: arc4 - Add internal state crypto: algif_skcipher - Fix stream cipher chaining crypto/algif_skcipher.c | 71 ++++++++++++++++++++++- crypto/arc4.c | 8 ++- crypto/cbc.c | 6 +- crypto/ecb.c | 10 ++-- crypto/lskcipher.c | 42 +++++++++++--- crypto/skcipher.c | 80 +++++++++++++++++++++++++- include/crypto/if_alg.h | 2 + include/crypto/skcipher.h | 117 +++++++++++++++++++++++++++++++++++--- 8 files changed, 306 insertions(+), 30 deletions(-) Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt