-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Consider using crypto/rand instead of math/rand #865
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerskind:discussionpending:closestale
Description
Implementation ideas
In some places we use math/rand and plan to seed it differently (see #850) to achieve some non-determinism.
I think in all places which do not really touch a hot path, we should really be using crypto/rand even if they do not really have a hard requirement of cryptographically secure randomness. Otherwise, it remains unclear why math/rand was good enough or what the assumptions around the code were. Blindly using crypto/rand requires less bikeshedding on how to seed math/rand properly and it is clear that is the best we can do in terms of randomness. The performance penalty is negligible in the greater scheme of things (network + disk IO will always dominate here anyways).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerskind:discussionpending:closestale