|
|
|
|
|
by fluix
1927 days ago
|
|
> [...] there's no guarantee that RDRAND won't revert to the -1 behavior after the check runs, perhaps after a VM migration or resume from suspend or what-not. Author here. This is true and is an issue with some CPUs (breaking RDRAND after resume), but every call to RDRAND is guarded[1] by a check that it works. [1]: https://github.com/json-c/json-c/blob/041cef434afe0d0c6da8b6... Edit: Ah, I just realized you stated "after the check runs" and you're correct, there's no way that can be guaranteed. Edit 2: Well, if RDRAND returns a value json-c can't use (-1) it won't be used. |
|
RDRAND may also be slow: https://www.phoronix.com/scan.php?page=news_item&px=RdRand-3...
Ultimately I think it was a mistake for Intel to try to provide user-level hardware random number generation. It's apparently not an easily solved problem and requires complete trust in the hardware and a fallback TRNG/HRNG that's just as secure if the hardware reports that it's not working. Why not just use the fallback all the time? System-level entropy pools are pretty well-studied at this point.