From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87C4FC433F5 for ; Mon, 21 Feb 2022 03:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244728AbiBUDkp (ORCPT ); Sun, 20 Feb 2022 22:40:45 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiBUDkn (ORCPT ); Sun, 20 Feb 2022 22:40:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03BF151331; Sun, 20 Feb 2022 19:40:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AC65AB80DCD; Mon, 21 Feb 2022 03:40:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F633C340E9; Mon, 21 Feb 2022 03:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645414819; bh=mOvCX6u+abSiUuhsoaVypqdnne4NQ17bIT2BYtNcIcw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mmEib9tLjEKL1jLwoEJX0pIWeCdntkr7n9x3segpilyuR8R/PidvhHEopoAC0ghvO pbnde5MzWkegGtyw17cYdyBfrWQ6QHiFtRiTlOyRwAPfGQMETVk+vzVJKhVMw3xWQ4 k4d//5nHt/wJaY/BAAcZYrUs6lYgG5NDLaZXBEvZZTUCGtEi+8KiCG3LmOE7aOX96s FNoEDmtK5zhVNdZPVSusj6bUX4CDTpEzWYjNap9z6axsdRBjwG4jtzuQQopNs/lEfR 0ZLQc2RqG4E+SdtJkD7lSbcT/AdZjefrsEvaA3x1X9YHfEvvTC30PzQOHMAizhyiOr A0J3fEGYufKrw== Date: Sun, 20 Feb 2022 19:40:17 -0800 From: Eric Biggers To: "Jason A. Donenfeld" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, tytso@mit.edu, linux@dominikbrodowski.net Subject: Re: [PATCH v2 8/9] random: use hash function for crng_slow_load() Message-ID: References: <20220209011919.493762-1-Jason@zx2c4.com> <20220209011919.493762-9-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209011919.493762-9-Jason@zx2c4.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Feb 09, 2022 at 02:19:18AM +0100, Jason A. Donenfeld wrote: > Since we have a hash function that's really fast, and the goal of > crng_slow_load() is reportedly to "touch all of the crng's state", we > can just hash the old state together with the new state and call it a > day. This way we dont need to reason about another LFSR or worry about > various attacks there. This code is only ever used at early boot and > then never again. > > Cc: Theodore Ts'o > Cc: Dominik Brodowski > Signed-off-by: Jason A. Donenfeld > --- > drivers/char/random.c | 42 +++++++++++++++--------------------------- > 1 file changed, 15 insertions(+), 27 deletions(-) Reviewed-by: Eric Biggers - Eric