Bitcoin Forum
May 14, 2024, 06:36:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: If I wanted to start a Bitcoin casino... [will pay for help]  (Read 9065 times)
PawShaker
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile
April 09, 2012, 02:14:05 PM
 #21

[...]
Whoa... heavy shit..

I like what I read, the little I understand Wink

Ok, how can I make it more aprochable?

The concept of commutative chipper is quite simple. It is like adding paddlocks to a chest. It does not matter in which order you put them on and take them off, as long as all have been taken off.

The phase of shuffling: put your paddlock and shuffle around.
The phase of dealing cards: remove paddlocks so that the receiver of the card unlocks it last.

1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS
1715668572
Hero Member
*
Offline Offline

Posts: 1715668572

View Profile Personal Message (Offline)

Ignore
1715668572
Reply with quote  #2

1715668572
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715668572
Hero Member
*
Offline Offline

Posts: 1715668572

View Profile Personal Message (Offline)

Ignore
1715668572
Reply with quote  #2

1715668572
Report to moderator
1715668572
Hero Member
*
Offline Offline

Posts: 1715668572

View Profile Personal Message (Offline)

Ignore
1715668572
Reply with quote  #2

1715668572
Report to moderator
1715668572
Hero Member
*
Offline Offline

Posts: 1715668572

View Profile Personal Message (Offline)

Ignore
1715668572
Reply with quote  #2

1715668572
Report to moderator
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
April 09, 2012, 07:46:57 PM
 #22

There is a method to play cards on internet and be fair and secure. However, I expect a generous tip, do you agree? If you agree then read on  Wink

1. There are N players at the table.
2. Each player generates his own encryption and decryption keys for commutative chipper. Both are secret. (More about such chippers later.)
3. A salt is selected and published.
4. Player 1 creates a deck. Each card consists of plain text: card,siut,salt
5. Each player, including player 1, encrypts each card with his own encryption key, shuffle the whole deck, and then passes the deck to a next player.
6. When the deck has been encrypted and shuffled by everyone, anyone can be a dealer. It can be player N, or 1, or random one.
7. When dealer wants to give a card to player K, he first passes this card to Player K+1 for decryption. (Of course if card is for player N then start with player 1.) Each player, starting with K+1, decrypts the card and passes it to next one (player 1 is next after player N). In this way Player K gets the card last. When decrypted by player K, the card will read: card,siut,salt. If message is readable (salt does match) then no tampering has occured.

Since player K is the last to decrypt the card, he can be sure no one else knows what card he was delt! You can play any kind of card game in this way. How cool is that?

Now about commutative chipper as prommised in step 2. This is a chipper where E(key1, E(key2, message)) = E(key2, E(key1, message)). This means that you can decrypt in any order.

You can use a variation of RSA encryption to achieve this. In this variation both encryption and decryption keys are SECRET. However, the parameters necessary to generate them are public. In particular two prime numbers are disclosed.

So we publicly generate two large prime numbers p and q, then calculate n=p*q and PHI=(p-1)*(q-1).

Next each player in secret picks up his own encryption key e which is relatively prime to PHI. If N is large that is trivial with ony few trials and errors.

Each player, also in secret, calculates decryption key d=e^(-1) mod PHI.

Encryption is calculated as c = m^e mod n (where c stands for cypertext and m for message).
Decryption is calculated as m = c^d mod n.

For the sake of this example m = (card-2) + 13 * siut + 52 * salt
card = (m mod 13) + 2
siut = floor(m/13) mod 4
salt = floor(m/52)

My tip wallet is 1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS   Smiley

Edit: typo

So if one player leaves at any point the hand is stuck? Or is it less strict than that?

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
PawShaker
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile
April 11, 2012, 04:18:13 AM
 #23

[...]
So if one player leaves at any point the hand is stuck? Or is it less strict than that?

I gave it a bit of thought. Yes, a denial of service attack is possible. However, it is a bit like chicken and egg problem. If remaining N-1 players can cooperate to find out what is hidden in cards that have not been dealt, then they can, by elimination, find out what the last player has in hand.

1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS
Pages: « 1 [2]  All
  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!