
338 Cryptography with Open-Source Software
determinant
s
i
s
i+1
1
s
i+1
s
i+2
1
s
i+2
s
i+3
1
will be a multiple of m. For example, suppose that
21, 24, 2, 29, 17
are terms of a sequence produced by an LCG. Then
21 24 1
24 2 1
2 29 1
= −403 = −(13)(31),
24 2 1
2 29 1
29 17 1
= −465 = −(3)(5)(31).
Given the values in the sequence, it seems reasona ble to assume that m = 31.
Taking any three values in the above subsequence , for example the middle
three, provides the two equations
2 = 24a + b (mod 31)
29 = 2a + b (mod 31).
These can be easily solved to produce a = 3, b = 23.
13.3 Some cryptographically strong generators
This section will intro ...