encryption - How to synchronize a nonce between two ...

BetHash - How Provably Fair Isn't as Fair as it Looks

BetHash - How Provably Fair Isn't as Fair as it Looks
https://preview.redd.it/sm725nui67441.png?width=1020&format=png&auto=webp&s=20a9e7ff2f304064facd7be546e1f0ec2548daee
In our previous post, we took a look at how Bethash uses an entirely new system to prove fairness, as compared to cryptocurrency casinos that use an older system, known as ‘provably fair’.
In this article, we will explore the practicality of an absolutely fair casino and identify some of the flaws that exist in the provably fair system. These issues, in addition to some other limitations of the technology, are what prompted the BetHash team to begin using blockchain-based provable fairness.

Quick Recap on Fairness: 3 versus 21

If you remember correctly, our previous article explained the basics of how the provably fair system works. The provably fair system works because of 3 components: the server seed, client seed, and the nonce.
Now, for the sake of argument, if any two of these three components are compromised, then the security of the provably fair system breaks down. We will get into the specifics of how this might occur in the next section.
The way BetHash differs here is in fact of a simple numbers game. Instead of relying on three components as per typical provably fair casinos, BethHash relies on the 21 block producers of the EOS blockchain network.
As we have previously explained, the EOS network has a decentralized network of 21 block producers that secure the blockchain network against mutability. If you were to somehow trying to alter the results of BetHash, you would first have to first corrupt at least 11 of the 21 EOS block producers, which is a practically impossible task, since each block producer is voted into position by tens of thousands of EOS users.
Because of this, subvert even one of the EOS block producers is a nigh-impossible task, since every EOS block producer is a well-known, reputable force in the EOS community.

How is the Provably Fair System Corruptible?

The answer to this question lies more in human error and human nature rather than the technology itself. The implementation of the provably fair system differs from casino to casino, which can mean different casinos have loopholes not present in most others.
Then comes the concept of a Zero-day attack. Consider this; the first generation of online casinos used random number generators (RNGs) to ensure fairness until it was discovered that RNGs were not secured enough. This was primarily due to the faulty implementation of the number generation algorithm. A great example is this case, where one person was able to accurately figure out how the cards were being shuffled in an online poker game, despite them being arranged using random numbers.
A Zero-day attack can be defined as the exploitation of faulty code or faulty implementation of a perfectly fine code despite the implementor (in this case, a casino) knowing about this vulnerability. With this in mind, let's take a look at two examples of how a provably fair system could have hidden vulnerabilities:

Example 1: Nonce overflow

This vulnerability has to do with a faulty way of storing the nonce in an unsecured unsigned integer variable. This could, in turn, lead the nonce variable to overflow after a certain number of bets have been made and cause it to return 0, resulting in every future roll to become predictable.
For a detailed explanation of how a Nonce overflow flaw works, visit this article.

Example 2: Force-It Box

In this second example, one programmer was able to detect two vulnerabilities in the way the provably fair system was implemented by one bitcoin dice site. First, the programmer discovered that there was no way for the client-side seed to be entered in the roll, which meant the website could still manipulate the results.
But the second and the bigger vulnerability was caused by the fact that the starting seed was exposed, giving anyone with enough gusto the ability to brute force the encryption and predict all the rolls.
For a detailed overview of how the Force-It Box vulnerability works, visit this GitHub post.

In Summary

As you can see, although implementing a provably fair system is certainly a step in the right direction towards fairness, faulty implementations can cause the system to break down. On the other hand, with BetHash you are putting your trust in 21 incorruptible factors (EOS block producers) making BetHash a pioneering endeavor towards the evolution of fairness in online games.
https://preview.redd.it/kbv1rwfh67441.png?width=1080&format=png&auto=webp&s=a79ef3286f81ccfe2a2473ee88ec2335e93c7e8a
Want to receive 100 Bonus Spins to help kick start your epic BetHash journey? Simply click here and follow the instructions to begin.
submitted by bethashio to bethashcasino [link] [comments]

I Created a Custom Lightning Payment Jackpot Website from Scratch, This Is What I Learnt

TL;DR: I wanted to learn how the Lightning Network operates. So I came up with an idea for a jackpot site using the Lightning Network to handle micro-payments. Operating a Lightning node is complicated and challenging for a beginner. Using custodial wallets like Wallet of Satoshi, BlueWallet or Breez is easy to use but not your keys. Please come by and help me test my Lightning integrated new website. I’m happy to help anyone that’s new to Lightning setup a wallet and play a game. It all helps with learning and adoption, that’s why we’re all here! Long Bitcoin, Short the Bankers!

