Closed lthibault closed 1 year ago
cc #103
This has reassured me that there is no risk in sharing crypto/rand.Reader
across many processes, at least from an entropy-depletion point of view.
At this point, I'm not certain why the Wazero folks have decided not to provide crypto/rand.Reader
by default. I should make it a point to ask them.
I just realized that
WithRandSource
maps ontocrypto/rand
, notmath/rand
.Wazero is quite strict about not letting guest code make syscalls, so the value defaults to a (deterministic) stub. We definitely want to provide guests with crypto-grade entropy, so two questions:
io.Reader
that is suitable for crypto? (Maybe a stream cipher seeded withcrypto/rand
?)