Provably fair mechanism implemented in most gambling sites gives us tool to check if site provider is not scamming us by picking numbers in non-random way. I encourage all of you to check at least few of your bets and avoid games without provably fair mechanism. It's not that hard to do that. Here you can find step by step guide on how to check fairness of your bet using provably fair system used on Luckydice games. I plan to post here Guides for more sites in the near future.
Click on Activity [1] -> MY BETS [2] -> choose bet that you want to check and reveal its details [3] -> copy Server Seed (Hashed) - that's mine: dd278ba121872e8527861c0c163afc57b5baa70ae1c25f03837474bce92efb1c -> Clink on RANDOMIZE [4] to reveal server seed (from now on every next bet will be made using new Server Seed)
Copy Server seed, client seed and nonce.
Server seed:
bafeeb0d100b41c1296273d1b7eff123cff55233674d229dee2a4d8958f5b169
Client seed:
37c3b51b49f6f0cb60b2c0e64cc26a98
Nonce:
2
Now we have every data that we need. Lets do the math:
1- Check if Server seed is correct - hash it with SHA256 and check if you will receive Server Seed (Hashed). The easiest way to do that is to use online tool f.e.
https://emn178.github.io/online-tools/sha256.htmlCorrect !2- Calculate HMAC_SHA256(K,m) functionK- Server seed
m = "{client_seed}:{nonce}:{round_number}:0" - its 37c3b51b49f6f0cb60b2c0e64cc26a98:2:0:0 for me.
We can use this tool -
https://www.freeformatter.com/hmac-generator.html#ad-output for calculation.
I get: 2202b355351a1b6b5393fd4fa4e820785ed3336d0fd81eac707226886b53717a
3- Get final resoult3.1In my case i'm checking "CLASSIC DICE" game. So i need first eight bytes.
Calculating first dice result:
First four bytes: 2202b355
First byte: 22
Second byte: 02
Third byte: b3
Forth byte: 55
Hexadecimal must be converted to decimal:
22 ---> 34 (a)
02 ---> 2 (b)
b3 ---> 179 (c)
55 ---> 85 (d)
Now you should use the following formula to obtain a value between zero and one
(a/256)+(b/2562)+(c/2563)+(d/2564)
(34/256)+(2/2562)+(179/2563)+(85/2564) = 0.13
0.13 must be multiplied by 6
0.13*6 = 0.78
The final dice result is
[0.78]+1 = 1
Calculating second dice result:
Second four bytes: 351a1b6b
First byte: 35
Second byte: 1a
Third byte: 1b
Forth byte: 6b
Hexadecimal must be converted to decimal:
35 ---> 53
1a ---> 26
1b ---> 27
6b ---> 107
(53/256)+(26/2562)+(27/2563)+(107/2564) = 0.207
0.207 must be multiplied by 6
0.207*6 = 1.25
The final dice result is
[1.25]+1 = 2
The final dice result is
[0.78]+1 = 1
[1.25]+1 = 2
Correct !3.2What if I was playing "DIGITAL DICE"? I need first 4 bytes - 8 digits: 2202b355
We do the same steps as with "CLASSIC DICE" but we stop here:
(34/256)+(2/2562)+(179/2563)+(85/2564) = 0.13
hosseinimr93 rounded the result, but its exact form is 0.132858753
Now we need to multiply it by 10 000, take floor and devide it by 100.
floor(0.132858753 * 10 000) = 1328
1328/100=13,28 - and that would be the resoult if I would play "DIGITAL DICE" instead of "CLASSIC DICE" in this game.