3 ms·
One or both of us is confused. EDIT I was confused.
by danielweber 13y ago
One or both of us is confused.
EDIT I was confused.
- pedrocr 13y agoI think the OP is right. The first mistake he mentions is just not reading enough from urandom and thus falling back on unsecure values, which is just sloppy C. Then all the other attack scenarios require the ability to replace /dev/urandom in various insane ways (sparse actual files, symlinks, other devices). It all just seems pretty pointless. Just read /dev/urandom in a loop until you have enough and abort on any other case. That way you assure a secure result as long as the user has a sane environment and abort otherwise.