comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Poor tasking performance
Date: Sat, 26 Jun 2004 13:30:49 -0400
Date: 2004-06-26T13:30:49-04:00	[thread overview]
Message-ID: <_YCdnTuqM9FUL0DdRVn-iQ@comcast.com> (raw)
In-Reply-To: <LDcBc.96419$dP1.316053@newsc.telia.net>

Bj�rn Persson wrote:

> When I press a key, in most cases either a character shows up on the 
> screen or some action is triggered. I suppose modifier keys (Shift, 
> Ctrl, ...) and "dead" accents could be buffered. Right now I can only 
> come up with one case when letters don't have to be read immediately: 
> when the user is typing a password and characters are neither echoed nor 
> indicated with asterisks.

Ah, but look at it this way--which is what the computer actually does. 
The effect of generating a new screen image to be displayed has to be 
done once per screen refresh, which is typically today in the range of 
60 to 100 times per second.  There is no need for an additional 
interrupt to read the keyboard in between screen refreshes most of the time.

Of course, the Get_Immediate call in Ada should support exactly that. 
Why?  Lots of random number seed generators use the number of 
microseconds between keypresses to generate secret keys.  If the times 
measured are multiples of the screen refresh clock, your secret key may 
not be all that secret.  (Most algorithms do detect how much entropy 
they are getting per keypress, so the real cost is that you have to type 
for a lot longer.)

-- 

                                           Robert I. Eachus

"Reason and experience both forbid us to expect that national morality 
can prevail in exclusion of religious principles." -- George Washington




      reply	other threads:[~2004-06-26 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19  7:38 Poor tasking performance Adrian Knoth
2004-06-19 20:19 ` Robert I. Eachus
2004-06-19 23:51   ` Adrian Knoth
2004-06-19 23:58   ` Björn Persson
2004-06-20  5:28     ` Robert I. Eachus
2004-06-20  7:58       ` Adrian Knoth
2004-06-20  9:18       ` Björn Persson
2004-06-26 17:30         ` Robert I. Eachus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox