head	1.6;
access;
symbols
	PRE_SMPNG:1.3;
locks; strict;
comment	@# @;


1.6
date	2000.10.14.10.59.56;	author markm;	state dead;
branches;
next	1.5;

1.5
date	2000.09.10.13.56.45;	author markm;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.10.13.52.19;	author markm;	state Exp;
branches;
next	1.3;

1.3
date	2000.07.07.09.03.59;	author markm;	state Exp;
branches;
next	1.2;

1.2
date	2000.06.26.12.18.09;	author markm;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.25.10.12.33;	author markm;	state Exp;
branches;
next	;


desc
@@


1.6
log
@After some complaints about the dir names, the random device is
now in dirs called sys/*/random/ instead of sys/*/randomdev/*.

Introduce blocking, but only at startup; the random device will
block until the first reseed happens to prevent clients from
using untrustworthy output.

Provide a read_random() call for the rest of the kernel so that
the entropy device does not need to be present. This means that
things like IPX no longer need to have "device random" hardcoded
into thir kernel config. The downside is that read_random() will
provide very poor output until the entropy device is loaded and
reseeded. It is recommended that developers do NOT use the
read_random() call; instead, they should use arc4random() which
internally uses read_random().

Clean up the mutex and locking code a bit; this makes it possible
to unload the module again.
@
text
@# $FreeBSD: src/sys/modules/randomdev/Makefile,v 1.5 2000/09/10 13:56:45 markm Exp $

.PATH:	${.CURDIR}/../../dev/randomdev
.PATH:	${.CURDIR}/../../crypto/blowfish
KMOD	= random
SRCS	= bus_if.h device_if.h randomdev.c yarrow.c hash.c
SRCS	+= bf_cbc.c bf_skey.c bf_enc.c
CFLAGS	+= -I${.CURDIR}/../..
NOMAN	= yes

.include <bsd.kmod.mk>
@


1.5
log
@Forced commit.

Enough folks complained about the name of the entropy device module, so
I agreed to change it from "randomdev" to just plain "random".

This needs to be changed in loader.conf as well.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/randomdev/Makefile,v 1.4 2000/09/10 13:52:19 markm Exp $
@


1.4
log
@Large upgrade to the entropy device; mainly inspired by feedback
from many folk.

o The reseed process is now a kthread. With SMPng, kthreads are
  pre-emptive, so the annoying jerkiness of the mouse is gone.

o The data structures are protected by mutexes now, not splfoo()/splx().

o The cryptographic routines are broken out into their own subroutines.
  this facilitates review, and possible replacement if that is ever
  found necessary.

Thanks to:		kris, green, peter, jasone, grog, jhb
Forgotten to thank:	You know who you are; no offense intended.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/randomdev/Makefile,v 1.3 2000/07/07 09:03:59 markm Exp $
@


1.3
log
@Add entropy gathering code. This will work whether the module is
compiled in or loaded.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/randomdev/Makefile,v 1.2 2000/06/26 12:18:09 markm Exp $
d5 2
a6 2
KMOD	= randomdev
SRCS	= bus_if.h device_if.h randomdev.c yarrow.c
@


1.2
log
@Better style(9) for the module build.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/randomdev/Makefile,v 1.1 2000/06/25 10:12:33 markm Exp $
a4 1
#.PATH:	${.CURDIR}/../../crypto/des
a8 1
#SRCS	+= sha1.c des_setkey.c des_ecb.c
@


1.1
log
@Build the entropy device (/dev/random) as a module. This may not
be a permanent rule, because this device may eventually be deemed
"effectively compulsory", and built by default directly into the
kernel. For the moment, however, this is useful for debugging and
development.

Reviewed by:	dfr
@
text
@d1 1
a1 1
# $FreeBSD$
d9 1
a9 1
CFLAGS	+= -I${.CURDIR}/../../dev/randomdev
@

