From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.16 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796112522; b=jV7/AcOxKZhYWHdJkyS6VHqzL4vdC6A+MmYUHb4EEqQLHAgoWOavsrSI5sesiOcv9j4B Jml7h56qQK+dO/ggXOxytXi9VG1EH0YPy7QZwDzKSeCyAdS9Upb2Aa9vW1B25QJLlO6gS 57XFJnESk7MJXxmZhb1zfb6xmFzD9JGDPytyHneOtp3H/fGosLFqSqu1Y3HK0UlRdIPE6 pO+mTD5LHYHmKw4opAqnM/o7G+p4HAB2gOsU0OWFnqKQW5AqI6jj0eQ7KN8ndi/jBqL+/ niyfk82cJTEc4qLFRQuRW6U1o+A5T4a0rFkzwlZXO5MCVM+Jyb3q7bZL4A+X/gmJ/Vg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796112522; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-ZohoMailClient; bh=og9pX7fR7nDxJDrg414f5XVZFH3A+KymDUIwtDL4CNA=; b=qX/E5vxg1nrvQCXCuNHWqy+xaf1CQhWrvBPsu6szdtuJiiFY2hGgjqjC3GdGKz1HCGhA 9oit0n9GBAlH0HMKjC8aBf+cJV97iAw7ExUCo2E/xsZb7BPCoulqU7v8AP+NxyrhOa/bg kG3rbI60+WOFy6XK7ZtvoucTbKXWSuuvlqi1Nwo9hmaUgMWtQqWkTMHT7ErwOGBZGksyJ Yk1SPeJ9JemwJf6yHbcZhlN+T5ieQStgYjHfK3Q7U00laPf/jj5eWiq3T4rc5gQR8YbuV ch0cwlum4sIfw1ZTMvRZIsdb3NNgyR6ik7Cm7bMPZQdaah8SI9MYlJkxZlFHFsXSXrw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=laveeshbansal.com; spf=pass smtp.mailfrom=laveeshbansal.com; dkim=pass header.d=laveeshbansal.com header.i=@laveeshbansal.com header.a=rsa-sha256 header.s=zoho header.b=leeYuyrF; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.16 Received: from sender5-op-o16.zoho.com (sender5-op-o16.zoho.com [165.173.182.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F492606A31A; Tue, 1 Dec 2026 08:08:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0F492606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=laveeshbansal.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=laveeshbansal.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=laveeshbansal.com header.i=@laveeshbansal.com header.a=rsa-sha256 header.s=zoho header.b=leeYuyrF ARC-Seal: i=1; a=rsa-sha256; t=1796112512; cv=none; d=zohomail.com; s=zohoarc; b=Od6ey5ie5vD3ThJ7acq7R5m2q5TKUcufaXVnCsiXPxkuHAcVFOugXcUwUEoJJ4b2w3YKx+WGlFYkkWBecUMJdeN0dzQGVLOVgwgZetANWeP3fD5HiJoIPq6QMtkw33er9tTBfi0Qa7mdoBPNxnA7WmnqfANJhkVI+JAWd/m2qVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796112512; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=og9pX7fR7nDxJDrg414f5XVZFH3A+KymDUIwtDL4CNA=; b=ANXXIfStkgFTFiqk8U0zeHaX/U3T+5gV6EfYDZ/BhrpIVu0tWrhuYXhY0di0hgjxO8NeR2SrvB7L+BK3QHRoQ7WyWdZ7V/AiNUV9ZH3hDXe3Gw4qL1RO9GjUD7oHgGNhGVbIVRWYbEPycGHdrfTFuucaget2DnZBsE3M3FzrOsg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=laveeshbansal.com; spf=pass smtp.mailfrom=laveeshb@laveeshbansal.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=leeYuyrFxpEd9OX82+ACryndfuGgv0rYAdJIXC/KkMSCOrPvzB8hZVI3Ar5fafOhmn4BpzPbhSGxY3gzhaNKUWuIAcAs4l4yN6P1i9OgGfjX5C50RLQInfm+I3gyR4j+T/5WsDLCddp/Cbdd2aZOJDTidCq6Jqjh+E7VZ5HnBQU=; c=relaxed/relaxed; s=zoho; d=laveeshbansal.com; v=1; bh=og9pX7fR7nDxJDrg414f5XVZFH3A+KymDUIwtDL4CNA=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796112510153650.0844596565981; Tue, 1 Dec 2026 00:08:30 -0800 (PST) From: Laveesh Bansal To: Eric Biggers Cc: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] crypto: adiantum - Use the ChaCha library Date: Tue, 1 Dec 2026 00:08:23 -0800 Message-ID: <20261201080825.56171-1-laveeshb@laveeshbansal.com> X-Mailer: git-send-email 2.54.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External This series makes adiantum call the ChaCha library directly instead of going through a crypto_skcipher child. This came out of a conversation on another patch: https://lore.kernel.org/all/20261127184407.GB1974@quark/ v1: https://lore.kernel.org/all/20261130055539.8278-1-laveeshb@laveeshbansal.com/ v2: https://lore.kernel.org/all/20261201043945.50022-1-laveeshb@laveeshbansal.com/ I used an LLM for research, the first draft, review and tests. I did the final code changes and reviews myself. Changes in v3: I addressed feedback on v2. https://lore.kernel.org/all/20261201051752.GB7060@sol/ - Dropped select CRYPTO_MANAGER and sorted the selects in Kconfig. - Made 'iv' in adiantum_setkey() static const. - Moved the stream cipher step under 'if (bulk_len)'; also used the src and dst local variables there. - Set .base.cra_reqsize in the skcipher_alg instead of calling crypto_skcipher_set_reqsize() and moved setting tctx->nrounds into adiantum_setkey(). - Wrote the two skcipher_alg structs instead of using a macro. Changes in v2: I addressed feedback on v1. https://lore.kernel.org/all/20261130194303.GB16775@google.com/ https://lore.kernel.org/all/20261130194012.GA16775@google.com/ - Merged patches 2 and 3. - Updated adiantum to not be a template. It registers two skcipher algorithms -- adiantum(xchacha12,aes) and adiantum(xchacha20,aes). - In-place requests under CONFIG_HIGHMEM map the memory only once. - 'buf' is zeroized. - Based on the current cryptodev master because the base in v1 -- commit 9fb9278d13dca -- is no longer in it. Laveesh Bansal (2): crypto: testmgr - Add Adiantum vectors with a partial last ChaCha block crypto: adiantum - Use the ChaCha library crypto/Kconfig | 4 +- crypto/adiantum.c | 372 +++++++++++--------------- crypto/testmgr.h | 644 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 803 insertions(+), 217 deletions(-) This series applies on top of the following: - setkey: https://lore.kernel.org/all/20261125013553.94480-1-ebiggers@kernel.org/ - aeslib: https://lore.kernel.org/all/20261125032407.126634-1-ebiggers@kernel.org/ base-commit: e1ec0b1e859b0f2261d64b3db95991c2da627af4 prerequisite-patch-id: 5268ec1436ad909487f950765a39a0cc6eac0c6a prerequisite-patch-id: 0edefdce5d51065803ab84e3492634dcb9e0e53e -- 2.43.0