# Tag Info

-2

This new version is equiprobable and does not use floats function urandom_rand($min = 0,$max = 0x7FFFFFFF) { // Force cast to integer (any other values will becomes 0) $min = (int)$min; $max = (int)$max; // Verify input if ($max <=$min) { trigger_error('Minimum value must be greater than maximum value.'); } if ($min ... 0 This looks like one. It does say "non-cryptographic" so I assume it is repeatable given the same seed. A small noncryptographic PRNG. You could also do a an implementation of a Message Authentication Code (MAC) such as this one UMAC which says it is meant to be "well supported on contemporary machines". 4 Yes. This paper on nist.gov gives five such PRNGs. Three of them are based on hash functions and two of them are based on block ciphers. 2 Are there many permutation polynomials in a field? For a field$F$of order$q$, every function from$F$to$F$is expressable (uniquely) as a polynomial of order$q-1$.$q!$of these will represent permutation polynomials. Is there anyway to pick uniformly at random permutation polynomial in a field of prime order? Given a function from$f$with$f(x_i) ...

3

Who says that a dice roll is truly random? I notice you define it as a "fair" dice roll; sure, a "fair" real-world dice roll could be considered random but its randomness is based up our inability to manipulate the dice precisely (haha) while shaking them in our hand and then throwing them onto a surface. If we were in complete control of the initial state ...

5

Any result of a dice-throwing simulation in a physics engine is determined by its initial state prior to starting the simulation. Accordingly, the same initial state will always result in the same die surface coming up. To obtain a quantity of $N_{output}$ random output bits of randomness quality $Q_{output}$ from this simulation would require seeding with ...

14

No, that would not be a true RNG, because these physics engines would just repeat the exact same calculation and thus repeat the whole sequence of random numbers - like a PRNG. The starting conditions are the seed of this PRNG. Dice are truly random in the real world. Well, are they? If we ignore quantum effects, we could measure all relevant values of the ...

1

Say you have the value $n$ which is the size of the alphabet (i.e. the range of characters that make up your plaintext and ciphertext). And say $m = x \times n$ is the largest value you have that is not higher than $y$ where $y$ is the largest size produced by your random number generator. For each character: Take values from the random number generator ...

2

There are two answers, really depending on your specifications and how your generator will be evaluated. If all you need is to have a PRNG with statistically excellent random, but really don't care about predictability or cryptographic considerations, go for something simple like a Mersenne Twister. If you actually need some effective stream-cipher, look ...

Top 50 recent answers are included