Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2616295rdb; Mon, 4 Dec 2023 02:42:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHArSCD20hcvgTtyDTxhRJsaUxzVvB4ixVSZUOZW6uA13XUqqdYITKuz+EVRnT0/KZdAjYt X-Received: by 2002:a05:622a:106:b0:425:4043:8d58 with SMTP id u6-20020a05622a010600b0042540438d58mr2022079qtw.115.1701686531389; Mon, 04 Dec 2023 02:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701686531; cv=none; d=google.com; s=arc-20160816; b=tKiPl2X09UztRpm/PSv63pjqXR3CIAn8WjI8uXMHLtHLf5N+UngwLQi9ypsqyT3gxP Zf4a1lDvleRBNybhdwy2wAdnJFycGRFBZ3iEc54s3F4p/qQN4BQw9INl+IWTShrdxuVf d7V7m5MK2EFYs/hhtDLaUCfN1JE45+FA+ua+42SYX18duu17DqIXKCwvUF3iOGvC/EG+ +Xz+tFbST81jytqSSEFITPLeVe0cjiGndWX+YKk9WJWyoF96I5KUW9qNTFHoz6+jSpxl EMyFEZTy1TLatgrByaVe4awg4de+k33hb0y6QGMzxVHu/YgSsXooY48wUgDUotLKwEDg ib2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=BwdZDQNE6NwHTCAOnOmqkJq+1IRiJC5XwuSTturBP44=; fh=+dXAGodCsr5ffhcv0knwAihLdCWV/dGbkw0OVCNn9eA=; b=pbSE2hC1mRXE5JxNJw7WDJFrldwRAsJeBek+AVDVYPeySq+BV14sFiXep1IMn9Nq2V Q6nPEZ1nPT7VZeRbDG6QCD9ouCZGi888ngSsq2/735MN1idNZFZcC4Na34Efe0/Dx2LB /7ebw8QbNAzwlbqV9n6CMkwFzT56d8zuG6ZPd9LCdaw7NX+Iax45hgHF21kCT404+tlr fH3lWu3jKR5HftjkvzcgX2qdefHzCqWc6yzTibUBwCqSTzo9556xnLmsuIOD6bNbr8HD wMFjku16pVmOj7cDgxxgXQXMfmZGQ9ioSbyK069kAGz1WmihNUVOjHDNN/qpPWnZ6D73 bj9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=RYBrxAUd; spf=pass (google.com: domain of linux-crypto+bounces-533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bq15-20020a05622a1c0f00b0042374dec20esi9349229qtb.681.2023.12.04.02.42.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 02:42:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=RYBrxAUd; spf=pass (google.com: domain of linux-crypto+bounces-533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 13BD81C2039E for ; Mon, 4 Dec 2023 10:42:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76A80224C3 for ; Mon, 4 Dec 2023 10:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="RYBrxAUd" X-Original-To: linux-crypto@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0F0C19B for ; Mon, 4 Dec 2023 02:24:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=BwdZDQNE6NwHTCAOnOmqkJq+1IRiJC5XwuSTturBP44=; t=1701685469; x=1702895069; b=RYBrxAUdll8ZQfpCUIcdW2xtXsq0rhEe82pywfntLO/PFJl QsvzbCJV+wGNOO5/su8pWTehJv3H3lcHxRyUeAhxBhI/owd3VX+nY9+PJkadFyhaCsYt6LGVfjcuW yrIrBchaa4QZuh+k3jsTPULjOn4o4MoAjjWNPaJekhvpIlLqLT2eQql7oc6vaEuNkztfk3ftOqSXM BAUIGkg1zNIa1bqxZ7L6A+719nRFhHBaznsmHUJAfpgr6YOouXiHvEkwtGu2mCfIJ4UwABO8HGwwI h/Le5FipVJV8Zw6eb5yDXADc0J/lXmYO05/GB3NdOfdELTiVPxBoCV+qJ4oDQPag==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rA67m-0000000EwVY-3LbT; Mon, 04 Dec 2023 11:24:27 +0100 Message-ID: Subject: Re: jitterentropy vs. simulation From: Johannes Berg To: Stephan Mueller , Anton Ivanov , linux-um@lists.infradead.org Cc: linux-crypto@vger.kernel.org Date: Mon, 04 Dec 2023 11:24:25 +0100 In-Reply-To: <1947100.kdQGY1vKdC@tauon.chronox.de> References: <7db861e3-60e4-0ed4-9b28-25a89069a9db@kot-begemot.co.uk> <8ddb48606cebe4e404d17a627138aa5c5af6dccd.camel@sipsolutions.net> <1947100.kdQGY1vKdC@tauon.chronox.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 (3.50.1-1.fc39) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned Hi Stephan, > The reason for the Jitter RNG to be dragged in is the Kconfig select in= =20 > CRYPTO_DRBG. Yes, but you can't get rid of DRBG either. That'd require getting rid of CRYPTO_RNG_DEFAULT, which means you cannot even have CRYPTO_GENIV? Hmm. Maybe it _is_ possible to get rid of all these. > Why does the DRBG require it? >=20 > The DRBG seeds from get_random_bytes || jitter rng output. It pulls an eq= ual=20 > amount of data from each source where each source alone is able to provid= e all=20 > entropy that the DRBG needs. That said, the Jitter RNG can be designated = as=20 > optional, because the code already can handle the situation where this Ji= tter=20 > RNG is not available. However, in FIPS mode, we must have the Jitter RNG= =20 > source. >=20 > That said, I could fathom to change CRYPTO_DRBG to remove the select=20 > CRYPTO_JITTERENTROPY. But instead, add the select to CRYPTO_FIPS. Well, CRYPTO_FIPS also would break our testing, since we still have to support WEP/TKIP (RC4-based) ... > This change would entail a new log entry when a DRBG instance initializes= : >=20 > pr_info("DRBG: Continuing without Jitter RNG\n"); >=20 > I would assume that this change could help you to deselect the Jitter RNG= in=20 > your environment. >=20 > Side note: do you have an idea how that Jitter RNG perhaps could still be= =20 > selected by default when the DRBG is enabled, but allows it being deselec= ted=20 > following the aforementioned suggestion? Well it _looks_ like it might be possible to get rid of it (see above), however, what I was really thinking is that jitter RNG might detect that it doesn't actually get any reasonable data and eventually give up, rather than looping indefinitely? It seems that might be useful more generally too? johannes