Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Linear Congruential Generator

Definition

LCG is a popular pseudorandom number generator. It is defined by the following recurrence relation:

$$\begin{aligned} &s_0 = \text{seed} \quad (\text{initial value}) \\\ &s_{i+1} = (a \cdot s_i + b) \mod m \quad \text{for} \; i = 0, 1, 2, \dots \end{aligned}$$

Where:

  • $s_i$: The current state.
  • $s_{i + 1}$: The next state to be computed.
  • a, b, and m are integer constants.

Bibliography

Paar, Christof, and Jan Pelzl. Understanding Cryptography: A Textbook for Students and Practitioners. Springer, 2010.