Thread (62 messages) 62 messages, 10 authors, 2017-07-05

Re: [kernel-hardening] Re: [PATCH v4 13/13] random: warn when kernel uses unseeded randomness

flat view

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2017-06-18 19:13:01
Also in: lkml

On Sun, Jun 18, 2017 at 7:55 PM, Stephan Müller [off-list ref] wrote:
But you bring up an interesting point: if it is true you say that it is hard
for people to use differnent types of APIs regarding entropy and random
numbers right (which I would concur with), and considering that you imply that
get_random_bytes, get_random_u32 and get_random_u64 have the same security
strength, why do we have these three APIs to begin with? The get_random_bytes
API would then be more than enough.
Because there are efficiences we can benefit from for getting integer
sized outputs.

Use get_random_{u32,u64} when you want a secure random number.
Use get_random_bytes when you want a longer secure random bytestring.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help