<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 10, 2015 at 9:19 PM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On September 10, 2015 at 2:08:46 PM, Akira Li (<a href="mailto:4kir4.1i@gmail.com">4kir4.1i@gmail.com</a>) wrote:<br>
><br>
> "security minded folks" [1] recommend "always use os.urandom()" and<br>
> advise against *random* module [2,3] despite being aware of<br>
> random.SystemRandom() [4]<br>
><br>
> i.e., if they are right then *random* module probably only need to care<br>
> about group #1 and avoid creating the false sense of security in group #3.<br>
><br>
<br>
Maybe you didn't notice you’re talking to the third name in the list of authors<br>
that you linked too,</blockquote><div> </div><div>Obviously, I've noticed it but I didn't want to call you out. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">but that documentation is there primarily because the<br>
random module's API is problematic and it's easier to recommend people to not<br>
use it than to try and explain how to use it safely.<br><br>
</blockquote></div><div class="gmail_extra"><br></div>"it's easier to recommend people to not use it than to try and explain how to use it safely." that is exactly the point</div><div class="gmail_extra">if random.SystemRandom()  is not safe to use while being based on "secure" os.urandom() then providing the same API based on (possibly less secure) arc4random() won't be any safer.<br><br clear="all"><div><br></div><div class="gmail_signature"><br></div>
</div></div>