From owner-freebsd-arch Thu Jun 8 14: 0:10 2000 Delivered-To: freebsd-arch@freebsd.org Received: from grimreaper.grondar.za (grimreaper.grondar.za [196.7.18.138]) by hub.freebsd.org (Postfix) with ESMTP id 746B837C09B; Thu, 8 Jun 2000 14:00:01 -0700 (PDT) (envelope-from mark@grondar.za) Received: from grimreaper.grondar.za (localhost [127.0.0.1]) by grimreaper.grondar.za (8.9.3/8.9.3) with ESMTP id WAA01487; Thu, 8 Jun 2000 22:58:43 +0200 (SAST) (envelope-from mark@grimreaper.grondar.za) Message-Id: <200006082058.WAA01487@grimreaper.grondar.za> To: arch@FreeBSD.ORG Cc: bde@FreeBSD.ORG, dfr@FreeBSD.ORG, pkh@FreeBSD.ORG, jeroen@vangelderen.org Subject: (3rd iteration) New /dev/(random|null|zero) - review, please Date: Thu, 08 Jun 2000 22:58:43 +0200 From: Mark Murray Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG (Some more improvements have been done - 3rd iteration) Hi I have finished doing a MI /dev/null and /dev/zero, and I have got a new /dev/random. I'm looking for reviewers. The code is in http://freefall.freebsd.org/~markm/. There is a tar file and diffs (all for the sys/ area). Some other supplementary patches are needed in userland, these are not included. I like to think that this is a commit candidate. Please review as such. NOTES: 3rd Iteration Improvements: o Jeroen van Gelderen properly credited, as I stole^wused a lot of his very good ideas. o Much better module system (no SYSINIT, rather DEV_MODULE). o In anticipation of different cryptosystems, use Blowfish instead of SHA1/DES3. I am open to the use of other algorithms; I used Blowfish because 1) its already in the kernel and 2) _I_ have not yet seen a decent cryptanalysis of it. (This may change) o Add the beginnings of sysctl(3) framework to tweak the running Yarrow algorithm. 2nd Iteration Improvements: o /dev/null and /dev/zero or no longer optional; they are "standard". o /dev/zero uses malloc(9) to get its space, not a hard-coded block of zeros. Malloc is done once; at device startup. Original: o The devices are (can be) modules, or by setting options, they can be hard coded into the kernel. I would like to make them autoload somehow, but I'm not sure how. o I'd like to make the devices "pseudo-devices", rather than options. Comments? o The random number generator will give random-looking output, but does absolutely no harvesting of entropy at the moment. Because I want it to be a loadable module, I need some way of registering the entropy harvesting routines. Something like weak-symboled routines that are overridden when the module is loaded would be ideal. Suggestions? o I am using Brice Schneier's "Yarrow" algorithm for the RNG; I have only supplied enough of it now to give "sort of" random numbers. As I solve the harvesting problem, I'll improve on that. o The RNG is slow; the others are much faster than their originals. o I intend to use sysctl(9) to set most of yarrow's "tweakables". Thanks to Jeroen van Gelderen for some excellent ideas on optimization! M To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message ------- End of Forwarded Message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message