On 6/1/20 12:01 PM, Bruno Haible wrote:
> No guidance regarding getrandom vs. crypto/gc-random any more?

The main advantage of getrandom and/or getentropy over crypto/gc-random is the
simpler API and lower maintenance/runtime overhead. crypto/gc-random is a better
match if you're already using the other crypto/* APIs. I could add text along
these lines if this sounds like a good idea.

Come to think of it, crypto/gc-random could be rewritten to use getrandom. This
should improve crypto/gc-random's performance, and should avoid some issues on
platforms where /dev/urandom doesn't exist but the getrandom syscall does.

Reply via email to