Uhm, you should actually post the hash of the secret seed, let people collectively decide on a user seed, and use an offline system for doing the rolls so we all can be (twice) sure that the nonce is starting on 1. If you need, I can point to some code that does the rolls exactly in the same manner that just-dice does, and the secret seed is also picked by using OpenSSL.
I could possibly do that, the problem is doing multiple rolls, it could become very complicated and leave room for accusation or something.
I'm not seeing how this is complicated, care to explain ? I'm not seeing how people are going to accuse you if you do the way I mentioned.
Because how would drawing a secret without anyone else seeing be able to prevent me from basically redrawing the secret so that a certain address would win (thus someone would say I own that address that won 4 BTC). If I use OpenSSL to draw secret seeds, someone else would have to verify that I did not draw more then 1 or draw more then 11 whichever people decide. I would have to record it I guess and still people could say, you recorded it more then once. Thus, the fairest way I see it, is to use someone else's dice site which has public lookup of draws, to prove I only drew 11 times or however many was needed to pick 11 winners.
I'm not sure if you ignored what I wrote or you misunderstood it completely, so I will do an actual example that you can replicate and use for your own lottery and will be fairer for everyone involved.
The code is based on the lines in yellow at
https://github.com/knowitnothing/misc/blob/master/justdice/no_browser_bot/browserless_dummy.py#L1-L23Now you are planning to start selling your tickets, let's say that. So you generate a secret seed:
secret = gen_server_seed()And publish its hash by doing:
secret_hash = hashlib.sha256(secret).hexdigest()For the secret I obtained,
secret_hash == "ec11a5e6acac0cd3513bab4d12a31175ea40a61867b56e766d29d7390ddcc8c4". So you publish (i.e., write it in your post) it and then actually start selling the tickets.
Now for the user seed: pick the first two letters from each address received, according to the ordering you will be using for the prizes, and concatenate them all. So let's say the user seed turned out to be "abcdefghijklmnop" (i.e., you sold eight tickets). So now the period for buying tickets ended, and then you do the rolls starting with nonce at 1. Suppose you want 10 rolls:
for i in xrange(1, 10 + 1):
print 'roll %d: %s' % (i, dice_roll(secret, user_seed, nonce=i))
Using the secret I obtained earlier, and that everyone already knows its hash, I obtain the following rolls:
roll 1: 19.2738
roll 2: 89.8953
roll 3: 16.2619
roll 4: 12.9331
roll 5: 93.4046
roll 6: 53.9519
roll 7: 53.4825
roll 8: 39.0345
roll 9: 55.241
roll 10: 28.1354
The secret seed used was "Cdg7b8z6ZHvX5MTMsS8yGUsnizL_Emi.kO6wtjnTLMYuY0ArpFDm25qcwsJ521rk". How can you cheat this ?