Post
Topic
Board Gambling
Re: Is PrimeDice really (provably)fair? Well, it isn't.
by
enno
on 30/04/2014, 23:50:24 UTC
Didn't read the whole thread but just played a bit...

When it comes to automated betting the user has no chance to change the client seed on every roll but PD has indeed the possibility to generate a server seed to his hown favour.

Example:

- PD knows the next roll will have the old client seed + incremented number. like if it was "abcdef-0001" it will be "abcdef-0002" for the next roll.
- PD knows the user is playing < 49.5 thus for the user to lose it needs a number > 49.5 and all PD needs to do is generating a server seed which will result in a number > 49.5 (actually I don't know if the server seed is generated transparently on the client side, which would prove my arguments invalid or - as the name suggests itself - on the server side)
- Generating a favourable number is trivial when you know the daily secret plus the client seed and can change the server seed at your discretion:

Code:
$seed  = 'daily secret';
$nextclient = 'abcdef-0002';

do {
   $server = rand(0,999999999);
   $hash = hash('sha512', $seed . $server . $nextclient);
   $value = substr($hash, 0, 8);
   $dice = round(hexdec($value)/42949672.95,2);
} while ($dice < 49.5);

echo 'Next server seed should be ' . $server . ' and will result in number ' . $dice;