Bitcoin Forum
May 01, 2024, 04:53:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multiplayer Keno seed event - BC.Game  (Read 485 times)
BC.GAME (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 238
Merit: 111



View Profile WWW
June 16, 2020, 11:45:22 AM
Last edit: June 22, 2020, 06:03:27 AM by BC.GAME
Merited by icopress (5)
 #1

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714582413
Hero Member
*
Offline Offline

Posts: 1714582413

View Profile Personal Message (Offline)

Ignore
1714582413
Reply with quote  #2

1714582413
Report to moderator
1714582413
Hero Member
*
Offline Offline

Posts: 1714582413

View Profile Personal Message (Offline)

Ignore
1714582413
Reply with quote  #2

1714582413
Report to moderator
1714582413
Hero Member
*
Offline Offline

Posts: 1714582413

View Profile Personal Message (Offline)

Ignore
1714582413
Reply with quote  #2

1714582413
Report to moderator
BC.GAME (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 238
Merit: 111



View Profile WWW
June 17, 2020, 02:38:03 AM
 #2

Block 635,010 is mined
https://btc.com/0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585
So our salt will be
0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585

DarkStar_
Legendary
*
Offline Offline

Activity: 2758
Merit: 3282


View Profile WWW
June 17, 2020, 03:24:39 AM
 #3

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

Quoted and archived.

taking a break - expect delayed responses
BC.GAME (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 238
Merit: 111



View Profile WWW
June 22, 2020, 06:01:32 AM
 #4

Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of Bitcoin block 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.

CHRISBIN702
Sr. Member
****
Offline Offline

Activity: 1120
Merit: 279


My blockchain can beat up your blockchain


View Profile WWW
June 22, 2020, 06:13:37 AM
 #5

I can't help but smile knowing that for a brief period of time, there existed a 1%-2% "Player's Edge" instead of the usual 1% House Edge. Lol.

All joking aside I'm glad that you are paying attention and showing great professionalism in the way you run bcgame. I'm once again, highly impressed.

Not for sale.........
Why, how much you got?
johnjimjack
Member
**
Offline Offline

Activity: 356
Merit: 12


View Profile
June 22, 2020, 06:27:11 AM
 #6

Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of Bitcoin block 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.

Noted.
okseo122
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
June 22, 2020, 06:30:26 AM
 #7

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
   


Noted too
Zaynab
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
June 22, 2020, 06:49:34 AM
 #8

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

This had to be quoted for the record.
BustaMachine
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
June 22, 2020, 06:57:38 AM
 #9

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
Quated bruh it's BustaMachine Wink
BC.GAME (OP)
Copper Member
Full Member
***
Offline Offline

Activity: 238
Merit: 111



View Profile WWW
June 22, 2020, 07:07:20 AM
 #10

Block 635,810 is mined
https://btc.com/000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
So our salt will be
000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
We will use the new algorithm after the Bet #35489 in Keno

Saint-loup
Legendary
*
Offline Offline

Activity: 2590
Merit: 2352



View Profile
June 23, 2020, 08:47:28 PM
 #11

Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.
That's great but why don't you use the same feature (a hash chain) for your crash game? And how do you pick your seeds for this game?
https://bitcointalk.org/index.php?topic=5256606.msg54660157#msg54660157

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
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!