With OpenBSD and now macOS using arc4random() for the random device, might as well look at the other BSD's that have arc4random().
Details
Details
- Reviewers
ldionne emaste krytarowski dim mgorny joerg devnexen - Group Reviewers
Restricted Project - Commits
- rGd13f5023891c: [libcxx] random_device, use arc4random() on FreeBSD, NetBSD and DragonFlyBSD
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'll note that this is a behavior change though. When I made the change on Apple, I added this release note:
On Apple platforms, std::random_device is now implemented on top of arc4random() instead of reading from /dev/urandom. Any implementation-defined token used when constructing a std::random_device will now be ignored instead of interpreted as a file to read entropy from.
Please add a similar release note here.
Comment Actions
Sounds good to me for FreeBSD (w/ the release note as mentioned by @ldionne) arc4random is ChaCha20 in all supported FreeBSD versions.