Greetings mortal, xxxxx@3Dlabs.com!
You wrote on Fri, 27 Feb 2004 11:46:24 -0000:
> What is the best way to do in a case when the driver should store in
>> memory some security information (crypto keys, for ex)?
>> My assumptions:
>> 1. Disable hibernate. 
>> 2. Clear that security information during power down, after power up
>> request it.
MP> My vote goes for #2.
MP> Maybe I’m not understanding the question properly. Let’s say I
MP> connect to the system with WinDBG, can I see the keys then (assuming
MP> I knew what to look for, obviously)?
If you have access to the system with debugger that system is not
guarded/configured properly. 
MP> Is it that much worse that they are stored in a file on the disk
MP> than they are in memory before hibernation?
In sistuation I mentioned above I mean only one security risk - a security
information is stored on disk. Any disk (magnetic) have a remanent field
therefore storing security information on it “as is” is not secure
(information can be restored even after its deleting and rewriting).
MP> Anything that is stored in main memory (or inside a chip that can be
MP> accessed via PCI-bus) can be accessed via a kernel device driver, if
MP> the person writing the code knows what he’s doing. On the other
MP> hand, any fool can use a hex-editor (or some other tools) to examine
MP> a hibernation file, but it’s still not trivial to find a particular
MP> type of information unless you know exactly what you’re looking for.
In properly configured system (for security reasons, of course) you can’t
plug any device, load any driver and even start an application that you not
allowed to start.
MP> Also, if you’re trying to clear the information, make sure that
MP> you’re clearing the stack-space too, just in case you have a copy
MP> somewhere on the stack (call a function that fills a large on-stack
MP> array usually does the trick. Just make sure it’s not TOO large so
MP> you blow the stack in kernel mode up…)
Ok. But I don’t use kernel stack for arrays. 12k is not so much…
PS: Sorry for my english.
Eugene.