From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 21:11:54 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 411B816A540 for ; Thu, 13 Sep 2007 21:11:51 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr3.xs4all.nl (smtp-vbr3.xs4all.nl [194.109.24.23]) by mx1.freebsd.org (Postfix) with ESMTP id 22EEA13C480 for ; Thu, 13 Sep 2007 21:11:50 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr3.xs4all.nl (8.13.8/8.13.8) with ESMTP id l8DLBmpX046847; Thu, 13 Sep 2007 23:11:49 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 68B27B862; Thu, 13 Sep 2007 23:11:48 +0200 (CEST) Date: Thu, 13 Sep 2007 23:11:48 +0200 From: Roland Smith To: Per olof Ljungmark Message-ID: <20070913211148.GA18194@slackbox.xs4all.nl> Mail-Followup-To: Per olof Ljungmark , freebsd-questions@freebsd.org References: <46E94F9A.6050707@intersonic.se> <20070913153630.GA9448@slackbox.xs4all.nl> <20070913173155.0bad12b2@gumby.homeunix.com.> <20070913174537.GA11683@slackbox.xs4all.nl> <46E9A455.4090703@intersonic.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <46E9A455.4090703@intersonic.se> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: /dev/random question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2007 21:11:54 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 13, 2007 at 10:57:57PM +0200, Per olof Ljungmark wrote: > Roland Smith wrote: >> On Thu, Sep 13, 2007 at 05:31:55PM +0100, RW wrote: >>> On Thu, 13 Sep 2007 17:36:30 +0200 >>> Roland Smith wrote: >>>=20 >>>> On Thu, Sep 13, 2007 at 04:56:26PM +0200, Per olof Ljungmark wrote: >>>>> Hi, >>>>>=20 >>>>> Could someone on the list point me to a document that explains the=20 >>>>> functionality of /dev/random in FreeBSD in a little more depth than >>>>> the man page? In other OS's I've looked at random and urandom are >>>>> different, here it's a symlink (talking about RELENG-6 onwards). >>>> FreeBSD uses the yarrow algorithm, as mentioned in random(4). See=20 >>>> http://en.wikipedia.org/wiki/Yarrow_algorithm >>>> http://www.schneier.com/yarrow.html >>> Yarrow is reseeded with interrupt entropy, and is supposedly good >>> enough not to require the amount of entropy to be tracked. >>> So /dev/random need not block, and there's no need for a separate >>> non-blocking device. =20 >> On the website it says that the original yarrow algorithm is no longer >> supported. It seems to have been replaced by the fortuna algorithm. >> I can't see from the source if /usr/src/sys/dev/random/yarrow.* use the >> original yarrow algorithm, or the improved yarrow-160 aka fortuna. The u= se=20 >> of >> crypto/rijndael/rijndael-api-fst.h and crypto/sha2/sha2.h seem to >> indicate the latter though. >=20 > Should I conclude then that randomness is sufficient and performance is a= =20 > non-issue? Performance isn't an issue, AFAICT. Whether randomness is sufficient depends on what you're using it for. I'd say yes, unless you want to generate one-time pads. There are some test programs that you can download to test for randomness. E.g. http://www.fourmilab.ch/random/ Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG6aeUEnfvsMMhpyURApfNAJ9nwJhqexST1uTh2rFiVt9ARb4/LQCfQ3D/ W9U0c99Gjm0hmLirReINiNE= =TE10 -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--