CN111420405A - Block chain technology-based decentralized card game method and system - Google Patents

Block chain technology-based decentralized card game method and system Download PDF

Info

Publication number
CN111420405A
CN111420405A CN202010165735.5A CN202010165735A CN111420405A CN 111420405 A CN111420405 A CN 111420405A CN 202010165735 A CN202010165735 A CN 202010165735A CN 111420405 A CN111420405 A CN 111420405A
Authority
CN
China
Prior art keywords
user
server
game
card
cards
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010165735.5A
Other languages
Chinese (zh)
Inventor
陈霄
李海南
朱礼廷
邹雨豪
陈磊磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202010165735.5A priority Critical patent/CN111420405A/en
Publication of CN111420405A publication Critical patent/CN111420405A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/71Game security or game management aspects using secure communication between game devices and game servers, e.g. by encrypting game data or authenticating players
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F1/00Card games
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F1/00Card games
    • A63F2001/008Card games adapted for being playable on a screen

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain technology-based decentralized card game method and a system thereof, wherein the method comprises the following steps: generating corresponding secret key pairs for a server and user sides of a plurality of users participating in the game, wherein the secret key pairs comprise public keys and private keys; numbering each card in a deck to be dealt; the server and the plurality of the user sides sequentially encrypt the numbered cards in a random way through own private keys; the server distributes the encrypted deck of cards to the user terminals of a plurality of users. The invention provides a block chain technology-based decentralized card game method and a system thereof.A server and a user side of a user participating in a game are distributed to independent secret key pairs, cards used in the game are shuffled through the server and a private key corresponding to each user, and the server distributes each card to be decrypted through the server and the private key corresponding to each user, so that the process is transparent and is difficult to decrypt.

Description

