W3C home > Mailing lists > Public > public-webcrypto@w3.org > January 2013

Re: Opera Random Numbers

From: Håvard Molland <haavardm@opera.com>
Date: Mon, 28 Jan 2013 10:56:06 +0100
Message-ID: <51064B36.6070209@opera.com>
To: public-webcrypto@w3.org
On 01/26/2013 09:08 PM, Nadim Kobeissi wrote:
> Hi,
> Does Opera already have a JS-accessible PRNG that can be used for 
> cryptographic operations? If so, how can it be called? What is the 
> function? How does it work?

(I've already answered to Nadim Kobeissi  directly)

Opera has not yet implemented window.crypto.getRandomValues(). However, 
our Math.Random() is using a cryptographically secure random generator. 
If used carefully (noting that it only returns 53 bits of entropy for 
each call) it is possible to use it to implement a javascript version of 
window.crypto.getRandomValues(). Just make sure to only do this in 
Opera, along with some good comments in the code.

Cheers,
Håvard

>
> I've sent an email to a gentleman from the Opera team asking this, but 
> thought I'd also ask WebCrypto.
>
> Chrome and Safari already have window.crypto.getRandomValues() built 
> in, and Firefox is getting it soon. Which left me wondering about Opera.
>
> Thanks,
> NK
Received on Monday, 28 January 2013 09:56:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 28 January 2013 09:56:38 GMT