[Webkit-unassigned] [Bug 22049] WebKit should have a cryptographic RNG

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 2 12:43:00 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=22049





------- Comment #3 from webkit at shiftleft.org  2009-01-02 12:43 PDT -------
(In reply to comment #2)
> That said i feel dubious as to the value of this API -- if it doesn't exist
> people are going to have to use Math.random anyway, and having a predictable
> random() is something i consider a bug anyway.
> 
> Happily as of r39510 Math.random() is cryptographically secure on mac and
> windows.

Yay!

I agree that a predictable Math.random() is a bug.  However, Adam Barth
convinced me that we need a crypto.random() of some sort too.  The reason is
that Math.random() isn't guaranteed to be cryptographically strong on all
browsers, so relying on it for cryptographic randomness would be a mistake...
at the very least, you'd have to do browser version sniffing, which is brittle.
 What's more, are we sure that Math.random() will even stay cryptographically
strong in webkit?  Someone might revert it, citing a performance regression.

We don't actually need to write crypto.random() in C... it could be implemented
in Javascript on top of Math.random() (except that Math.random() still isn't
strong on Linux, right?), but there should still be a separate API.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list