Jump to content

Featured Comment

Posted (edited)

Hello everyone,

 

First of all sorry for bad grammar. This will be first post out of few where I will explain math behind every stake originals game.

 

So since this is first post I will explain what is needed to verify results.

Just a simple google "hmac sha256 generator" will do.

 

When you find a site that has generator on it go to provably fair section on stake

Link: https://stake.com/provably-fair/calculation?

 

Now as game choose dice.

For client seed, server seed, nonce we will do random stuff to make it simple.

For client seed put:  StakeIsGreatest

For server seed put: EddieAlwaysWins

For nonce put 69

Result should look like:
image.thumb.png.41403b74ee13bfd11e63b8dd1e6b3b7a.png

 

So what happens behind the scenes.

In cryptography, an HMAC (sometimes expanded as either keyed-hash message authentication code or hash-based message authentication code) is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. As with any MAC, it may be used to simultaneously verify both the data integrity and authenticity of a message. HMAC can provide authentication using a shared secret instead of using digital signatures with asymmetric cryptography. It trades off the need for a complex public key infrastructure by delegating the key exchange to the communicating parties, who are responsible for establishing and using a trusted channel to agree on the key prior to communication.

 

So combination of client seed, server seed, nonce, pointer will give you random output.

Now what do you put in hmac sha256 any calculator for hash function to verify this really is true and random?

image.thumb.png.bab68d876d4fb72fad1a5cf6fe27c0fa.png

For plain text which needs to be computed put your client seed as you choose it following by nonce and by pointer seperated with: 

StakeIsGreatest:69:0

For secret key put your server seed 

EddieAlwaysWins

 

Result of this function will be shown as hex output:
f87e113189e7a4003934d94288e8b9493245d24365b626f55a573a1554e9fa41

Now this is the actual output that determines what will you roll and get you final dice number between 0 and 100.

 

What do we do with this? Its actually simple, take first 8 characters and group them 2 by 2 like this:
f8 7e 11 31

Now convert those groups into binary numbers. (hint: google: hex to binary converter)

Hex -> Decimal

f8 -> 248

7e -> 126

11 -> 17

31 -> 49

 

Now we have this 4 numbers (248,126,17,49)

 

What we are going to do with this numbers is following:

We will take first number and divide it by 256^1

Then we will take second number and divide it by 256^2

Then we will take third number and divide it by 256^3

Then we will take final forth number and divide it by 256^4

 

Now add all results together: (248 / (256 ^ 1 )) + (126 / (256 ^ 2 )) + (017 / (256 ^ 3 )) + (049 / (256 ^ 4 )) = 0.970673632110

After we got 0.970673632110 we will multiply that number by 10001 and the result is

=9707.706994727487

 

Which means dice will roll 97.07

 

Dice calculation done. Leave a heart on this post if you want to know math behind other stake originals.

Also if you have questions feel free to ask.

Edited by nniks19
Posted (edited)
4 hours ago, youcheckibet said:

So are we saying it is fair and not rigged? Same for other originals games? Is this what you have proven?

Well... yes they cant cheat u while you are on seed. t.

3 hours ago, gmjailaidat said:

nice

Thanks for feedback. Would you like to learn more about other stake originals? If yes which one?

3 hours ago, betinkorkuz said:

unlucky game

Unpredictable.

3 hours ago, Ashraul said:

rigged game

 

naah :D 

Edited by nniks19
  • 8 months later...
  • 2 weeks later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Privacy Policy Terms of Use