I'm working on a background entropy collector for key generation that monitors hardware and produces an entropy pool.
Here's my list of sources:
- Mouse position
- Keyboard timings (i.e. time between keystrokes)
- Network
- Bytes sent
- Bytes received
- Datagrams sent
- Datagrams received
- Processor (per CPU)
- Interrupts/sec
- Queued DPCs/sec
- C3 Transitions/sec
- Memory
- Page Faults/sec
- Transition Faults/sec
- Disk
- Write bytes/sec
- Read bytes/sec
- Process (total)
- IO Read Bytes/sec
- IO Write Bytes/sec
- IO Other Bytes/sec
- Page Faults/sec
- USB
- Interrupt Bytes/sec
- Controller PCI Interrupts/sec
- Time taken to fetch all of the above data (measured using QueryPerformanceCounter)
These stats are collected once every 330ms. At the moment, I'm just globbing all the data into an array of around 100 bytes. I then hash the array using SHA512, to add a total of 64 bytes to the entropy pool, giving me roughly 200 bytes per second.
The pool is initially populated by the hash of a single timestamp value indicating the system boot time. When the pool reaches 64KB, I xor with the oldest 64-byte block. This is somewhat warned against in another question, but I don't foresee a problem because the pool is very large and the reasoning for removing old data is size. Keys are generated by computing a cryptographic hash of the entire entropy pool.
This seems reasonable, but I wonder whether SHA512 is overkill. Would I be better off extracting the least significant bits of each statistic into a bitstream? If so, how many? Are there any other issues with my approach?
hash(entropy)
as the key and computeAES(counter, key)
where the hash is the key? Not really sure I understand the rest of the protocol. $\endgroup$ – Polynomial Jul 10 '12 at 13:19