[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getrandom vs. crypto/gc-random
From: |
Paul Eggert |
Subject: |
Re: getrandom vs. crypto/gc-random |
Date: |
Mon, 1 Jun 2020 16:00:56 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
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.