<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>><span>uses libsodiums randombytes </span></p>
<p><br>
</p>
<p>I would therefore suggest the correct answer to any crypto question should be "use Jesper's library".<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jesper Louis Andersen <jesper.louis.andersen@gmail.com><br>
<b>Sent:</b> Friday, 10 June 2016 6:28:30 PM<br>
<b>To:</b> Technion<br>
<b>Cc:</b> duncan@sfractal.com; Erlang (E-mail)<br>
<b>Subject:</b> Re: [erlang-questions] Random/Crypto Issue with Erlang?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Jun 10, 2016 at 5:06 AM, Technion <span dir="ltr">
<<a href="mailto:technion@lolware.net" target="_blank">technion@lolware.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<i>By default this is the <span>RAND_bytes</span> method from OpenSSL.</i></blockquote>
</div>
<br>
</div>
<div class="gmail_extra">Indeed.<br>
<br>
Luckily crypto:random_bytes/1 is deprecated as of release 19.0 IIRC. And I do believe crypto:strong_random_bytes/1 still uses the SSL RAND_bytes generator. The `enacl` library I wrote for NaCl/libsodium based crypto uses libsodiums randombytes primitive which
is indeed tied to the kernel CSPRNG, which avoids these problems on most modern operating systems.<br>
</div>
<div class="gmail_extra"><br clear="all">
<br>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">J.</div>
</div>
</div>
</div>
</body>
</html>