Introduction: Welcome to a brand new concept in random number seeding. Generating a truly random number is quite hard. You could use the current time, divided by the RPM spin of your hard disk, squared by the temperature of your CPU, and so on. Other extreme methods include measuring quantum fluctuations in a vacuum, see ANU Quantum Random Number. All these methods are fine but none of these are really verifiable by a 3rd party. Whoever running the system can change the outcome. I'm not saying they do, simply stating that if the payoff was great enough to alter the 'reported' outcome they could. So what's different here? We're using the Bitcoin blockchain itself as the arbitrator. Every outcome is not only provably fair but verifiably fair and immutable. Trying to cheat this system is impossible.

So that’s the pitch. Make a website using the idea of whoever’s guess is closest, wins the jackpot; using Lightning to handle all the incoming and outgoing payments. I started to look around at other fully functional websites offering Lightning as a payment method. It turns out most use a 3rd party like OpenNode or CoinGate. To me, this defeats the whole purpose of Bitcoin. Why build a website/offer a service/offer Lightning as a payment method if you don’t even own or control your funds. A payment processor could simply turn off withdrawals and it’s over. Not your keys, not your coins!

It’s been quite a learning experience for me. I think the most frustrating thing to figure out and attempt to solve was channel capacity. For example, with a fresh new wallet setup on Bitcoin Lightning for Andriod (blue bolt logo), you can open a channel to anyone fine, but trying to receive money won’t work. I think for a beginneadoption this is the greatest hurdle to understand/overcome.
You need to spend money so the other side has some collateral to send back. One explanation I read was, opening Lightning channels are like a full glass of water, I need to tip some of my water into your empty glass so my glass has some room to fill it back up, it can’t overflow. Another one is like beads on a string. The number of beads is up to you but if all the beads are on your side, the other party can’t push any beats your way because you have them all. There’s ways to fix this. Either spend into the channel or buy incoming channel capacity. On the spend side, you can use websites like lightningconductor.net which allow you to send money to their Lightning node, from your new channel, and they’ll send the coins to your on-chain Bitcoin wallet. This is a simple way to empty your glass or push those beads to the other side and still retain all your money, minus LN and on-chain fees. For incoming capacity, you can use LNBig and get 400k satoshis of incoming capacity for free or lightningto.me, or you can pay lightningpowerusers.com or bitrefill.com to open larger capacity channels to you for a small fee.

For a beginner or someone new to Bitcoin/Lightning, using a custodial wallet like BlueWallet, Wallet of Satosh or Breez is far easier than trying to setup channels and buy or massage incoming capacity. You can simply install the application and using lightningconductor.net BTC to LN you can send some Bitcoin and they’ll forward it on to your lightning wallet, for a fee. These custodial wallets accept incoming transactions of 1 million satoshis or more. So now you’ve got a working wallet that’s got a few thousand satoshis, keep reading!

How to play: Two things are verifiable on the blockchain, time between blocks and transactions included in that block. First choose which block#, by default it will be the next one coming up. Then choose a public alias, others will be able to see your bets but they won’t know if you’ve paid or not, only you can see that. Next, guess the time it will take to mine the next Bitcoin or the number of transactions in that block. You can make multiple guesses. If you want to place a number of spread bets, I suggest opening a spreadsheet and getting it to generate the times or transactions for you. For example, put in 2300, then 2350, 2375, 2400, then drag down to generate as many in the sequence as you want. You can bet a maximum of 25 per invoice. This will hopefully ensure the small transaction amount will be successful. Once you’ve generated an invoice, pay it from the QR code or the lightning bolt11 string.
Now you’re ready to go. Wait till the next block goes active or the block you’ve bet on and you’ll see your bets and everyone else’s. Most importantly, what the final jackpot is. Unpaid invoices are discarded. If the block rolls over while you’re making up your mind the page will refresh and you could lose your input. Please plan your bets in notepad or a spreadsheet. I know this is annoying but I never claimed to be a UX codedesigner! It was a struggle getting all the css, ajax and javascript working, ahhhrrrrggg!! Next is the interesting part as this game can become competitive.

