3 ms·
> blocks if you don't have enough entropy Which, in most cases I can think of is a rather undesirable behavior. I would really be interested to understand whi
by ur-whale 5y ago
> blocks if you don't have enough entropy
Which, in most cases I can think of is a rather undesirable behavior.
I would really be interested to understand which use cases justify using an actual blocking call to retrieve random bits.
I've always been under the impression that the only valid use case for raw entropy bits is regularly seeding crypto-hard RNGs that can generate an endless stream of random bits (à la /dev/urandom).
Looking forward to being educated on the topic.
- rainworld 5y agoCorrect 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.
- m_eiman 5y ago> I would really be interested to understand which use cases justify using an actual blocking call to retrieve random bits. The only case I can think of is when you've mass produced a million devices that each need unique certificates that are generated on first boot. If no good source of randomness is available, there's a decent risk you'll have duplicates.
- GoblinSlayer 5y agohttps://crypto.stackexchange.com/questions/9694/technical-details-of-attack-on-android-bitcoin-usage-of-securerandom https://crypto.stackexchange.com/questions/9694/technical-de...