3 ms·
Correct behavior: Block (or don’t be available) until you can securely generate an effectively endless stream of random bits, then never. Correct API: https://
by rainworld 5y ago
Correct behavior: Block (or don’t be available) until you can securely generate an effectively endless stream of random bits, then never.
Correct API: https://fuchsia.dev/fuchsia-src/reference/syscalls/cprng_draw https://fuchsia.dev/fuchsia-src/reference/syscalls/cprng_dra...
- uvesten 5y agoI decided to have a quick look, and this caught my eye: —- zx_cprng_draw() terminates the calling process if buffer is not a valid userspace pointer. —— ”Terminates the calling process”? That sounds different and interesting, do you know more about this aspect of Fuchsia?
- rainworld 5y agoI'm not too familiar with Fuchsia, but other syscalls return ZX_ERR_INVALID_ARGS so I suspect the idea was to keep this particular, security-critical call as simple as possible. This behavior shouldn't break any code that wasn't already broken.