Block chain technology-based decentralized card game method and system
Technical Field
The invention relates to a block chain technology-based decentralized card game method and a system thereof.
Background
With the popularization of the internet, more and more users participate in card games in an internet card game platform. The online chess and card game platforms in the current market are centralized, and the data of users are stored in an online server.
The existing centralized online chess and card game platform has the following defects:
1. the risk of being tampered and damaged in the data transmission process is large.
2. The randomness of the card distribution algorithm cannot be verified, so that the possibility of platform dark box control exists.
Disclosure of Invention
The invention provides a block chain technology-based decentralized card game method and a system thereof, which adopt the following technical scheme:
a decentralized card game method based on block chain technology comprises the following steps:
generating corresponding secret key pairs for a server and user sides of a plurality of users participating in the game, wherein the secret key pairs comprise public keys and private keys;
numbering each card in a deck to be dealt;
the server and the plurality of the user sides sequentially encrypt the numbered cards in a random way through own private keys;
the server distributes the encrypted deck of cards to the user terminals of a plurality of users.
Further, in generating a corresponding key pair for the server and each user, the key pair is generated through an ECC asymmetric encryption algorithm.
Further, the specific method for the server to distribute the encrypted deck of cards is as follows:
when the server distributes a card to the user side of a designated user in the plurality of users, the server and the user sides of other users decrypt the card in sequence through own private keys, finally the card is sent to the user side of the designated user, and the user side of the designated user decrypts the sent card through own private keys to obtain the information of the card.
Further, the method for decentralized card game based on the blockchain technology further comprises the following steps:
in the game process, when a user exits the current game, the user side of the exiting user sends the private key of the exiting user to the server.
Further, the method for decentralized card game based on the blockchain technology further comprises the following steps:
and regenerating corresponding key pairs for the server and the user sides of a plurality of new users participating in the game when the game is ended.
Further, after generating corresponding key pairs for the server and the user terminals of the plurality of users participating in the game,
the decentralized card game method based on the block chain technology further comprises the following steps:
the server and the user terminals of the plurality of users acquire and verify the public keys of the other users.
Further, the server and the user sides of the plurality of users verify the public key of the opposite party by combining the ECDH algorithm and the AES algorithm.
A decentralized card game system based on blockchain technology, comprising:
a server;
a plurality of user terminals for connecting a plurality of users participating in the game to the server;
the server includes:
the system comprises a secret key generation module, a secret key generation module and a secret key management module, wherein the secret key generation module is used for generating corresponding secret key pairs for a server and a plurality of user sides, and the secret key pairs comprise public keys and private keys;
the first secret key storage module is used for storing a secret key pair of the server and public keys of a plurality of user sides;
the numbering module is used for numbering a pair of cards to be distributed;
the first encryption module is used for randomly encrypting a deck of cards through a private key of the server;
the first decryption module is used for decrypting the encrypted deck of cards through a private key of the server;
the user side includes:
the second secret key storage module is used for storing the secret key pair of the user side and public keys of the server and other user sides;
the second encryption module is used for randomly encrypting a deck of cards through a private key of the user side;
and the second decryption module is used for decrypting the encrypted deck of cards through a private key of the user side.
Furthermore, in the game process, when a user exits the current game, the user side of the exiting user sends the private key stored in the second private key storage module corresponding to the exiting user to the server;
and a first secret key storage module of the server stores the received private key of the user side of the quitting user.
The invention has the advantages that the provided decentralized card game method based on the block chain technology and the system thereof are characterized in that the server and the user terminals of the users participating in the game are distributed to independent secret key pairs, the cards used in the game are shuffled through the server and the private key corresponding to each user, in addition, the server distributes each card to be decrypted through the server and the private key corresponding to each user, and the process is transparent and difficult to decrypt.
Drawings
FIG. 1 is a schematic diagram of a block chain technology based decentralized card game method of the present invention;
figure 2 is a schematic diagram of a block chain technology based decentralized card gaming system of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and the embodiments.
Fig. 1 shows a method for decentralized card game based on blockchain technology, comprising the following steps: s1: and generating corresponding key pairs for the server and the user sides of a plurality of users participating in the game, wherein the key pairs comprise public keys and private keys. S2: each card in the deck to be dealt is numbered. S3: the server and the plurality of the user sides sequentially encrypt the numbered cards at random through private keys of the server and the plurality of the user sides. S4: the server distributes the encrypted deck of cards to the user terminals of a plurality of users. Through the method, the server and the user terminals of the users participating in the game are respectively provided with independent secret key pairs, the cards distributed in the game process are subjected to shuffling (encryption and randomization) through the server and the private key corresponding to each user, and in addition, the server distributes each card and needs to be decrypted through the server and the private key corresponding to each user, and the process is transparent and difficult to crack.
The above steps are specifically described below.
For step S1: and generating corresponding key pairs for the server and the user sides of a plurality of users participating in the game, wherein the key pairs comprise public keys and private keys.
In the game platform, after the users participating in the game confirm the start of the game, the server and the user end of each user are respectively distributed to a corresponding key pair for subsequent encryption and decryption. Specifically, a corresponding key pair is generated for each server and each user, and the key pair is generated through an ECC asymmetric encryption algorithm.
For step S2: each card in the deck to be dealt is numbered.
After the secret key pair is distributed, the server firstly numbers a pair of cards to be distributed according to a certain rule.
For step S3: the server and the plurality of the user sides sequentially encrypt the numbered cards at random through private keys of the server and the plurality of the user sides.
For the numbered deck, the server and the user end of each participating user participate in the random encryption process, i.e. the server and each participating user participate in shuffling. The process of randomly encrypting the deck of cards by the server and the user end of each user appears to be both encrypting each card and swapping the order of the cards. In the invention, the random encryption is E-mode encryption, namely, the order is irrelevant, which accords with the exchange law, and the encryption process is also the process of changing the order of the cards. The specific process is as follows: the server randomly encrypts each card in the deck of cards through a private key of the server and transmits the card to a user side of one user, the user side randomly encrypts each card in the deck of cards through the private key of the user side and transmits the card to a user side of the next user, and finally the deck of cards which are randomly encrypted by the server and the user sides of all the participating users are transmitted back to the server after the user sides of all the participating users participate in the random encryption process.
For step S4: the server distributes the encrypted deck of cards to the user terminals of a plurality of users.
After the encrypted shuffling process described above, the server begins to distribute cards. When the server distributes a card to the user side of a designated user in a plurality of users, the server and the user sides of other users decrypt the card in sequence through own private keys, finally the card is sent to the user side of the designated user, and the user side of the designated user decrypts the sent card through own private keys to obtain the information of the card.
Specifically, since the server and each of the users participating in the game encrypt each card by their own private keys, each card dealt by the server needs to be decrypted by the server and all of the users' private keys. For example, suppose that the participating users include a user a, a user B, a user C, and a user D, suppose that the server wants to send a card to the user a, the server decrypts the card by its private key first, and then sends the card to the user side of the user B, the user side of the user B decrypts the card by its private key and sends the card to the user side of the user C, the user side of the user C decrypts the card by its private key and sends the card to the user side of the user D, the user side of the user D decrypts the card by its private key and sends the card to the user side of the user a, and at this time, the user side of the user a can obtain the specific information of the card after decrypting the card by its private key. According to the corresponding game rules, when the card is a dark card, the user A does not disclose the card, only the user A can see the information of the card, when the card is a bright card, the user A decrypts the card and discloses the card, and at the moment, all users participating in the game can obtain the information of the card.
As a preferred embodiment, the method for decentralized card game based on the blockchain technology further comprises: in the game process, when a user exits the current game, the user side of the exiting user sends the private key of the exiting user to the server.
It will be appreciated that in some rules of the game, the user is allowed to discard cards, at which point the user who has discarded cards may be off-site halfway, but the server needs to decrypt each card by the private key of the user's client, and therefore, the user who has left off-site halfway in the game needs to send its private key to the server to ensure that the server can still dispense the remaining cards after the user leaves.
Since there is a user going out of the field halfway, the method of decentralized card game based on the blockchain technique further includes: and regenerating corresponding key pairs for the server and the user sides of a plurality of new users participating in the game when the game is ended.
After one game is completed, since users leave the game halfway, when a new game is started, the users participating in the game are changed, and at this time, the server and the new user are newly assigned corresponding key pairs, and the random encryption step described above is executed again.
As a preferred embodiment, after generating corresponding key pairs for the server and the clients of the plurality of users participating in the game, the method for decentralized card game based on the block chain technique further includes: the server and the user terminals of the plurality of users acquire and verify the public keys of the other users. Specifically, the server and the user terminals of a plurality of users verify the public key of the opposite party by combining an ECDH algorithm and an AES algorithm.
As shown in fig. 2, the present invention also discloses a decentralized card game system 100 based on the blockchain technology, wherein the decentralized card game system 100 based on the blockchain technology is used for executing the decentralized card game method based on the blockchain technology. The block chain technology-based decentralized card game system 100 comprises: server 10 and a plurality of clients 20, server 10 includes: the key generation module 11, the first key storage module 12, the numbering module 13, the first encryption module 14 and the first decryption module 15, each user end 20 includes: a second key storage module 21, a second encryption module 22 and a second decryption module 23. The key generation module 11 is configured to generate corresponding key pairs for the server 10 and the plurality of user terminals 20, where the key pairs include a public key and a private key. The first secret key storage module 12 is configured to store a secret key pair of the server and public keys of the plurality of user terminals 20. The numbering module 13 is used to number a deck of cards to be dealt. The first encryption module 14 is used to randomly encrypt a deck of cards with the private key of the server 10. The first decryption module 15 is configured to decrypt the encrypted deck of cards with the private key of the server 10. The second secret key storage module 21 is configured to store a secret key pair of the user terminal 20 and public keys of the server 10 and other user terminals 20. The second encryption module 22 is used for randomly encrypting a deck of cards by a private key of the user terminal 20. The second decryption module 23 is used for decrypting the encrypted deck of cards by the private key of the user terminal 20.
As a preferred embodiment, during the game, when a user exits the current game, the user terminal 20 of the exiting user sends the private key stored in the corresponding second private key storage module 21 to the server 10. The first secret key storage module 12 of the server 10 stores the received private key of the user terminal 20 of the logout user.
The foregoing illustrates and describes the principles, general features, and advantages of the present invention. It should be understood by those skilled in the art that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by using equivalent alternatives or equivalent variations fall within the scope of the present invention.

