# Tag Info

## New answers tagged pseudo-random-generator

4

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])

3

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 ...

1

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

0

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, ...

0

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 ...

0

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