Game theory: As others make bets, you can encapsulate theirs. For example, they guess 2750 transactions, you can bet 2749 and 2751. While at first this seems unfair, what it doesn't show is what bets have been paid for and what have not. Only you can see your own bets that are paid and unpaid. To everyone else they look like paid bets. Only when the next block/jackpot starts can you see what's been paid for as unpaid bets are discarded. By placing dummy bets, unpaid, you can sucker someone in and greatly increase the jackpot payout at no cost to yourself. You can also use the same alias, for example, open up two different browsers, one for real bets and one for fake bets. This is why there’s a 25 bet limit, I don’t want people going too crazy with this. You can check your bets in the footer bar under ‘previous bets’. Also, IMPORTANT, please keep track of your account number at the top. If your session or browser has a problem, you can lose access to your bets and jackpot winnings. If this happens and you receive a new account number, simple use the claim jackpot in the footer to claim your winning jackpot. If you don’t have this, I can’t help you if something goes wrong. Rather than having a login/password system you have a unique account id. Don’t lose it! Now back to the blockchain.

What a minute… I though it took 10 minutes to confirm a block? Not always, actually it does this very rarely. If you average out every block over time, it averages around ten minutes. A block is confirmed when a miner takes transactions from the memory pool, up to ~1.2mb worth. Next, now this is the hard part, they need to generate a hash for that block, but it needs to start with X number of leading zeros. To achieve this, they use a random number called a nonce to seed/salt the hash and hopefully, it contains X number of zeros at the start of the block hash. If not, discard and keep trying. The winning block contains the miners local time, which can sometimes be wrong. This is why sometimes you get negative block times. See block #180966 then the next block, #180967's time stamp is before the first one! Who cares, as long as the later block references the previous block to keep the chain intact. You can’t guess negative numbers but you can guess 0 seconds. Which I guess is like betting on the green zero in roulette.

Ready to play?
Each bet is worth 5,000 satoshis. I wanted it to be expensive enough to prevent spam and also the jackpots be large enough that it would be worth playing. I hope you have fun.
Website is https://blockwisdom.com
My Twitter handle is @nixdice
If you have any questions or issues, please contact me here or on Twitter I’ll try my best to sort it out quickly.
submitted by nixdice to Bitcoin [link] [comments]

How Does Blockchain Work? - YouTube what is bitcoin for youtube? Bitcoin Miner - What is a Bitcoin Miner? - Video Freebitco in Fair Game Proof Bitcoin Q&A: Governments vs. Proof-of-Work or Proof-of-Stake

The nonce can be obtained by using web3.eth.getTransactionCount. There is no built-in method for a contract to access an account's nonce, including its own. (A contract could use its storage to keep track of its own nonce.) Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.. Visit Stack Exchange Bitcoin puts the current compact-format target and the arbitrary-precision "extraNonce" number there, which increments every time the Nonce field in the block header overflows. Outputs can be anything, but Bitcoin creates one exactly like an IP address transaction. The extranonce contributes to enlarge the domain for the proof of work function. Miners can easily modify nonce (4byte), timestamp ... Remember that case of, I send you 0.1 Bitcoin and 0.9 back to me, but 0.9 goes to the attacker and then we still have to worry about the chosen nonce attack or the randomness on signing, the K value in your ECDSA signature. So it’s that what you described for experts I think is good, but it’s very, very hard. And so I would say for normies you know, for an expert looking to store a small ... The nonce field of a block header is 4 bytes, so the max nonce is: 4,294,967,295. That could be computed in a few seconds with a reasonable rig (solo mining) or much quicker on large pools. What ha...

[index] [51464] [15357] [43051] [42032] [38402] [2820] [41287] [8659] [27327] [4562]

How Does Blockchain Work? - YouTube

what is bitcoin network, what is bitcoin nonce, what is bitcoin zee news, what is bitcoin on youtube, what is bitcoin official website, what is bitcoin plus, what is bitcoin pool, what is bitcoin ... its based on combination of .. SERVER SEED SERVER SEED HASH CLIENT SEED : NONCE : ***** 100 Crptocurrency Gambling online https://goo.gl/QepNkV BTC BCH ETH LTC BCN XRP DOGE BCN NEO XEM DASH ETC ... Bitcoin Mining https://play.google.com/store/apps/details?id=com.bitcoinmining bitcoin mining calculator bitcoin mining rig bitcoin mining hardware bitcoin m... what is bitcoin what is bitcoin mining what is bitcoin worth what is bitcoin backed by what is bitcoin payment what is bitcoin address what is bitcoin wallet... If multiple governments collaborated, could they launch a 51% attack on Bitcoin? If all it takes to attack a proof-of-work (PoW) network is enough electricity, wouldn't you want the game theory of ...

#