<s>
Entropy-supplying	B-Operating_System
system	I-Operating_System
calls	I-Operating_System
are	O
system	B-Operating_System
calls	I-Operating_System
in	O
Unix-like	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
kernels	B-Operating_System
through	O
which	O
processes	O
can	O
obtain	O
entropic	O
or	O
random	O
data	O
.	O
</s>
<s>
The	O
first	O
of	O
these	O
was	O
getentropy	B-Operating_System
,	O
introduced	O
to	O
the	O
OpenBSD	B-Operating_System
operating	O
system	O
in	O
release	O
5.6	O
(	O
November	O
2014	O
)	O
,	O
as	O
a	O
refactoring	O
of	O
the	O
sysctl(3 )	O
KERN_ARND	O
approach	O
used	O
since	O
1997	O
.	O
</s>
<s>
Linux	O
offers	O
a	O
very	O
similar	O
system	B-Operating_System
call	I-Operating_System
,	O
getrandom	B-Operating_System
,	O
which	O
was	O
based	O
on	O
getentropy	B-Operating_System
.	O
</s>
<s>
In	O
July	O
2015	O
,	O
Solaris	B-Application
introduced	O
slightly	O
modified	O
versions	O
of	O
getentropy	B-Operating_System
and	O
getrandom	B-Operating_System
.	O
</s>
<s>
In	O
August	O
2015	O
,	O
FreeBSD	B-Operating_System
introduced	O
the	O
read_random	O
system	B-Operating_System
call	I-Operating_System
for	O
obtaining	O
random	O
data	O
from	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
These	O
system	B-Operating_System
calls	I-Operating_System
allow	O
processes	O
to	O
access	O
quality	O
random	O
data	O
without	O
opening	O
and	O
reading	O
from	O
randomness	B-Application
pseudo-devices	I-Application
.	O
</s>
<s>
Microsoft	B-Application
Windows	I-Application
 '	O
CryptGenRandom	B-Algorithm
and	O
Apple	O
iOS	B-Application
's	O
SecRandom	O
API	B-General_Concept
are	O
very	O
similar	O
.	O
</s>
<s>
However	O
,	O
they	O
are	O
not	O
implemented	O
as	O
system	B-Operating_System
calls	I-Operating_System
.	O
</s>
<s>
Traditionally	O
,	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
supply	O
random	O
data	O
through	O
two	O
pseudo-devices	B-Application
:	O
/dev/random	B-Application
and	O
/dev/urandom	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
an	O
attacker	O
could	O
interfere	O
with	O
a	O
process	B-Operating_System
's	O
access	O
to	O
the	O
pseudo-devices	B-Application
by	O
opening	O
all	O
available	O
file	B-Application
descriptors	I-Application
,	O
or	O
through	O
a	O
similar	O
form	O
of	O
resource	B-General_Concept
exhaustion	I-General_Concept
attack	I-General_Concept
.	O
</s>
<s>
Unprivileged	O
processes	O
are	O
often	O
denied	O
the	O
ability	O
to	O
open	O
and	O
read	O
files	O
and	O
devices	O
,	O
and	O
the	O
randomness	O
devices	O
are	O
not	O
even	O
visible	O
to	O
chrooted	B-Application
processes	O
.	O
</s>
<s>
The	O
difficulty	O
of	O
using	O
randomness	B-Application
pseudo-devices	I-Application
often	O
leads	O
developers	O
to	O
use	O
standard	O
library	O
functions	O
instead	O
.	O
</s>
<s>
Some	O
of	O
these	O
,	O
such	O
as	O
the	O
C	B-Language
programming	I-Language
language	I-Language
's	O
rand( )	O
,	O
POSIX	O
's	O
random( )	O
,	O
and	O
drand48( )	O
,	O
are	O
very	O
unsafe	O
when	O
used	O
for	O
cryptography	O
or	O
similar	O
applications	O
,	O
because	O
these	O
algorithms	O
are	O
actually	O
deterministic	O
,	O
having	O
been	O
intentionally	O
crippled	O
to	O
satisfy	O
seed-reuse	O
requirements	O
through	O
the	O
interfaces	O
srand( )	O
,	O
srandom( )	O
,	O
and	O
srand48( )	O
.	O
</s>
<s>
To	O
encourage	O
other	O
operating	O
systems	O
follow	O
this	O
model	O
,	O
getentropy( )	O
cannot	O
indicate	O
errors	O
to	O
the	O
application	O
.	O
</s>
<s>
Because	O
of	O
this	O
,	O
providing	O
quality	O
randomness	O
is	O
increasingly	O
considered	O
a	O
core	O
responsibility	O
of	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
System	B-Operating_System
calls	I-Operating_System
are	O
the	O
traditional	O
interface	O
through	O
which	O
a	O
process	B-Operating_System
uses	O
core	O
kernel	B-Operating_System
services	O
,	O
and	O
kernels	B-Operating_System
are	O
therefore	O
supporting	O
accessing	O
randomness	O
through	O
system	B-Operating_System
calls	I-Operating_System
.	O
</s>
<s>
Because	O
it	O
is	O
faster	O
and	O
adds	O
another	O
layer	O
of	O
entropy	O
mixing	O
,	O
it	O
is	O
usually	O
suggested	O
that	O
processes	O
use	O
these	O
syscalls	B-Operating_System
 '	O
data	O
through	O
a	O
userspace	O
cryptographically	B-Algorithm
secure	I-Algorithm
pseudorandom	I-Algorithm
number	I-Algorithm
generator	I-Algorithm
(	O
CSPRNG	B-Algorithm
)	O
rather	O
than	O
assigning	O
the	O
retrieved	O
data	O
directly	O
to	O
variables	O
.	O
</s>
<s>
For	O
this	O
purpose	O
,	O
OpenBSD	B-Operating_System
's	O
C	B-Language
standard	O
library	O
includes	O
the	O
function	O
arc4random	O
,	O
which	O
programs	O
are	O
expected	O
to	O
call	O
when	O
they	O
need	O
random	O
data	O
.	O
</s>
<s>
Like	O
getentropy	B-Operating_System
,	O
arc4random	O
also	O
may	O
not	O
block	O
nor	O
return	O
an	O
error	O
.	O
</s>
<s>
This	O
approach	O
allows	O
a	O
program	O
to	O
fetch	O
less	O
entropy	O
from	O
the	O
kernel	B-Operating_System
without	O
reducing	O
the	O
strength	O
of	O
its	O
random	O
data	O
.	O
</s>
<s>
The	O
getentropy	B-Operating_System
system	B-Operating_System
call	I-Operating_System
is	O
designed	O
based	O
on	O
this	O
assumption	O
,	O
supplying	O
no	O
more	O
than	O
256	O
bytes	O
per	O
call	O
.	O
</s>
