Skip to content
TopicTracker
From johndcook.comView original
TranslationTranslation

Recovering the state of xorshift128

The article describes how to reverse engineer the internal 128-bit state (four 32-bit integers) of the xorshift128 random number generator, following similar previous analyses of the Mersenne Twister and lehmer64 generators.

Related stories

  • The article explains how to recover the internal state of the Xorshift128 pseudorandom number generator by observing its output. It details the structure of the generator, which uses four 32-bit words (a, b, c, d) shifted every call, and shows how a small number of outputs suffice to reconstruct the full state through solving linear equations.