Claims (9)

1. A decentralized card game method based on a block chain technology is characterized by comprising the following steps:
generating corresponding secret key pairs for a server and user sides of a plurality of users participating in the game, wherein the secret key pairs comprise public keys and private keys;
numbering each card in a deck to be dealt;
the server and the plurality of the user sides sequentially encrypt the numbered cards in a random way through own private keys;
the server distributes the encrypted deck of cards to the user terminals of a plurality of users.
2. The method of claim 1 wherein the method of playing a decentralized card game based on blockchain technology,
and generating a corresponding key pair at the pair of the server and each user through an ECC asymmetric encryption algorithm.
3. The method of claim 1 wherein the method of playing a decentralized card game based on blockchain technology,
the specific method for the server to distribute the encrypted deck of cards is as follows:
when the server distributes a card to the user side of a designated user in the plurality of users, the server and the user sides of other users decrypt the card in sequence through own private keys, finally the card is sent to the user side of the designated user, and the user side of the designated user decrypts the sent card through own private keys to obtain the information of the card.
4. The method of claim 1 wherein the method of playing a decentralized card game based on blockchain technology,
the decentralized card game method based on the block chain technology further comprises the following steps:
in the game process, when a user exits the current game, the user side of the exiting user sends the private key of the exiting user to the server.
5. The method of claim 4 wherein the method of playing a decentralized card game based on blockchain technology,
the decentralized card game method based on the block chain technology further comprises the following steps:
and regenerating the corresponding key pairs for the server and the user sides of a plurality of new users participating in the game when the game is ended.
6. The method of claim 1 wherein the method of playing a decentralized card game based on blockchain technology,
after the corresponding key pairs are generated at the server and the clients of the plurality of users participating in the game,
the decentralized card game method based on the block chain technology further comprises the following steps:
the server and the user sides of the users acquire and verify the public keys of the other users.
7. The method of claim 6 wherein the method of playing a decentralized card game based on blockchain technology,
the server and the user sides of the users verify the public keys of the opposite parties through the combination of an ECDH algorithm and an AES algorithm.
8. A decentralized card game system based on blockchain technology, comprising:
a server;
a plurality of user terminals for connecting a plurality of users participating in the game to the server;
the server includes:
the system comprises a secret key generation module, a secret key generation module and a management module, wherein the secret key generation module is used for generating corresponding secret key pairs for the server and the plurality of user sides, and the secret key pairs comprise public keys and private keys;
the first secret key storage module is used for storing a secret key pair of the server and public keys of a plurality of user sides;
the numbering module is used for numbering a pair of cards to be distributed;
the first encryption module is used for randomly encrypting the deck of cards through a private key of the server;
the first decryption module is used for decrypting the encrypted deck of cards through a private key of the server;
the user side includes:
the second secret key storage module is used for storing the secret key pair of the user side and the public keys of the server and other user sides;
the second encryption module is used for randomly encrypting the deck of cards through a private key of the user side;
and the second decryption module is used for decrypting the encrypted deck of cards through a private key of the user side.
9. The block chain technology based decentralized card gaming system according to claim 8,
in the game process, when a user exits the current game, the user side of the exiting user sends the private key stored in the second private key storage module corresponding to the exiting user to the server;
and the first secret key storage module of the server stores the received private key of the user side of the quitting user.
CN202010165735.5A 2020-03-11 2020-03-11 Block chain technology-based decentralized card game method and system Pending CN111420405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010165735.5A CN111420405A (en) 2020-03-11 2020-03-11 Block chain technology-based decentralized card game method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010165735.5A CN111420405A (en) 2020-03-11 2020-03-11 Block chain technology-based decentralized card game method and system

