From owner-freebsd-hackers@freebsd.org Mon Dec 7 08:37:46 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AB4647BAAC for ; Mon, 7 Dec 2020 08:37:46 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqGsQ2T4gz4WFw; Mon, 7 Dec 2020 08:37:46 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from [IPv6:2a02:8011:300b:42:956d:343c:6661:5533] (unknown [IPv6:2a02:8011:300b:42:956d:343c:6661:5533]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: markm) by smtp.freebsd.org (Postfix) with ESMTPSA id CED5D1F8E; Mon, 7 Dec 2020 08:37:45 +0000 (UTC) (envelope-from markm@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_816BA5CA-C7CD-4F62-AF29-5BB4C6521CA0"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: arc4random initialization From: Mark Murray In-Reply-To: <20201206153625.13e349a8@bigus.dream-tech.com> Date: Mon, 7 Dec 2020 08:37:42 +0000 Cc: freebsd-hackers@freebsd.org Message-Id: References: <20201206153625.13e349a8@bigus.dream-tech.com> To: Dave Hayes X-Mailer: Apple Mail (2.3654.20.0.2.21) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 08:37:46 -0000 --Apple-Mail=_816BA5CA-C7CD-4F62-AF29-5BB4C6521CA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi > On 6 Dec 2020, at 23:36, Dave Hayes wrote: >=20 > So security-wise, just how bad is it to be improperly seeded? If I = cannot get > a valid entropy stash at boot time, can I delay the need for it until = I can get > a writable filesystem up and running? >=20 > Thanks in advance for any cogent replies. This means that the random(4) device and relevant infrastructure like arc4random starts up in an insecure state and is not to be trusted for = e.g. generating SSH keys. After you have used the machine for a while (exactly how long = "depends"), it will reseed itself and become secure. Essentially, expect every boot off a DVD on the same hardware to reuse cryptographic keys and therefore be insecure. Once you've installed on some R/W medium and rebooted, the necessary entropy will have been stashed for you, and the first SSH keys will be generated properly. M -- Mark R V Murray --Apple-Mail=_816BA5CA-C7CD-4F62-AF29-5BB4C6521CA0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAl/N6dYACgkQQlsJDh9C UqB9ugf+Oiy1edwgcZTasII/+42wtdkhq44/xp6PMi3a0jmyxw6EsaD+CW7ET474 x87V4SVP/2DTgqW0ljtK0sinYB7u1BdP3NXPk0x0Bs/U18BJ6K+COcmDexx2HsMg Lyp9h16a94C9GuHVnxxSBFdKYENaoWCQksVV6HwkZxK2xFIpLcyrWg2sR4S/qUVV dc+miQ5k2mC3ubte8lyc36zwSEXR+XNR04e+MKe64tyfmddLzdlbLdWOPHXIKyPv Na/IaQB6lJIbbpUUh7oNAeI9xjdkW5fIoTZXwDN6/jfoioiJoqHe32eDND1NX05E TWMuDQTUllkKrxOedgNkFX4Ht3SMsQ== =cJJt -----END PGP SIGNATURE----- --Apple-Mail=_816BA5CA-C7CD-4F62-AF29-5BB4C6521CA0--