Subject: Re: keyboard input path questions
To: VaX#n8 <vax@carolina.rr.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 07/15/2004 10:12:09
VaX#n8 wrote:
> Hi, I'm interested in learning about x86 keyboard input for a couple of
> reasons:
> 
> 1) I hear that that PC keyboards are "scanned" and therefore quantize inter-key
> timing measurements.  I'd like to examine this and its implications on using
> those timings for random number generation (a la PGP).

The pckbd driver already uses this randomness, and the data (the pressed
key and the timing) is mixed into the system randomness pool available
via /dev/urandom. See src/sys/dev/ic/pckbc.c function pckbcintr_hard()),
the call to rnd_add_uint32().
 
> So, could someone point me at where keyboard input first enters the kernel,
> and could some kind soul explain the path it follows (assuming use of wscons)?
> I assume it will jump around quite a bit from the initial interrupt, through
> wscons, terminal handling, etc.

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-