Comment

Comment by benlivengood

> This is one way of protecting yourself against hash denial-of-service attacks.

Ironic, in this case. And the fix isn't much better; 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.

Overall RDRAND seems to be a terrible userspace instruction. Special-casing its use sounds more complicated then proper multi-platform support for system RNGs.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton