Tag Info

New answers tagged


If you can generate uniform random numbers, you can use a variant of Fisher-Yates. //given an array s with the elements to be permuted for i from n-1 to 1: t = rand(0, i) # inclusive swap(s[i], s[t])


Before answering the actual question, I will offer some general advice. It is important to pay attention, both in class and to the textbook you are reading. If learning how to solve such exercises is a key goal of the course, such solutions have very probably been discussed at length in class. Moreover, your textbook also has proof examples, and in this ...


Just use a small block sized block cipher in counter mode and filter out elements that are out of range.


Short answer The distinguisher is only given the output of the generator on a uniformly chosen seed of appropriate length, along with a truly random string of the same length as the output of the generator. So, no, the distinguisher is not given $a$, $b$ and $m$. However, as you note we can still consider an algorithm in which those values are hardcoded, ...


You're right: If you know the setup, calculating the next output from any given $x$ is fully deterministic and you know everything already. Even if you don't know $a$ and $b$, those are easy to calculate from three consecutive $x_i$. If $n$ is not known, its calculation is still pretty easy, given a few consecutive $x_i$. Anyway, LCGs are very unsuitable ...


The goal of a random number generator is to generate a uniform distribution. Taken the LCG computational indistinguishability means that every sequence generated $\mod m$ is a uniform distribution over the values $0, ..., m-1$. The function parameters are not given. Instead you would have a sequnce $x_0, x_1, ...$ given and have to determine if all values ...

Top 50 recent answers are included