From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796366068; b=3yN+HxbC7uxB1tmWMbNt4M7N7LlK3cGBnZ+pQz6Igomv/LfPCGqJiRH87fiY84pFh4FM VJDLKzR91phFuglhMl+3qU5CThz+9J7hfgVegRv2ZIQMHHmgiUzPrL73QVUGTl5xdb8Vn 1Dt27C4BWsQ7dT6tIZzj4/Ccy42vPyrh1qB9cqtWxyUoO5ztGuDPsLqG3A3PJvqCkimx5 kCgUtNZ1Lw9DE62TxsusuQURQJ9j3BqzkqdjOkjhA7oXz8V+AOQuyCJUMsq43Bp1FDRMN IM0x356AxvBFGhpykEXSF87mF41/Cn1y1tezEaCixZYZYHB0XqxAfiqMN3eNap+DF/g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796366068; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=+mzL4xAT4RIEc45k/YgTSNoPjnVYRkZc/kiqmaImSYA=; b=CacJYL1SHdPlreP0pLYKuVEr0BYt4aWCH3Ki2IuHrP+9qWKCgiBiLNM/m5EVvjvtmlqg deSxkNVdi6AzkEQ62qBWih+iVxYNmbG+R4nbH3UtvEiBlQ+AuxWeYJ0+PwL4gIEIJlOGE TE4lthQzrsRb8JvkKuqDUt49kApcsEqzzZZEvJat9eKkmRauFNZVOorhhdHfzsOz/GVDr y83GCSXUrGOkD/OP0SRBThIRRlZS4q1hHVMvnS1Pu8AK5kbGTSEP4uxAgnCD7TLl6OofP wf90s8dvk5rFRB6y54Nfv+/NJmrAUhLjjJkuW+mJpe2QZEwiHFJEoDBl5EkTEaW4WSw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YPw1sjyZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACCD7606A32F; Fri, 4 Dec 2026 06:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YPw1sjyZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5010F1F000C2; Fri, 4 Dec 2026 06:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796366068; bh=+mzL4xAT4RIEc45k/YgTSNoPjnVYRkZc/kiqmaImSYA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=YPw1sjyZYU0NPYW12QSSueH57yXaauRZjHH7UuCG7o73pBVjc/44ByIQ5vA9DqraT HlhWVgmOSzykfbr/9ju1ai4O+p0pabiDqyrNz3N3uRKFRhRbTW/A9YqsDC//pkK9Cf L+qcIVXY8cVdsw52T8+3aZy+DV49Qgx4FbpO3pMoAZC2BULe7v09TSsWtn6+e7+GzP 7NxRBYuWO7qONZBBxzvER2PheWS3BPyvFEA9G0q4Y67ORDU6tdkiwpY2gfcCSWCZj3 25hYgFNfLGDGXrViHXjZhDEzZraE55jKs7KG6bkMNI/lTHR6ckHZtPpVEgheCwjx8F y6kGI7guqdpkw== Date: Thu, 3 Dec 2026 22:34:26 -0800 From: Eric Biggers To: Laveesh Bansal Cc: Herbert Xu , "Jason A. Donenfeld" , Ard Biesheuvel , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] crypto: chacha - Consolidate XChaCha initialization Message-ID: <20261204063426.GA2137@sol> References: <20261204014328.89592-1-laveeshb@laveeshbansal.com> X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261204014328.89592-1-laveeshb@laveeshbansal.com> On Thu, Dec 03, 2026 at 05:43:28PM -0800, Laveesh Bansal wrote: > XChaCha initialization is repeated in three places. Each one derives a > subkey with HChaCha from the key and the first 16 bytes of the nonce, > then builds the ChaCha state from that subkey and the last 8 bytes of > the nonce. > > Add xchacha_init() to and use it in all three. No > functional change. > > Signed-off-by: Laveesh Bansal Reviewed-by: Eric Biggers - Eric