Search code examples
windows-ce

What is the purpose of IOCTL_HAL_GET_HWENTROPY


The Windows CE 5.0 OAL may implement these KernelIoControl codes

What are these values generated by the OAL used for?


Solution

  • They're used as part of the implementation of the cryptographic random number generator, CryptGenRandom. The idea is that the device can provide some source of genuine randomness as an input to that process. Otherwise, the generator can be somewhat predictable. (Though not nearly as bad as rand().)

    If you're using any form of cryptography - for example, SSL - on the device, you should implement these IOCTLs using a good source of data.

    Source: What seeds CeGenRandom?