Bitcoin Forum
May 11, 2024, 12:06:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question for Casino Owners - How do you secure hashchain?  (Read 52 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
webtricks (OP)
Legendary
*
Offline Offline

Activity: 1918
Merit: 1728


View Profile
October 19, 2020, 07:04:36 AM
 #1

As we all know, hashchain is commonly used in multiplayer games like Crash where each successive hash is a SHA256 hash of the previous hash and then hashes are used in reverse order as the server seed.

However, unlike data fields like password which are input by the players and can be encrypted using bcrypt or other encryption because encrypted data is compared with the user's input on login, the same cannot be applied to the hashchain.

So my question is for the casino owners or anyone who has knowledge about casino backend development. Please provide your insights on the following questions, it could be helpful for the community:

Q. Do you keep th entire hashchain on the live database or only a chunk for next 100-200 rounds?
Q. Do you keep bare hashes or encrypted? If encrypted then using which encryption and how is the hash decrypted before each round?
Q. How do you keep hashchain secure?
Q. Has your hashchain ever compromised? If yes, how did you tackle the hack?
Q. It may be possible that a player got hold of the hashchain. In such condition,  he may smartly use hashes and make infinite profits on games like Crash. So do you regularly check players' accounts and scrutinise whether someone making huge profits? If yes then did you replace your hashchain considering the possibility of compromise?

(self-mod to remove irrelevant answers)
1715429168
Hero Member
*
Offline Offline

Posts: 1715429168

View Profile Personal Message (Offline)

Ignore
1715429168
Reply with quote  #2

1715429168
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715429168
Hero Member
*
Offline Offline

Posts: 1715429168

View Profile Personal Message (Offline)

Ignore
1715429168
Reply with quote  #2

1715429168
Report to moderator
1715429168
Hero Member
*
Offline Offline

Posts: 1715429168

View Profile Personal Message (Offline)

Ignore
1715429168
Reply with quote  #2

1715429168
Report to moderator
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
October 19, 2020, 08:38:13 PM
 #2

As we all know, hashchain is commonly used in multiplayer games like Crash where each successive hash is a SHA256 hash of the previous hash and then hashes are used in reverse order as the server seed.

Just to drop some history, this method was either invented by (or at least: suggested by) Dooglus, as a solution for how to make bustabit provably fair. I was the person to first implement it (and added the seeding event to avoid the possibility of picking a bad hash chain).

Quote
Q. Do you keep th entire hashchain on the live database or only a chunk for next 100-200 rounds?

On one extreme you can only storing the last games hash. But then it'll take linear [to the amount of how far the game is from the end time to calculate a given game ids hash. The other extreme would be to store every hash but you can lookup any games hash in const time.  As you noted, you could for instance do a hybrid solution and store the hash of every Nth game. This would work fine, but I don't think you could justify the complexity unless you had a MASSIVE hash chain. Most bustabit-clones have a hashchain of ~10M or so. That's nothing to store.  But if you had a much faster paced game, and needed a hash chain of billions .... it probably would make sense to only store every 1000th or so hash, and derive from it.

Quote
Q. Do you keep bare hashes or encrypted? If encrypted then using which encryption and how is the hash decrypted before each round?
Well generally they're going to be stored in a database, and generally that database is going to have some sort of physical drive encryption. But fundamentally before (or at least during) each game, the game server needs to know when the game will bust ...

Quote
Q. How do you keep hashchain secure?

Same way you keep any secret secure, I guess. A good starting point is perhaps to store the secrets on a machine that is physically in your possession. Probably a little harder for it to be compromised than cloud servers, for instance.

Quote
Q. Has your hashchain ever compromised? If yes, how did you tackle the hack?
Q. It may be possible that a player got hold of the hashchain. In such condition,  he may smartly use hashes and make infinite profits on games like Crash. So do you regularly check players' accounts and scrutinise whether someone making huge profits? If yes then did you replace your hashchain considering the possibility of compromise?

I remember the monero (?) guys wrote a paper on how you'd detect someone cheating in dice, which is the same thing. Basically I think their solution was to look at something to do with the amount of variance in their wins.   In practice, it wouldn't be very useful at all against someone smart who knew the busts...   After all, there's a constant stream of people winning millions -- it's pretty easy for someone who knows the busts to blend into the people who are lucky.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
webtricks (OP)
Legendary
*
Offline Offline

Activity: 1918
Merit: 1728


View Profile
October 20, 2020, 06:34:53 PM
 #3

Thanks for your valuable insights @Rhavar, it's always great to hear things from the creator himself!

As we all know, hashchain is commonly used in multiplayer games like Crash where each successive hash is a SHA256 hash of the previous hash and then hashes are used in reverse order as the server seed.

Just to drop some history, this method was either invented by (or at least: suggested by) Dooglus, as a solution for how to make bustabit provably fair. I was the person to first implement it (and added the seeding event to avoid the possibility of picking a bad hash chain).


Well, hash chain is a popular method used in cryptography and has several applications outside gambling. I am not sure if it is Dooglus who invented this method. But still kudos to him for suggesting the applicability of hashchain in bustabit provably fair script.



Quote
Q. Do you keep bare hashes or encrypted? If encrypted then using which encryption and how is the hash decrypted before each round?
Well generally they're going to be stored in a database, and generally that database is going to have some sort of physical drive encryption. But fundamentally before (or at least during) each game, the game server needs to know when the game will bust ...

Quote
Q. How do you keep hashchain secure?

Same way you keep any secret secure, I guess. A good starting point is perhaps to store the secrets on a machine that is physically in your possession. Probably a little harder for it to be compromised than cloud servers, for instance.


So in short, can we say casinos should always keep the hash chain on a machine physically owned by them? If casinos are using web hosting or other cloud solutions, they should only upload hashes for every Nth game on the live database. Rest should be securely kept on an offline storage machine.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!