From owner-freebsd-hackers@freebsd.org Wed Jul 11 12:27:04 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5585D103800B for ; Wed, 11 Jul 2018 12:27:04 +0000 (UTC) (envelope-from dirkx@webweaving.org) Received: from weser.webweaving.org (weser.webweaving.org [148.251.234.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "weser.webweaving.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAF5F8F184 for ; Wed, 11 Jul 2018 12:27:03 +0000 (UTC) (envelope-from dirkx@webweaving.org) Received: from beeb.leiden.webweaving.org (5ED29A06.cm-7-3c.dynamic.ziggo.nl [94.210.154.6]) (authenticated bits=0) by weser.webweaving.org (8.15.2/8.15.2) with ESMTPSA id w6BC3uih000200 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 11 Jul 2018 14:03:57 +0200 (CEST) (envelope-from dirkx@webweaving.org) X-Authentication-Warning: weser.webweaving.org: Host 5ED29A06.cm-7-3c.dynamic.ziggo.nl [94.210.154.6] claimed to be beeb.leiden.webweaving.org From: Dirk-Willem van Gulik Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Limits to seeding /dev/random | random(4) Message-Id: <3A988D26-7B08-4301-8176-B0ED8A559420@webweaving.org> Date: Wed, 11 Jul 2018 14:03:56 +0200 To: "freebsd-hackers@freebsd.org" X-Mailer: Apple Mail (2.3273) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (weser.webweaving.org [148.251.234.232]); Wed, 11 Jul 2018 14:03:57 +0200 (CEST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2018 12:27:04 -0000 When feeding /dev/random from hardware USB devices like Bill = Woodcock=E2=80=99s design in PCB incarnation: https://13-37.org/de/shop/infinite-noise-trng/ Are there any caveats with regard to volume or speed of doing so ? Or is = it always a plus ?=20 Actual code at = https://github.com/dirkx/infnoise/blob/master/software/libinfnoise.c = line 122: if ((devRandomFD =3D open("/dev/random",O_WRONLY)) <0) .. error handling if (write(devRandomFD, bytes, length) !=3D length)=20 .. error handling And is there any case where length would not return the length written = =E2=80=94 it seems that the driver traps/ignores EINT, EAGAIN and short = writes ?=20 Or should one check the entropy available in /dev/random (how?) and hold = off feeding it until it is low enough (this is what the infinite-trng = seems to do on linux). With kind regards, Dw