RNG Algorithms

There are various RNG algorithms to provide random number requirements of IoT world.

  • Fortuna : It’s a kind of a CSPRNG which consists of a generator, an accumulator, and a seed file management sections. The generator outputs a pseudo-random number using a fixed-length seed value. Entropy is collected from different sources with the accumulator. The pool is created using the collected entropy. By using this pool, the generator is reseeded at specific time intervals. Random number generation is ensured in the seed file management section even if the device is newly started.     download    
  • Tiny Mersenne Twister: It’s a variant of the Mersenne Twister algorithm, one of the general-purpose PRNGs, designed for resource-constrained devices. It includes improvements in terms of memory and efficiency. There are two types of Tiny Mersenne Twister; TinyMT32 and TinyMT64. The TinyMT32 outputs a single-precision floating-point 32-bit unsigned integer. The TinyMT64 outputs double-precision floating-point 64-bit unsigned integers. The output quality is quite good in application areas where the internal state size is small. It does not have the necessary features to be used cryptographic applications. Different random sequences can be produced using the same parameter sets with the seed skipping function in its structure. With dynamic creator (DC), TinyMTs  can create independent arrays using different parameter sets. TinyMT32’s dependency on the parameter set during initialization provides both ease of use and allows the order of the output to be dependent only on the seed value.     download    
  • HMAC_DRBG: It’s a stable random bit generator. It includes three algorithms. These are instantiation, reseeding, and generator algorithms. Instantiation and reseeding algorithms are used in secret key generation and renewal. This generated random secret key is obtained with the HMAC code. The key produced in these stages is turned into a binary sequence with the generator algorithm. With the HMAC_DRBG_Update function, the instantiate, reseed, and generator algorithms are called to update the internal state. Updating the internal state requires additional input, new entropy, and pseudorandom number generation. It has the advantages of simplicity of design and robustness of the hash-based design. However, it also has the disadvantage of being the slowest hash-based DRBG algorithm.   download    
  • Xorshift: It, is introduced by G. Marsaglia, is a family of fast and efficient RNG generators that includes xor and shift operations. It’s one of the LFSR-like PRNG types. It’s not designed for cryptographic purposes. The bit vector is chosen as the first status. The xorshift operation(s) is applied to the 32 or 64-bit blocks of this bit vector, and the next status is obtained. The iterative mod 2 operation is performed linearly. Generators with three xorshift operations were proposed in the original paper.   download    

Kübra Seyhan, Sedat Akleylek