Publications (1)

Publication Number Publication Date
CN111420405A true CN111420405A (en) 2020-07-17

Family

ID=71547771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010165735.5A Pending CN111420405A (en) 2020-03-11 2020-03-11 Block chain technology-based decentralized card game method and system

Country Status (1)

Country Link
CN (1) CN111420405A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108434727A (en) * 2018-03-27 2018-08-24 北京知道创宇信息技术有限公司 electronic card processing method and system
US20180253937A1 (en) * 2017-03-06 2018-09-06 Cristian Vasile Curelea Playing cards security system
CN110075510A (en) * 2019-05-22 2019-08-02 杭州复杂美科技有限公司 Playing card dealing method, method for gaming, equipment and storage medium
CN110493124A (en) * 2019-09-30 2019-11-22 杭州增信信息技术有限公司 Protect the encryption instantaneous communication system and communication means of data safety

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180253937A1 (en) * 2017-03-06 2018-09-06 Cristian Vasile Curelea Playing cards security system
CN108434727A (en) * 2018-03-27 2018-08-24 北京知道创宇信息技术有限公司 electronic card processing method and system
CN110075510A (en) * 2019-05-22 2019-08-02 杭州复杂美科技有限公司 Playing card dealing method, method for gaming, equipment and storage medium
CN110493124A (en) * 2019-09-30 2019-11-22 杭州增信信息技术有限公司 Protect the encryption instantaneous communication system and communication means of data safety

Similar Documents

Publication Publication Date Title
US10748377B1 (en) Distributed secrets for validation of gaming transactions
AU2013326169B2 (en) Methods for securing data generation via multi-part generation seeds
CN107181599B (en) Routing position data secret storage and sharing method based on block chain
CN106549770B (en) SM2 digital signature generation method and system
CN108965338B (en) Three-factor identity authentication and key agreement method under multi-server environment
CN106850198B (en) SM2 digital signature generation method and system based on the collaboration of more devices
US8677128B2 (en) Method and apparatus for efficient and secure creating, transferring, and revealing of messages over a network
CN109475772A (en) The system and method for the game of provable justice
CN110462622A (en) Collusion resistant can verify that method with the client-server system and its use of the token game of provable justice
CN110784320A (en) Distributed key implementation method and system and user identity management method and system
CN109587276A (en) A kind of data back up method, system and associated component
JP2023552263A (en) Redistribution of secret sharing
CN109921905A (en) Anti- quantum calculation cryptographic key negotiation method and system based on private key pond
CN107679149A (en) A kind of data processing method and server
CN110532734A (en) A kind of digital publishing rights method and system of the privacy timestamp based on multi-party computations
CN110380845A (en) Quantum secret communication alliance chain method of commerce based on group's pool of symmetric keys, system, equipment
CN105825383A (en) Random number generation and verification method with both sides in participation
WO2020233377A1 (en) Dealing method, game method, device, and storage medium
CN111420405A (en) Block chain technology-based decentralized card game method and system
CN109194476A (en) Safe and efficient on-line off-line group key distribution method
CN114726514B (en) Data processing method and device
CN110430047A (en) Anti- quantum calculation energy-saving equipment cryptographic key negotiation method and system based on unsymmetrical key and MQV
Moses Jr et al. Rational secret sharing over an asynchronous broadcast channel with information theoretic security
CN110034923A (en) A kind of information processing method and relevant device
CN111435911B (en) Online multi-party security data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination