Author

Topic: How can I create server seed for a gamble game? (Read 1289 times)

legendary
Activity: 1498
Merit: 1000
If you have to ask this question, this probably means you shouldn't be running a game like dice. I get low-level hacking attempts everyday towards my server, just a warning if you can't defend this attacks you will be run down very fast.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
Generate random values using Node.js crypto module

Alternative to the above mentioned options might be generation of random values using crypto.randomBytes(size, [callback]) method from crypto Node.js module. randomBytes returns a buffer with randomly generated bytes. It can work asynchronously (when callback function is provided) or synchronously (only size parameter is provided). Returned buffer can be transformed using different encodings to get required format.
full member
Activity: 238
Merit: 106
Thanks friends. I'm not using php so that link is not for me. I will go with sha512 I guess.

Yes, but what random number generator are you using?

Some can allow hackers to gain advantage above house edge.
full member
Activity: 140
Merit: 100
ACCOUNT BANNED. Email in sig!!
Thanks friends. I'm not using php so that link is not for me. I will go with sha512 I guess.
How are you generating the server seed? I really hope that you are using something that is server sided.
Yea how is he doing this without php. I thought php was the only option for this kind of thing.
copper member
Activity: 3948
Merit: 2201
Verified awesomeness ✔
Thanks friends. I'm not using php so that link is not for me. I will go with sha512 I guess.
How are you generating the server seed? I really hope that you are using something that is server sided.
full member
Activity: 244
Merit: 101
Thanks friends. I'm not using php so that link is not for me. I will go with sha512 I guess.
full member
Activity: 140
Merit: 100
ACCOUNT BANNED. Email in sig!!
I have run a casino and sell scripts to many people. If you want a provably fair system with an automatic secret generating script, pm me. I could help you out.
full member
Activity: 238
Merit: 106
You need crytpographically secure random func, many standard rand funcs are not.

If using PHP server side then take a look at this:

http://php.net/manual/en/function.openssl-random-pseudo-bytes.php

Then hash it, if you want to be really tight (maybe overkill for gambling with low max bets) then use multiple hashes of whirlpool.
member
Activity: 112
Merit: 10
Normally the way I have seen it done is take a random alphanumeric string.

Then hash it in SHA512 or equivalent and show it to users.
full member
Activity: 244
Merit: 101
Fixed.
Jump to: