<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>What are the alternatives?<br></span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Geoff Cant <nem@erlang.geek.nz><br> <b><span style="font-weight: bold;">To:</span></b> Claes Wikstrom <klacke@hyber.org> <br><b><span style="font-weight: bold;">Cc:</span></b> erlang-questions <erlang-questions@erlang.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, June 21, 2012 12:37 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [erlang-questions] Yaws security alert - Yaws 1.93<br> </font> </div> <br>
<br>On 2012-06-20, at 14:17 , Claes Wikstrom wrote:<br><br>> On 06/20/2012 11:10 PM, Geoff Cant wrote:<br>>> Hi Klake,<br>>> <br>>> Is the problem related to predictable seeding of random (set to {A,B,C} =<br>>> erlang:now() at some point) or is it a bigger break in taking a series of<br>>> outputs from random:uniform and working out the internal state from that?<br>>> Just trying to figure out if kallez's attack is a brute force discovery of a<br>>> weak seed, or if it's a more complete break of the generator itself given an<br>>> unknown seed.<br>>> <br>>> Cheers,<br>> <br>> <br>> It's not, Yaws was using the seed as in<br>> <br>> <br>>    {X,Y,Z} = seed(),<br>> <br>> ...<br>> <br>> <br>> seed() -><br>>    case (catch list_to_binary(<br>>                  os:cmd("dd if=/dev/urandom
 ibs=12 count=1 2>/dev/null"))) of<br>>        <<X:32, Y:32, Z:32>> -><br>>            {X, Y, Z};<br>>        _ -><br>>            now()<br>>    end.<br>> <br>> <br>> The problem is much deeper, it's the random algorithm itself. It's said that<br>> it's cryptographically weak - now I've seen how weak. Very weak.<br><br><br>That's pretty neat indeed then (as an attack, not so great for anyone using random:uniform for any crypto-ish purpose). I'd love to look at a description of the break if one becomes available.<br><br>Cheers,<br>--<br>Geoff Cant<br><br><br><br><br>_______________________________________________<br>erlang-questions mailing list<br><a ymailto="mailto:erlang-questions@erlang.org"
 href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br><br><br> </div> </div>  </div></body></html>