1
$\begingroup$

I’m missing out a lot in the field of mathematics but I think the following can be identified as an LCG (linear Congruential Generator).

$k_i = (k_{i-1} + x_i)\cdot\text{ constant }+1\bmod2^{32}$, and $x_i$ is 8 bits

First byte of the 32 bits ($k_i$ and $k_{i-1}$) are known and "constant" is known. Also the Last byte of $k_i$ can be recovered from middle 16 bits.

The equation can also be expressed as:

$k_i\cdot\text{ constant}^{-1}-k_{i-1} = x_i+\text{ constant}^{-1}\bmod2^{32}$

This means the first 20 bits of the left hand side is equal to the first 20 bits of inverse of $constant$, So every $k_i\cdot\text{ constant}^{-1}-k_{i-1}$ will always have the same 20 bits.

Like this:

$k_2\cdot\text{ constant}^{-1}-k_1 = x_2+\text{ constant}^{-1}\bmod2^{32}$ $k_3\cdot\text{ constant}^{-1}-k_2 = x_3+\text{ constant}^{-1}\bmod2^{32}$ $k_4\cdot\text{ constant}^{-1}-k_3 = x_4+\text{ constant}^{-1}\bmod2^{32}$ $k_5\cdot\text{ constant}^{-1}-k_4 = x_5+\text{ constant}^{-1}\bmod2^{32}$

Even better like this:

$k_i\cdot\text{ constant}^{-1}-k_{i-1}-x_i =\text{ constant}^{-1}\bmod2^{32}$

Someone suggested that a lattice attack is the fastest way to solve this, But I don’t know how to express this in lattices.

My research on lattice attack on LCG with modular arithmetic did not give me any useful information but i am familiar with lattice attack on Elliptic Curve Digital Signature Algorithm.

Or is there any other algorithm that can solve this other than brute force.

$\endgroup$
1

0