[go] math/rand/v2: document PCG and ChaCha8 tradeoffs

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jun 25, 2026, 8:13:22 PM (2 days ago) Jun 25
to Harjoth Khara, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Roland Shoemaker, Dmitri Shuralyov, Dmitri Shuralyov, Robert Griesemer, Robert Griesemer, Filippo Valsorda, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
math/rand/v2: document PCG and ChaCha8 tradeoffs

Document that ChaCha8 is the general-purpose source resistant to
prediction, and that PCG is faster but unfit for security-relevant
purposes.

Fixes #79891
Change-Id: Ic4133dd9bd860c2643c622f799f2c54b1678e4f0
GitHub-Last-Rev: 93d225108aaef7862f4f148cd926f420e58af831
GitHub-Pull-Request: golang/go#79926
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Auto-Submit: Roland Shoemaker <rol...@golang.org>
Files:
  • M src/math/rand/v2/rand.go
Change size: XS
Delta: 1 file changed, 3 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ic4133dd9bd860c2643c622f799f2c54b1678e4f0
Gerrit-Change-Number: 789040
Gerrit-PatchSet: 6
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Filippo Valsorda <fil...@golang.org>
Gerrit-CC: Harjoth Khara <harjot...@gmail.com>
Gerrit-CC: Robert Griesemer <g...@golang.org>
Gerrit-CC: Robert Griesemer <g...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages