EuchreMaster
Verify a deal
After a hand against the computer, EuchreMaster gives you a deal receipt. This page lets you check that receipt yourself, without trusting the app.
A receipt has three parts:
- The fingerprint. The app shows it before the hand. It is a scrambled summary of a secret seed. It commits the app to that seed without revealing it.
- Your cut. What you entered when you cut the deck, as shown on the receipt.
- The seed. The secret itself, revealed after the hand is over.
There are two checks:
- The seed matches the fingerprint. This shows the seed was fixed before the hand and was not swapped afterward.
- The seed and your cut produce the cards that were dealt. This page works out the deal from the seed and the cut. You compare it with the hand you played.
The check runs in your browser. Nothing you enter is sent to us or to anyone else.
How it works
These steps are the whole method. A developer can follow them and get the same deal in any programming language. All text is plain ASCII, and every hash is SHA-256.
- Fingerprint. Hash the seed as its 64 characters of text (not as 32 raw bytes) and write the result in lowercase hex. That is the fingerprint.
- Random numbers. For k = 0, 1, 2 and so on, hash the text
seed + ":" + cut + ":" + k, with k written as a decimal number. Each hash is 32 bytes. Read it as eight unsigned 32-bit numbers, big-endian, in order. Use the numbers in order, moving to the next hash when one runs out. - Starting deck. Suits in the order clubs, diamonds, hearts, spades. Within each suit the ranks 9, 10, jack, queen, king, ace. So position 0 is the 9 of clubs and position 23 is the ace of spades. With the joker option, the joker is added at the end as position 24.
- Shuffle. With n cards in the deck, for i from n - 1 down to 1: take the next number u, set
j = floor(u * (i + 1) / 2^32), and swap the cards at positions i and j. - Deal. Deal from position 0 in packets of 3, 2, 3, 2, 2, 3, 2, 3 cards. Number the seats 0 for you, 1 for the player on your left, 2 for your partner and 3 for the player on your right. The first packet goes to the seat after the dealer, and each later packet goes to the next seat, where the seat after 3 is 0.
- Turned-up card and kitty. After those 20 cards, the next card (position 20) is the turned-up card. The cards left over are the kitty: 3 cards, or 4 with the joker.
You can check the fingerprint without this page. On a Mac or Linux computer, put your seed in place of SEED and run this in a terminal:
printf '%s' "SEED" | shasum -a 256The 64 characters it prints should be the fingerprint.
What this proves
- The deal was locked in before the hand. The app showed the fingerprint first and cannot find a different seed that gives the same fingerprint.
- Once you cut the deck, the app could not choose the deal. The cards depend on your cut as well as the seed, and the seed was already fixed when you cut.
Receipts apply to games against the computer. Hands dealt in online games and the Daily Deal do not have receipts. This check says nothing about anything other than how the cards were dealt.