<html><head></head><body>All,<br>
<br>
Interesting library! Here's a link: <a href="http://hackage.haskell.org/package/DRBG-0.5.5/docs/Crypto-Random-DRBG.html">http://hackage.haskell.org/package/DRBG-0.5.5/docs/Crypto-Random-DRBG.html</a><br>
<br>
Thomas,<br>
<br>
In the linked docs, there's a claim that Hash DRBG is the fastest cryptographically secure RNG on Hackage. Do you have a link to the benchmark results, or perhaps some updated ones? Unlike Viktor, I'm interested in less secure applications, but if the performance is good, it might be worth switching from the defacto random package.<br>
<br>
Thanks,<br>
Jonathan<br><br><div class="gmail_quote">On October 10, 2017 10:23:14 PM CDT, Thomas DuBuisson <thomas.dubuisson@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="auto">The hash drbg from the drbg package should meet your needs. Deterministic, pure Haskell except the actual hash function.</div><div class="gmail_extra"><br /><div class="gmail_quote">On Oct 10, 2017 8:13 PM, "Viktor Dukhovni" <<a href="mailto:ietf-dane@dukhovni.org">ietf-dane@dukhovni.org</a>> wrote:<br type="attribution" /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br />
> On Oct 10, 2017, at 8:48 PM, Kazu Yamamoto (山本和彦) <<a href="mailto:kazu@iij.ad.jp">kazu@iij.ad.jp</a>> wrote:<br />
><br />
> Before the release, I would like to replace the random package since<br />
> it is slow.  I'm looking for a random library which is<br />
> - fast<br />
> - thread-safe (good for concurrent use)<br />
><br />
> Any recommendations?<br />
<br />
Just to make it more interesting, I should mention that the RNG<br />
should be not just statistically random, but should in fact be<br />
crypto random (resist predictability through cryptanalysis when<br />
properly seeded).<br />
<br />
So indeed there are two more issues here:<br />
<br />
 - Securely seeding the RNG (likely using the OS API for<br />
   random seeds, and/or the RDSEED/RDRAND instructions on<br />
   Intel CPUs), IIRC we can that from cryptonite, I hope<br />
   at a reasonable cost.<br />
<br />
 - Choosing a suitable DRBG based on the seed.  Likely again<br />
   something from cryptonite.<br />
<br />
Some time back I posted to the cryptography list about the<br />
soundness of relying on RDRAND in cryptonite's RNG (uses<br />
it instead of /dev/urandom and the like when available).<br />
The rough consensus IIRC was not rely solely on RDRAND.<br />
I never went back to write a PR to address that...<br />
<br />
<a href="http://www.metzdowd.com/pipermail/cryptography/2016-November/thread.html#30859" rel="noreferrer" target="_blank">http://www.metzdowd.com/<wbr />pipermail/cryptography/2016-<wbr />November/thread.html#30859</a><br />
<br />
--<br />
        Viktor.<br />
<br />
______________________________<wbr />_________________<br />
Haskell-Cafe mailing list<br />
To (un)subscribe, modify options or view archives go to:<br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr />bin/mailman/listinfo/haskell-<wbr />cafe</a><br />
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>
</blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>