Asm Language Xoroshiro64 Uses 64 Bits Internal State Generating 32 Bits Random Output Per Q37172236

This is ASM language.

xoroshiro64** uses 64 bits of internal state, while generating32-bits of random output per call. It’s internal state is splitinto two unsigned 32-bit values, s0 and s1. These must beinitialized to something other than 0s. To generate the next statein the RNG sequence, we perform the following steps:

  1. tmp = s1 XOR s0
  2. s0 = (s0 ROL 26) XOR tmp XOR (tmp << 9) where ROR isrotate-right.
  3. s1 = s1 ROL 13 where ROL is rotate left
  4. The 32-bit value returned is ((s0 * 0x9E3779BB) ROL 5) *5.

All arithmetic is performed unsigned, on 32-bit (dword) values.You can find a C/C++ implementation of

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.