New pseudorandom number generator in all major browser

Designed by Sebastiano Vigna of CC&B

An basic feature of the programming language JavaScript has been rewritten using an algorithm developed by Sebastiano Vigna, head of the LAW (Laboratory for Web Algorithmics) and member of CC&B.

JavaScript is the language used by web pages for the creation of dynamic effects, and lies at the heart of Web 2.0. An important feature of the language is the generation of pseudorandom numbers. Sequences of such numbers are essential to generate identifiers, to execute certain classes of algorithms, and to introduce randomness in videogames: for example, to draw lottery tickets or shuffle card in online poker. Up to a few months ago, the sequences provided by JavaScript in the most common browsers (Chrome, Safari and Firefox) were based on a flawed algorithm that could cause serious problems. The most severe problem, maybe not surprisingly, was discovered recently by a startup dealing with online gambling (

The original algorithm has been now replaced in all broswers by xorshift128+, an algorithms developed by Sebastiano Vigna,( The xorshift128+ code will be thus installed and executed on almost all existing terminals (PC, tablets and mobile phones). In fact, since Google's V8 JavaScript engines fuels also servers using frameworks such as node.js, it will be installed also on several servers (

published on 1/15/2016