<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jul 2, 2017 at 10:22 PM, Jon Callas <span dir="ltr"><<a href="mailto:jon@callas.org" target="_blank">jon@callas.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
> On Jul 2, 2017, at 12:15 PM, Ray Dillinger <<a href="mailto:bear@sonic.net">bear@sonic.net</a>> wrote:<br>
><br>
> Arc4random should not be mistaken for a CSPRNG.  It's a good PRNG, but<br>
> at this point there are enough attacks on it that it's not really good<br>
> enough for cryptography anymore.  So it should not be certified as<br>
> cryptographically secure - there is no "pretending" about it, and it is<br>
> not "gaming" the auditing process.<br>
><br>
> On the other hand, given some particular permutation of 256 elements,<br>
> its stream of output is entirely repeatable.  So it's fine as a PRNG for<br>
> repeatable sequences.<br>
<br>
</span>Agree totally and them some.<br>
<br>
Part of me wants to get fussy about definitions and say that an output function is not a RNG. It can be a PRF or PRP, but not an RNG. The other part of me just nods along and knows what you mean without getting fussy.<br>
<br>
RC4 is not a good PR{F|P}. It has known biases, and those biases are so well studied that they are the basis of the recent break against it as a cipher. It takes about two megabytes of ciphertext to perform a break against it as a cipher. That means it's really not a good output function. It is the opposite of cryptographically, secure; it is cryptographically insecure.<br>
<br>
AES in counter mode, any other decent block cipher in counter mode, lots of hash functions including the HMACified versions are reasonable.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"></div></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I think Watson Ladd's point will be missed so to call it out again: in the context of this discussion, arc4random is a placeholder for ChaCha20 or newer replacement, as it is in OpenBSD 5.5+. It doesn't mean RC4.<div><br></div><div><br></div><div>Mark</div></div></div>