I'm working on some kind of raffle to my customers so I need to generate a sequence of 10 pseudo-random numbers then have to prove to them that I generated that numbers using some fair algorithm not cheating based on my system interest.
So I thought about use java.util.Random for that porpoise, I provide them the seed then they can check that I didn't modify the random generation
Random r = new Random(1192);
for (int i = 0; i < 10; i++) {
r.nextInt();
}
The problem is I find out that java.util.Random is totally insecure for me because user can predict it's next generated numbers once he have 2 samples, no seed needed.
Now, I want to know if is it possible to generate pseudo-random numbers in a way that they are only reproducible when you have the seed?
Aucun commentaire:
Enregistrer un commentaire