The present invention relates to a method for generating random number for gaming based on blockchain network and a gaming system, and more particularly, to a method for generating random number for gaming based on blockchain network and a gaming system capable of providing fair and trusted random number.
Random numbers are widely used in various applications such as cryptography, gaming, simulations, and statistical analysis. Random numbers play a significant role in games. For example, randomly chosen items or values are important in many games. The random numbers maybe used in game development to create random events, such as game draw, items players pick up, whether an attack lands. In general, random number generators may be used to generate a sequence of unpredicted and independent numbers. The random number generators may be classified into two main types: software-based and hardware-based. The software-based random number generators usually lack enough entropy and true randomness, which make the generated random number vulnerable to various attacks, such as tampering, predicting the outcomes of games of chance. Besides, software-based random number generators are often operated on specific platforms and may be easily packable and remotely controlled by attack owner, and this could also compromise the fairness of the random numbers. Further, the hardware-based random number generator may generate true random numbers by using physical phenomena, such as thermal noise, radioactive decay, or quantum effects. However, if the game server cheats the game players, and intentionally requests the random number generator to generate random numbers multiple times for cherry-picking the desired results. This may result in an unfair and distrusted random number generating process. Thus, the prior art has to be improved.
It is therefore an objective of the present invention to provide a method for generating random number for gaming based on blockchain network and a gaming system capable of providing fair and trusted random number, to solve the abovementioned problem.
An embodiment of the present invention discloses a method for generating random numbers for gaming based on a blockchain network, comprising: generating and broadcasting, by a game server of the blockchain network, a random number request packet to the blockchain network in response to occurrence of a random event in gaming; generating, by a plurality of random number supplier nodes of the blockchain network, a plurality of random numbers in response to receiving the random number request packet; determining, by the plurality of random number supplier nodes, if the respective generated random number conforms to a selection criterion; adding, by one of the random number supplier nodes, an added block corresponding to a first valid random number to the blockchain network; and obtaining, by the game server of the blockchain network, a target random number corresponding to the random number request packet from the plurality of valid random number packets.
An embodiment of the present invention discloses a gaming system, applied in a blockchain network, comprising: a game server, connected to the blockchain network, configured to generate a random number request packet in response to occurrence of a random event in gaming and broadcast the random number request packet to the blockchain network; and a plurality of random number supplier nodes, connected to the blockchain network, configured to generate a plurality of random numbers in response to receiving the random number request; wherein an added block corresponding to a first valid random number conforming to a selection criterion, creating by one of the random number supplier nodes, is added to the blockchain network, such that the game server obtains a target random number corresponding to the added block.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, hardware manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are utilized in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”.
Please refer to
The random number supplier nodes 20_1-20_5 may be connected to the blockchain network 100. The random number supplier nodes 20_1-20_5 are configured to generate a plurality of random numbers in response to receiving the random number request packet. Each random number supplier node may include a registered public key, a corresponding private key and a product certificate. Since the random number supplier node may be applied in gaming, a random number generating source with sufficient fairness and randomness is essential for games to ensure that the results or outcomes of the games are fair and trusted. For example, each random number supplier node may include a certified true random number generator for generating random numbers, and the product certificate of the random number supplier node maybe issued by a manufacturer of the certified true random number generator.
Please refer to
Please further refer to
The product certificate 204 may include a generator ID 2042, a manufacturer ID 2044, a public key 2046 and a signature 2048. The generator ID 2042 represents the identifier of the true random number generator. The public key 2046 represents the public key of the true random number generator. The signature 2048 may be generated by signing the public key 2046 of the true random number generator by using the private key of the manufacturer. The product certificate 204 may further include part or all contents of the manufacturer certificate 202. For example, the product certificate 204 may at least include the signature 2028 of the manufacturer certificate 202.
For an illustration of the operations of the gaming system 1, please refer to
According to the procedure 3, in Step S302, when a random event is triggered in gaming, a random number is required for the random event. For example, a random event (e.g., a game draw) is encountered in gaming. Assuming that a random integer may be generated in the range from one to one hundred. When the obtained random integer is larger than ninety, the game player wins a prize. In response to occurrence of the random event in gaming, the game server (e.g., game server 10_1) may generate a random number request packet and broadcast the random number request packet to the blockchain network 100. Please refer to
In Step S304, the random number supplier nodes 20_1-20_5 are configured to generate a plurality of random numbers in response to receiving the random number request packet. The random number supplier nodes 20_1-20_5 are distributed across the blockchain network 100 such that the random number supplier nodes 20_1-20_5 may receive the random number request packet broadcasted by the game server. For each random number supplier node in the blockchain network 100, when receiving the random number request packet, the random number supplier node may generate a random number according to the random number request packet.
In Step S306, each random number supplier node receiving the random number request packet determines if the respective generated random number conforms to a selection criterion. After generating the random numbers in Step S304, each random number supplier node may determine whether the respective generated random number satisfies a selection criterion. The selection criterion the random number supply node used to determine if the generated random number conforms to is descripted in detail as below. The selection criterion may be associated with a digest value of the generated random number Digestrn, a digest value of the random number request packet Digestreq and a threshold value TH. For example, the digest value of the generated random number Digestrn may be a hash value of the generated random number calculated based on a hash function. The digest value of the random number request packet Digestreq may be a hash value of the random number request packet calculated based on the hash function. For example, the hash values of the random number and the random number request packet may be calculated by using a hash function, such as secure hashing algorithm 1 (SHA-1), SHA-256, SHA-384, SHA-512, but not limited thereto. In an embodiment, the selection criterion may be expressed as follows:
|Digestreq−Digestrn|≤TH
Where Digestreq represents the digest value of the random number request packet, Digestrn represents the digest value of the generated random number, and TH represents the threshold value.
In a word, assume there are numbers of random number supplier node receiving the random number request packet broadcasted from the game server, each random number supplier nodes will determine if the respective generated random number conforms to the preset selection criterion. When determining that the generated random number satisfies the selection criterion, the random number supplier node may create a random number packet corresponding to the generated random number and broadcast the random number packet to the blockchain network 100. Please refer to
In Step S308, an added block corresponding to a first valid random number is added to the blockchain network. For example, there may be at least one random number packet generated based on satisfying the selection criterion and the at least one random number packet may be broadcasted to the blockchain network 100. Each random number packet may be regarded as transaction which needs to be validated by other nodes of the blockchain network 100. All nodes of the blockchain network 100 will reach a consensus that which random number packet is firstly validated. It is to be noted that before validating the random number packet, each node in the blockchain network will also determine if the broadcasted random number included in the random number packet satisfy the preset selection criterion. The blockchain network then reach a consensus on if the random number included in the respective random number packet is a first valid random number. Thereafter the validated random number packet including the first valid random number will be added to the ledger of each blockchain node. After each node within the blockchain network has added the validated random number packet into their ledger, a block corresponding to the first valid random number is added into the blockchain.
In summary, the random number included in the first validated random number packet is determined to be a first valid random number. That is, an added block corresponding to the first valid random number (i.e., the random number packet being first verified to be valid) may be created to the existing blockchain of the blockchain network 100. The added block may include information associated with the corresponding first validated random number packet. In addition, the added block may include some part or all of contents of the first validated random number packet.
As the added block corresponding to the first valid random number is added to the blockchain, the random number generating procedure of the random number request packet is finished. In other words, once random number supplier nodes update their ledger with the added block, they will stop generating random numbers until a next random number request is received. However, due to network latency, some random number supplier nodes may generate and broadcast random number packets conforming to the present criterion before they receive the added block corresponding to the first valid random number. In such a case, the blockchain network must reach a consensus on which block is the first added block. The first validated random number packet can be determined after the consensus is reached. A consensus mechanism must be chosen when establishing the blockchain network, for example, the added block firstly received by a majority of blockchain nodes will be determined as the official first added block. In this way, every random number supplier node has a chance to create the first valid random number, and there will be only one official first added block corresponding to the first valid random number in the blockchain. As such, the game server cannot predict or decide which random number generator node will generate the first valid random number. Also, since the added block corresponding to the first valid random number is stored in the ledger of each blockchain nodes, the first valid random number is publicly verifiable and unchangeable.
In Step S310, the game server 10 may obtain a target random number corresponding to the added block. As the added block which includes the first valid random number is added to the blockchain. The game server may obtain a target random number corresponding to the random number request packet from the added block corresponding to the first valid random number and apply the target random number to execute the random event. For example, the game server may obtain the first valid random number of the first validated random number packet for acting as the target random number corresponding to the random number request packet, and apply the target random number to execute the random event.
For example, please refer to
Therefore, in the gaming system 1, each random number supplier node in the blockchain network 100 may generate random numbers. Once an added block corresponding to the first valid random number is added to the blockchain and the blockchain network has reached a consensus on determining it as the official added block, the game server obtains a target random number corresponding to the first valid random number. For setting an appropriate threshold, each random number generated by the random number supplier node has the same probability to satisfy the selection criterion, such that the game server cannot intentionally select or assign a dedicated random number supplier node to generate the random number and the procedure of generating the random number cannot be tampered. The game server cannot control or manipulate the random number generation process and there is no chance of cherry-picking the generated random numbers. As a result, the embodiments of the present invention provide fair and trusted random numbers thus improving the fairness and trust in gaming.
Moreover, please further refer to
After that, when a next random number request packet 400_2 is broadcasted to the blockchain network 100, a random number packet 500_1 is generated by the random number supplier node 20_1 and a random number packet 500_2 is generated by the random number supplier node 20_2 based on satisfying the selection criterion of random number request packet 400_2. The random number packets 500_1 and 500_2 are broadcasted the blockchain network 100. The random number packet 500_1 is verified to be valid (validated) first by the majority of blockchain nodes, such that the random number packet 500_1 is determined as the first validated random number packet corresponding to the random number request packet 400_2. As shown in
Similarly, when a random number request packet 400_3 is broadcasted to the blockchain network 100, the random number packets 500_2, 500_3 and 500_4 are generated by the random number supplier nodes 20_2-20_4 based on satisfying the selection criterion of random number request packet 400_3. The random number packets 500_2, 500_3 and 500_4 are broadcasted to the blockchain network 100. As shown in
Moreover, after obtaining the target random number, the game server applies the target random number to execute the random event and a result of the random event may be determined by using the target random number. Since information of the generated random numbers is recorded in the blocks of the distributed ledger, the results may be verified, such that the game player or the game server may be allowed to verify whether the result and outcome of the random event is correct and fair.
For example, the first valid random. number 506_5 of the first validated random number packet 500_5 included in the block i has been chosen as the target random number, the random number 506_5 (i.e., target random number) has been applied to execute the random event. Similar with the aforementioned valid random number packet 500 shown in
Moreover, each random number supplier node may include a registered public key, a corresponding private key and a product certificate. Please further refer to
Further, the game player or the game server may verify a manufacturer certificate of the manufacturer of the random number supplier node 20_5. The game player or the game server may obtain the public key of the trusted third-party certification organization, and utilize the public key of the trusted third-party certification organization to verify the manufacturer certificate of the manufacturer of the random number supplier node 20_5 so as to ensure that the manufacturer certificate is certified by the trusted third party. If the manufacturer certificate of the manufacturer of the random number supplier node 20_5 is verified to be valid, this means that the manufacturer of the random number supplier node 20_5 is exactly a certified valid manufacturer capable of manufacturing true random number generator. As such, the random number 506_5 (i.e., target random number) generated by the random number supplier node 20_5 should be fairness and trust random number.
To sum up, under the blockchain network mechanism, random numbers may be generated by the random number supplier nodes distributed across the blockchain network. Since the blockchain network is decentralized, every node in the blockchain network is able to validate the valid random number packet. There is no way to predict which node in the blockchain network will execute and complete the validation of the valid random number packet. As such, the game server cannot control or manipulate the random number generation process. Therefore, the embodiments of the present invention provide fair and trusted random numbers for improving the fairness and trust in gaming. Moreover, the embodiments of the present invention also provide the verifiable random numbers which may guarantee fairness and assurance in games.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
This application claims the benefit of U.S. Provisional Application No. 63/395,330, filed on Aug. 4, 2022. The content of the application is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
63395330 | Aug 2022 | US |