]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/rand: separate out plan9 X9.31 /dev/random expander
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 9 Dec 2021 14:24:38 +0000 (15:24 +0100)
committerFilippo Valsorda <filippo@golang.org>
Fri, 4 Mar 2022 14:10:38 +0000 (14:10 +0000)
commitc9b60632ebb08a428a9bd15a89798a693667cb05
tree58bcd379ecf1baae855aeadb482ff04f03da7a26
parent27ec2bf0dd67a11036626cef26899df7280b0000
crypto/rand: separate out plan9 X9.31 /dev/random expander

The X9.31 expander is now only used for plan9. Perhaps once upon a time
there was a use for abstraction, but the code is now covered in hacky
"fileName == urandomDevice" and "GOOS == plan9" checks, to the point
where the abstraction is much too leaky. Since plan9 is the only
platform that has a /dev/random without a /dev/urandom, we can simplify
both the generic urandom code and the plan9 X9.31 code by separating
them into different files, each focusing on doing one thing well.

Change-Id: I0ca43b748a0fbbd60f2ec7819688a540506d34df
Reviewed-on: https://go-review.googlesource.com/c/go/+/370580
Trust: Jason Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/crypto/rand/eagain.go [deleted file]
src/crypto/rand/rand_plan9.go [new file with mode: 0644]
src/crypto/rand/rand_unix.go