How To Safely Generate A Random Number

Use urandom Use urandom . Use urandom . Use urandom . Use urandom . Use urandom . Use urandom . But what about for crypto keys? Still urandom . Why not {SecureRandom, OpenSSL, havaged, &c}? These are userspace CSPRNGs. You want to use the kernel’s CSPRNG, because: The kernel has access to raw device entropy. It can promise not to share the same state between applications. A good kernel CSPRNG, like FreeBSD’s, can also promise not to feed you random data before it’s seeded. Study the last ten years of random

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论