WO2020177109A1 - Lot-drawing processing method, trusted chip, node, storage medium and electronic device - Google Patents

Lot-drawing processing method, trusted chip, node, storage medium and electronic device Download PDF

Info

Publication number
WO2020177109A1
WO2020177109A1 PCT/CN2019/077250 CN2019077250W WO2020177109A1 WO 2020177109 A1 WO2020177109 A1 WO 2020177109A1 CN 2019077250 W CN2019077250 W CN 2019077250W WO 2020177109 A1 WO2020177109 A1 WO 2020177109A1
Authority
WO
WIPO (PCT)
Prior art keywords
random information
user
promise
trusted execution
random
Prior art date
Application number
PCT/CN2019/077250
Other languages
French (fr)
Chinese (zh)
Inventor
段夕华
钟林
Original Assignee
北京建极练科技有限公司
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 北京建极练科技有限公司 filed Critical 北京建极练科技有限公司
Priority to PCT/CN2019/077250 priority Critical patent/WO2020177109A1/en
Publication of WO2020177109A1 publication Critical patent/WO2020177109A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A blockchain-based lot-drawing processing method, a trusted execution chip, a blockchain network node, a computer storage medium and an electronic device, which relate to the field of blockchain and cryptology technology. Said method comprises: a node sending a random information request of a user and a public key of the user to a trusted execution chip; the node receiving a random information commitment, a signature of the random information commitment and ciphertext of the random information that are outputted by the trusted execution chip; and the node broadcasting the random information commitment, the signature of the random information commitment, and the ciphertext of the random information to a block chain network so as to form a blockchain. The existence of the trusted execution chip avoids potential risks such as predictability, peeking, and operability, so as to facilitate the blockchain network to reach consensus, and a generation party cannot operate the generation of a sequence, ensuring the fairness of the solution in an open and verifiable manner.

Description

抽签处理方法、可信芯片、节点、存储介质和电子设备Lottery processing method, trusted chip, node, storage medium and electronic device 技术领域Technical field
本公开涉及区块链技术领域,特别涉及一种基于区块链的抽签处理方法、可信执行芯片、区块链网络节点、计算机存储介质和电子设备。The present disclosure relates to the field of blockchain technology, and in particular to a lottery processing method based on blockchain, a trusted execution chip, a blockchain network node, a computer storage medium, and an electronic device.
背景技术Background technique
目前社会中存在着各种抽签行为,如北京和上海正在实行的抽车牌制度、国家或政府部门发行的福利彩票、公司组织的抽奖活动或棋牌活动等。抽签对于公平性、不可操控性和保密性具有内在要求。公平性是指抽签算法的输出结果是公平的,即对所有用户而言被抽中概率应该是相等的。不可操控性是指抽签结果不能被攻击者操控,从而破坏结果的公平性。保密性是指在抽签之前,攻击者无法预先知道抽签结果。目前抽签通常都是通过集中的运营方或管理方服务器进行处理,通过算法保证抽签的公平性,并通过公证等手段保证运营方或管理方按照规定处理。但在技术上无法保证运营方或管理方合法合规运行,不作弊,不操纵。At present, there are various lottery activities in society, such as the license plate drawing system being implemented in Beijing and Shanghai, the welfare lottery issued by the state or government departments, the lottery activities organized by the company, or chess and card activities. Lottery has inherent requirements for fairness, non-controllability and confidentiality. Fairness means that the output result of the lottery algorithm is fair, that is, the probability of being drawn should be equal for all users. Uncontrollability means that the result of the lottery cannot be manipulated by the attacker, thus destroying the fairness of the result. Confidentiality means that the attacker cannot know the result of the lottery in advance. At present, the lottery is usually processed through a centralized operator or management server, the fairness of the lottery is guaranteed through algorithms, and the operator or management is handled in accordance with regulations through notarization and other means. However, technically there is no guarantee that the operator or management party will operate in compliance with laws and regulations, and will not cheat or manipulate.
因此,现有技术中需要一个可信的、公平的、不可操纵、不可偷窥、可验证的技术来解决抽签过程中存在的问题。Therefore, a credible, fair, non-manipulable, non-peeping, and verifiable technology is needed in the prior art to solve the problems in the lottery process.
发明内容Summary of the invention
本发明的发明人发现上述现有技术中存在问题,并因此针对所述问题中的至少一个问题提出了一种新的技术方案。The inventor of the present invention found that there are problems in the above-mentioned prior art, and therefore proposes a new technical solution for at least one of the problems.
根据本公开的一个方面,提供一种基于区块链的抽签处理方法,包括:节点接收用户的随机信息请求,将所述用户的随机信息请求和所述用户的公钥发送给可信执行芯片;所述节点接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文;其中,所述随机信息由所述可信执行芯片基于所述用户的随机信息请求生成,所述随机信息的密文由所述用户的公钥对所述随机信息加密生成,所述随机信息承诺根据所述随机信息生成,所述随机信息承诺的签名由使用所述可信执行芯片的私钥对所述随机信息承诺进行签名获得;所述节点将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。According to one aspect of the present disclosure, there is provided a lottery processing method based on blockchain, including: a node receives a random information request from a user, and sends the random information request of the user and the public key of the user to a trusted execution chip The node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip; wherein the random information is requested by the trusted execution chip based on the user's random information request Generated, the ciphertext of the random information is generated by encrypting the random information with the public key of the user, the random information promise is generated according to the random information, and the signature of the random information promise is executed by using the trusted The private key of the chip is obtained by signing the random information promise; the node broadcasts the random information promise, the signature of the random information promise, and the ciphertext of the random information to the blockchain network to form a blockchain.
在一个实施例中,该方法还包括:所述用户通过私钥对所述随机信息的密文进行解密获得所述随机信息。In an embodiment, the method further includes: the user decrypts the ciphertext of the random information with a private key to obtain the random information.
在一个实施例中,该方法还包括:其他用户接收所述用户提供的所述随机信息,基于所述随机信息承诺验证所述随机信息的有效性。In an embodiment, the method further includes: other users receiving the random information provided by the user, and verifying the validity of the random information based on the random information promise.
在一个实施例中,所述节点接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文后还包括:所述节点根据所述可信执行芯片的公钥和所述随机信息承诺的签名验证所述随机信息承诺的有效性。In an embodiment, after the node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip, the method further includes: the node according to the public key of the trusted execution chip The signature of the promise with the random information verifies the validity of the promise with the random information.
在一个实施例中,用户的随机信息请求为所述用户的随机信息请求的数字签名;所述节 点接收用户的随机信息请求后,所述方法还包括:所述节点验证所述用户的随机信息请求的数字签名的有效性。In one embodiment, the user's random information request is a digital signature of the user's random information request; after the node receives the user's random information request, the method further includes: the node verifies the user's random information The validity of the requested digital signature.
在一个实施例中,随机信息由所述可信执行芯片基于所述可信执行芯片的私钥和所述用户的随机信息请求生成。In one embodiment, the random information is generated by the trusted execution chip based on the private key of the trusted execution chip and the random information request of the user.
在一个实施例中,用户发送给所述可信执行芯片的公钥通过所述可信执行芯片的公钥加密传输。In an embodiment, the public key sent by the user to the trusted execution chip is encrypted and transmitted by the public key of the trusted execution chip.
在一个实施例中,区块链网络中包括多个节点,每个节点都具有可信执行芯片,所述用户的随机信息请求发送给多个节点,由多个节点的可信执行芯片生成并输出所述随机信息承诺、随机信息承诺的签名和随机信息的密文。In one embodiment, the blockchain network includes multiple nodes, and each node has a trusted execution chip. The user’s random information request is sent to multiple nodes, and the user’s random information request is generated and combined by the trusted execution chips of the multiple nodes. Output the random information promise, the signature of the random information promise, and the cipher text of the random information.
在一个实施例中,该方法还包括:对多个可信执行芯片进行初始化,以便所述多个可信执行芯片具有相同的公钥、私钥和种子。In one embodiment, the method further includes: initializing a plurality of trusted execution chips, so that the plurality of trusted execution chips have the same public key, private key, and seed.
在一个实施例中,节点将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链包括:对于所述多个节点广播到区块链网络的所述随机信息承诺、随机信息承诺的签名、随机信息的密文,基于区块链共识算法生成区块链。In one embodiment, the node broadcasting the random information promise, the signature of the random information promise, and the ciphertext of the random information to the blockchain network to form a blockchain includes: broadcasting to the blockchain network for the multiple nodes The random information promise, the signature of the random information promise, and the ciphertext of the random information are generated based on the blockchain consensus algorithm.
根据本公开的另一方面,提供一种可信执行芯片,包括:According to another aspect of the present disclosure, a trusted execution chip is provided, including:
接收模块,用于接收用户的随机信息请求和所述用户的公钥;The receiving module is used to receive the random information request of the user and the public key of the user;
随机信息生成模块,用于接收所述用户的随机信息请求,根据所述用户的随机信息请求生成随机信息;A random information generating module, configured to receive a random information request from the user, and generate random information according to the random information request of the user;
承诺生成模块,用于根据所述随机信息生成随机信息承诺;A promise generation module, used to generate a random information promise based on the random information;
承诺签名生成模块,用于通过所述可信执行芯片的私钥对所述随机信息承诺进行签名获得随机信息承诺的数字签名;A commitment signature generation module, configured to sign the random information commitment through the private key of the trusted execution chip to obtain a digital signature of the random information commitment;
随机密文生成模块,用于通过所述用户的公钥对所述随机信息加密生成所述随机信息的密文;A random ciphertext generating module, configured to generate a ciphertext of the random information by encrypting the random information with the public key of the user;
输出模块,用于输出所述随机信息承诺、随机信息承诺的签名和随机信息的密文。The output module is used to output the random information promise, the signature of the random information promise, and the ciphertext of the random information.
在一个实施例中,所述随机信息生成模块基于所述可信执行芯片的私钥和所述用户的随机信息请求生成所述随机信息。In one embodiment, the random information generating module generates the random information based on the private key of the trusted execution chip and the random information request of the user.
根据本公开的又一方面,提供一种区块链网络节点,包括上述的可信执行芯片,其中,所述区块链网络节点接收用户的随机信息请求,将所述用户的随机信息请求和所述用户的公钥发送给所述可信执行芯片,接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文,将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。According to another aspect of the present disclosure, there is provided a blockchain network node, including the above-mentioned trusted execution chip, wherein the blockchain network node receives a user's random information request, and combines the user's random information request with The public key of the user is sent to the trusted execution chip, and the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip are received, and the random information promise and random information promise The signature and ciphertext of random information are broadcast to the blockchain network to form a blockchain.
根据本公开的再一方面,提供一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述的基于区块链的抽签处理方法。According to another aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, wherein the computer program is characterized in that the above-mentioned blockchain-based lottery processing method is implemented when the computer program is executed by a processor.
根据本公开的再一方面,提供一种电子设备,包括:According to another aspect of the present disclosure, there is provided an electronic device, including:
处理器;以及Processor; and
存储器,用于存储所述处理器的可执行指令;A memory for storing executable instructions of the processor;
其中,所述处理器配置为经由执行所述可执行指令来执行上述的基于区块链的抽签处理方法。Wherein, the processor is configured to execute the above-mentioned blockchain-based lottery processing method by executing the executable instruction.
本公开的实施例,节点把用户的随机信息请求输入到可信执行芯片,由可信执行芯片生成随机信息及相关承诺和签名,其过程具有公平性、保密性和不可篡改,并把可信执行芯片输出的内容广播到区块链;用户解密并公开随机信息,而其他用户验证承诺有效性。这样,通过可信执行芯片生成随机信息并在区块链系统中达成共识,则该随机信息具有公平性、不可操控性和保密性。In the embodiment of the present disclosure, the node inputs the user's random information request to the trusted execution chip, and the trusted execution chip generates random information and related promises and signatures. The process is fair, confidential and non-tamperable, and the trusted execution chip The content output by the execution chip is broadcast to the blockchain; users decrypt and disclose random information, while other users verify the validity of the promise. In this way, random information is generated through the trusted execution chip and a consensus is reached in the blockchain system, then the random information has fairness, uncontrollability and confidentiality.
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其它特征及其优点将会变得清楚。Through the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings, other features and advantages of the present invention will become clear.
附图说明Description of the drawings
构成说明书的一部分的附图描述了本发明的实施例,并且连同说明书一起用于解释本发明的原理。The drawings constituting a part of the specification describe the embodiments of the present invention, and together with the specification are used to explain the principle of the present invention.
参照附图,根据下面的详细描述,可以更加清楚地理解本发明,其中:With reference to the drawings, the present invention can be understood more clearly according to the following detailed description, in which:
图1示出根据本公开区块链网络的一个实施例的结构示意图;Figure 1 shows a schematic structural diagram of an embodiment of a blockchain network according to the present disclosure;
图2示出根据本公开的基于区块链的抽签处理方法的一个实施例的流程图;FIG. 2 shows a flowchart of an embodiment of a lottery processing method based on blockchain according to the present disclosure;
图3示出根据本公开的基于区块链的抽签处理方法的另一个实施例的流程图;3 shows a flowchart of another embodiment of a lottery processing method based on blockchain according to the present disclosure;
图4示出根据本公开的车牌抽签方法的一个实施例的流程图;FIG. 4 shows a flowchart of an embodiment of a method for drawing lots of license plates according to the present disclosure;
图5示出根据本公开的棋牌活动的一个实施例的流程图;Figure 5 shows a flow chart of an embodiment of a chess and card activity according to the present disclosure;
图6示出用于本公开的可信执行芯片的一个实施例的结构示意图;和FIG. 6 shows a schematic structural diagram of an embodiment of a trusted execution chip used in the present disclosure; and
图7示出用于本公开的基于区块链的抽签处理方法的电子设备的示意图。FIG. 7 shows a schematic diagram of an electronic device used in the blockchain-based lottery processing method of the present disclosure.
具体实施方式detailed description
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that unless specifically stated otherwise, the relative arrangement, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn in accordance with actual proportional relationships.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。The following description of at least one exemplary embodiment is actually only illustrative, and in no way serves as any limitation to the present invention and its application or use.
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为授权说明书的一部分。The technologies, methods, and equipment known to those of ordinary skill in the relevant fields may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be regarded as part of the authorization specification.
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, rather than as a limitation. Therefore, other examples of the exemplary embodiment may have different values.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that similar reference numerals and letters indicate similar items in the following drawings, so once a certain item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
可以利用区块链技术处理抽签问题,例如,采用基于区块链的分布式智能合约随机信息生成方法进行抽签,能够利用区块链分布式特性以保证抽签的公平性和不可操控性。由于智能合约在区块链智能合约中的运行是公开且透明的,任意节点或用户均能生成随机信息,因此该类方案对于随机信息的保密性有所不足。此外,智能合约的执行效率依赖于区块链系统,如果区块链系统运行效率较低,或者运行费用较高,则该类随机信息生成方案的效率会随之较低,或运行费用较高。Blockchain technology can be used to deal with lottery issues. For example, the random information generation method of distributed smart contracts based on blockchain is used for lottery. The distributed characteristics of blockchain can be used to ensure the fairness and uncontrollability of lottery. Since the operation of smart contracts in blockchain smart contracts is open and transparent, any node or user can generate random information, so this type of scheme is insufficient for the confidentiality of random information. In addition, the execution efficiency of smart contracts depends on the blockchain system. If the blockchain system has low operating efficiency or high operating costs, the efficiency of this type of random information generation scheme will be lower or higher operating costs. .
在本公开的一个实施例中,区块链网络节点拥有一个可信执行芯片,即可信黑盒子;黑盒子输入节点提供的交易单,例如包括交易数据和用户公钥,输出用户公钥加密的随机信息;节点把随机信息密文广播到区块链,则仅有对应私钥的用户能够解密并公开该随机信息,从而实现随机信息的保密性,从而提供一种具有公平性、不可操控性和保密性的分布式随机信息生成方案。In an embodiment of the present disclosure, a blockchain network node has a trusted execution chip, that is, a black box; the black box input node provides a transaction ticket, for example, includes transaction data and user public key, and outputs user public key encryption Random information; the node broadcasts the ciphertext of the random information to the blockchain, and only the user corresponding to the private key can decrypt and disclose the random information, thereby achieving the confidentiality of the random information, thereby providing a fair and unmanageable Distributed random information generation scheme with security and confidentiality.
图1示出根据本公开区块链网络的一个实施例的结构示意图。如图1所示,区块链网络中包括多个节点11,节点11具有可信执行芯片110。可信执行芯片110,又可以称为软件不可穿透的黑盒子,可以采用专门的硬件,如Intel的SGX(SoftwareGuard Extensions,软件保护扩展)技术或ARM的TrustZone技术等类似技术。可信执行芯片110可以读取外面的数据,同时通过API暴露接口,从而提供初始化和抽取功能。通过初始化操作可以使得可信执行芯片110具有相同的种子,以便用于产生随机信息或抽签信息,可信执行芯片110通过初始化具有相同的公钥和私钥,或者针对抽签功能具有相同的公钥和私钥。抽签过程中,由一个或多个注册用户12参与抽签,注册用户12提供自己的公钥和签名Sig进行请求,节点11将注册用户12的公钥和签名Sig发送给可信执行芯片110,由可信执行芯片110执行抽签,抽取的数据和根据种子计算出的随机盐组成C,一起被加密传送回注册用户12,数据C可以用注册用户12的私钥进行解密,其他人包括可信执行芯片110的宿主都无法进行明文读取,从而避免了偷窥的可能性。在发送加密数据的同时,黑盒子还会向宿主节点发送抽取数据的证明P,其中
Figure PCTCN2019077250-appb-000001
广播到区块链网络中并由各个节点同步记录,保证了数据的公开可验证性。算法本身会保证公平、可信、可验证,但数据在持有人公布前无法反推。反之,如果抽取用户伪造结果,将无法通过各个节点可以参与的区块链网络的校验。
Fig. 1 shows a schematic structural diagram of an embodiment of a blockchain network according to the present disclosure. As shown in FIG. 1, the blockchain network includes multiple nodes 11, and the nodes 11 have a trusted execution chip 110. The trusted execution chip 110 may also be referred to as a software-impenetrable black box, and may use specialized hardware, such as Intel's SGX (SoftwareGuard Extensions, software protection extensions) technology or ARM's TrustZone technology and similar technologies. The trusted execution chip 110 can read external data and at the same time expose the interface through the API, thereby providing initialization and extraction functions. Through the initialization operation, the trusted execution chip 110 can have the same seed for generating random information or lottery information. The trusted execution chip 110 has the same public key and private key through initialization, or has the same public key for the lottery function. And private key. In the lottery process, one or more registered users 12 participate in the lottery, and the registered users 12 provide their own public key and signature Sig to make a request. The node 11 sends the public key and signature Sig of the registered user 12 to the trusted execution chip 110. The trusted execution chip 110 executes the lottery. The extracted data and the random salt calculated according to the seed form C, and are encrypted and transmitted back to the registered user 12. The data C can be decrypted with the private key of the registered user 12. Others include trusted execution The host of the chip 110 cannot read the plaintext, thus avoiding the possibility of peeping. While sending encrypted data, the black box will also send a proof P of the extracted data to the host node, where
Figure PCTCN2019077250-appb-000001
Broadcast to the blockchain network and synchronously recorded by each node, ensuring the public verifiability of the data. The algorithm itself will guarantee fairness, credibility, and verifiability, but the data cannot be reversed before the holder publishes it. Conversely, if the user forged results are extracted, it will not be able to pass the verification of the blockchain network that each node can participate in.
可信执行芯片110执行抽签,是基于密码学的可共识随机算法,所有的随机数的产生都是由一个原始种子、外界输入、种子变换用私钥来进行的。各个节点间的这三部分数据(例如可以通过初始化过程)保持一致,所以保证了产生的随机数的可共识性。同时私钥是对外界保密的,从而保证了随机数的不可预测性,而种子每次随着外界输入而自动产生变换,则进一步保证了随机数的不可预测性。The trusted execution chip 110 executes the lottery, which is a consensus random algorithm based on cryptography, and all random numbers are generated by an original seed, external input, and a private key for seed transformation. The three parts of data between each node (for example, through the initialization process) are kept consistent, so the consensus of the generated random numbers is guaranteed. At the same time, the private key is kept secret from the outside world, thus ensuring the unpredictability of the random number, and the seed is automatically changed every time with the input from the outside, which further ensures the unpredictability of the random number.
在一个实施例中,可信执行芯片同时提供公钥给用户,用户的数据,包括原始序列,签名等都可以加密传输,从而进一步提高了数据传输的私密性,并进一步提高可验证性,算法更安全。In one embodiment, the trusted execution chip provides the public key to the user at the same time. The user's data, including the original sequence, signature, etc., can be encrypted for transmission, thereby further improving the privacy of data transmission and further improving the verifiability. safer.
与其他随机序列发生方法相比,上述实施例具有如下优点:Compared with other random sequence generation methods, the foregoing embodiment has the following advantages:
1)与中心化的随机序列发生算法相比,发送方不能操作序列的发生,并且以公开可验 证的方式保证了算法的公平性;1) Compared with the centralized random sequence generation algorithm, the sender cannot manipulate the sequence generation, and the fairness of the algorithm is guaranteed in a publicly verifiable manner;
2)与基于智能合约的随机序列发生算法相比,因为可信执行芯片的存在,避免了可预测、可偷窥、可操作等潜在风险。結合其他架构优化措施,性能也完全可以达到一个可实用的水平。2) Compared with the algorithm of random sequence generation based on smart contract, because of the existence of the trusted execution chip, it avoids potential risks such as predictability, peeping, and operation. Combined with other architectural optimization measures, the performance can also reach a practical level.
图2示出根据本公开的基于区块链的抽签处理方法的一个实施例的流程图。Fig. 2 shows a flowchart of an embodiment of a lottery processing method based on blockchain according to the present disclosure.
如图2所示,步骤S202,节点接收用户的随机信息请求,将用户的随机信息请求和用户的公钥发送给可信执行芯片。As shown in Fig. 2, in step S202, the node receives the random information request of the user, and sends the random information request of the user and the public key of the user to the trusted execution chip.
步骤S204,节点接收可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文;其中,随机信息由可信执行芯片基于用户的随机信息请求生成,随机信息的密文由用户的公钥对随机信息加密生成,随机信息承诺根据随机信息生成,随机信息承诺的签名由使用可信执行芯片的私钥对所述随机信息承诺进行签名获得。Step S204, the node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip; wherein, the random information is generated by the trusted execution chip based on the user's random information request, and the ciphertext of the random information is generated by the trusted execution chip The user's public key encrypts and generates the random information, the random information promise is generated based on the random information, and the signature of the random information promise is obtained by signing the random information promise using the private key of the trusted execution chip.
步骤S206,节点将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。Step S206, the node broadcasts the random information promise, the signature of the random information promise, and the ciphertext of the random information to the blockchain network to form a blockchain.
上述实施例中,节点把用户的随机信息请求输入到可信执行芯片,由可信执行芯片生成随机信息及相关承诺和签名,其过程具有公平性、保密性和不可篡改,并把可信执行芯片输出的内容广播到区块链;用户解密并公开随机信息,而其他用户验证承诺有效性。这样,通过可信执行芯片生成随机信息并在区块链系统中达成共识,则该随机信息用了公平性、不可操控性和保密性。In the above embodiment, the node inputs the user's random information request to the trusted execution chip, and the trusted execution chip generates random information and related promises and signatures. The process is fair, confidential and non-tamperable, and the trusted execution The content output by the chip is broadcast to the blockchain; users decrypt and disclose random information, while other users verify the validity of the promise. In this way, random information is generated through the trusted execution chip and a consensus is reached in the blockchain system, and the random information uses fairness, uncontrollability, and confidentiality.
下面简单介绍一下抽签过程中用到的四个密码学工具:随机信息生成算法,承诺算法,数字签名算法,公钥加密算法:The following briefly introduces the four cryptographic tools used in the lottery process: random information generation algorithm, commitment algorithm, digital signature algorithm, and public key encryption algorithm:
1)随机信息生成算法:输入私钥和数据,输出随机数。1) Random information generation algorithm: Input the private key and data, and output the random number.
在一个实施例中,随机信息生成算法是一个确定性多项式时间算法Rand,该算法满足以下两个条件:In one embodiment, the random information generation algorithm is a deterministic polynomial time algorithm Rand, which satisfies the following two conditions:
扩展性:存在一个函数,l:N→N,使得对于所有的n∈N,l(n)>n成立,且对于所有的s∈{0,1}*,|Rand(s)|=l(|s|)成立。函数l称为Rand的扩展因子。Scalability: There is a function, l: N→N, so that for all n∈N, l(n)>n holds, and for all s∈{0,1}*, |Rand(s)|=l (|s|) is established. The function l is called the expansion factor of Rand.
随机性:分布{Rand(n)},n∈N是随机分布。Randomness: distribution {Rand(n)}, n∈N is random distribution.
2)承诺算法:2) Commitment algorithm:
定义承诺算法包含两个阶段,承诺阶段和打开阶段。Defining the commitment algorithm includes two phases, the commitment phase and the open phase.
承诺阶段:输入消息,输出承诺。Commitment stage: input message, output commitment.
打开阶段:输入消息和承诺,输出有效性判断。Opening phase: input message and promise, output validity judgment.
在一个实施例中:In one embodiment:
承诺阶段Com:输入消息m,输出承诺δ=Com(m);Commitment stage Com: input message m, output commitment δ=Com(m);
打开阶段Ver:输入消息m和承诺δ,输出有效性判断,Valid/Invalid←Ver(m,δ)。Opening phase Ver: input message m and promise δ, output validity judgment, Valid/Invalid←Ver(m, δ).
承诺算法具有正确性、绑定性、隐藏性等特点。The promise algorithm has the characteristics of correctness, binding and concealment.
正确性:输入正确的消息和承诺,输出验证成功。Correctness: Input the correct message and promise, and the output verification is successful.
绑定性:输入其他消息则验证失败,输出成功概率可忽略。Binding: If you input other messages, the verification fails, and the probability of output success can be ignored.
隐藏性:根据承诺无法在多项式时间内计算出消息。Concealment: According to the promise, the message cannot be calculated in polynomial time.
3)数字签名算法:3) Digital signature algorithm:
数字签名算法可以包括秘钥生成算法、签名算法和验证算法。Digital signature algorithms can include secret key generation algorithms, signature algorithms, and verification algorithms.
签名算法:输入私钥和消息,输出签名。Signature algorithm: input the private key and message, and output the signature.
验证算法:输入消息签名和公钥,输出有效性判断。Verification algorithm: Input message signature and public key, and output validity judgment.
在一个实施例中:In one embodiment:
秘钥生成算法KeyGen:输入安全参数1 λ,输入私钥SK和公钥PK,(SK,PK)←KeyGen(1 λ)。 Key generation algorithm KeyGen: Enter the security parameter , enter the private key SK and the public key PK, (SK, PK)←KeyGen(1 λ ).
签名算法Sig:输入私钥SK和消息m,输出签名σ,σ←Sig(SK,m)。Signature algorithm Sig: Input the private key SK and message m, and output the signature σ, σ←Sig(SK, m).
验证算法Ver:输入消息签名对(m,σ)和公钥PK,输出有效性判断Valid/Invalid←Ver(m,σ,PK)。Verification algorithm Ver: Input the message signature pair (m, σ) and the public key PK, and output the validity judgment Valid/Invalid←Ver(m, σ, PK).
数字签名算法具有正确性和不可伪造性的特点。The digital signature algorithm has the characteristics of correctness and unforgeability.
正确性:输入正确的消息和公钥,输出验证承诺。Correctness: Input the correct message and public key, and output the verification promise.
不可伪造性:攻击者不能在多项式时间内伪造一个签名,使得签名验证成功。Unforgeability: The attacker cannot forge a signature in polynomial time to make the signature verification successful.
4)公钥加密算法:4) Public key encryption algorithm:
公钥加密算法可以包括秘钥生成算法、加密算法和解密算法。Public key encryption algorithms may include secret key generation algorithms, encryption algorithms, and decryption algorithms.
加密算法:输入消息和公钥,输出密文。Encryption algorithm: input message and public key, output ciphertext.
解密算法:输入密文和私钥,输出明文。Decryption algorithm: input ciphertext and private key, and output plaintext.
在一个实施例中:In one embodiment:
秘钥生成算法KeyGen:输入安全参数1 λ,输入私钥SK和公钥PK,(SK,PK)←KeyGen(1 λ)。 Key generation algorithm KeyGen: Enter the security parameter , enter the private key SK and the public key PK, (SK, PK)←KeyGen(1 λ ).
加密算法Enc:输入公钥PK和消息m,输出密文C,C←Enc(PK,m)。Encryption algorithm Enc: input public key PK and message m, output cipher text C, C←Enc(PK, m).
验证算法Dec:输入密文C和私钥SK,输出明文m,m←Dec(SK,C)。Authentication algorithm Dec: input ciphertext C and private key SK, output plaintext m, m←Dec(SK, C).
公钥加密算法具有正确性和保密性的特点。The public key encryption algorithm has the characteristics of correctness and confidentiality.
正确性:输入正确的密文和私钥,输出正确的明文。Correctness: Input the correct ciphertext and private key, and output the correct plaintext.
保密性:攻击者仅获得密文,不能在多项式时间内计算出明文。Confidentiality: The attacker only obtains the ciphertext and cannot calculate the plaintext in polynomial time.
图3示出根据本公开的基于区块链的抽签处理方法的另一个实施例的流程图。FIG. 3 shows a flowchart of another embodiment of a lottery processing method based on blockchain according to the present disclosure.
如图3所示,在步骤301,用户调用签名算法,输出随机信息请求的数字签名,发送给区块链网络节点。As shown in FIG. 3, in step 301, the user calls the signature algorithm, outputs the digital signature of the random information request, and sends it to the blockchain network node.
在一个实施例中,随机信息请求的数字签名:Tx i=Sig(SK i,m),其中,i表示任意一个用户,SK i表示用户的私钥,m表示需要被签名的消息,Sig表示数字签名算法中的签名算法,Tx i表示对消息的签名。 In one embodiment, the digital signature of the random information request: Tx i = Sig(SK i , m), where i represents any user, SK i represents the user’s private key, m represents the message that needs to be signed, and Sig represents The signature algorithm in the digital signature algorithm, Tx i represents the signature of the message.
在步骤302,节点调用验证算法,验证该随机信息请求的数字签名的有效性。In step 302, the node invokes the verification algorithm to verify the validity of the digital signature of the random information request.
在一个实施例中,随机信息请求的数字签名的有效性验证:Valid/Invalid←Ver(Tx i,m,PK i),其中,i表示任意一个用户,PK i表示用户的公钥,m 表示需要被签名的消息,Ver表示数字签名算法中的验证算法,Tx i表示对消息的签名。 In one embodiment, the validity verification of the digital signature of the random information request: Valid/Invalid←Ver(Tx i , m, PK i ), where i represents any user, PK i represents the user’s public key, and m represents For messages that need to be signed, Ver represents the verification algorithm in the digital signature algorithm, and Tx i represents the signature of the message.
在步骤303,节点将随机信息请求的数字签名和用户的公钥发送给可信执行芯片。In step 303, the node sends the digital signature of the random information request and the user's public key to the trusted execution chip.
在步骤304,可信执行芯片生成随机信息、随机信息承诺、随机信息承诺的签名和随机信息的密文。在一个实施例中,具体包括如下步骤:In step 304, the trusted execution chip generates random information, random information promise, random information promise signature, and random information ciphertext. In an embodiment, it specifically includes the following steps:
随机信息生成:Random information generation:
可信执行芯片调用随机信息生成算法,输入芯片的私钥和用户请求的数字签名,输出随机信息。在一个实施例中,RandNum i←Rand(SK 0,Tx i),其中,0表示可信执行芯片,SK 0表示芯片的私钥,Rand表示随机数生成算法,RandNum i表示芯片输出的随机数。 The trusted execution chip calls the random information generation algorithm, inputs the chip's private key and the digital signature requested by the user, and outputs random information. In one embodiment, RandNum i ←Rand(SK 0 , Tx i ), where 0 represents the trusted execution chip, SK 0 represents the private key of the chip, Rand represents the random number generation algorithm, and RandNum i represents the random number output by the chip .
随机信息承诺:Random Information Commitment:
可信执行芯片调用承诺算法,输入随机信息,输出随机信息承诺。在一个实施例中,δ i=Com(RandNum i),其中,i表示任意一个用户,RandNum i表示芯片输出的随机数,Com表示承诺算法,δ i表示承诺算法输出的承诺值。 The trusted execution chip calls the promise algorithm, inputs random information, and outputs random information promises. In one embodiment, δ i =Com(RandNum i ), where i represents any user, RandNum i represents the random number output by the chip, Com represents the commitment algorithm, and δ i represents the commitment value output by the commitment algorithm.
随机信息承诺的签名:Signature of Random Information Commitment:
可信执行芯片调用签名算法,输入芯片私钥和随机信息承诺,输出签名。在一个实施例中,σ i=Sig(SK 0,Hash(δ i)),其中,i表示任意一个用户,δ i表示承诺算法输出的承诺值,Hash表示哈希算法,SK 0表示可信执行芯片的私钥,Sig表示数字签名算法中的签名算法,σ i表示数字签名算法输出的签名值。 The trusted execution chip calls the signature algorithm, inputs the chip private key and random information promise, and outputs the signature. In one embodiment, σ i =Sig(SK 0 , Hash(δ i )), where i represents any user, δ i represents the commitment value output by the commitment algorithm, Hash represents the hash algorithm, and SK 0 represents trusted Execute the private key of the chip, Sig represents the signature algorithm in the digital signature algorithm, and σ i represents the signature value output by the digital signature algorithm.
随机信息加密:Random information encryption:
可信执行芯片调用加密算法,输入随机信息和用户公钥,输出密文。在一个实施例中,C i←Enc(PK i,RandNum i),其中,i表示任意一个用户,RandNum i表示芯片输出的随机数,PK i表示用户的公钥,Enc表示公钥加密算法中的加密算法,C i表示加密算法输出的密文。 The trusted execution chip calls encryption algorithms, inputs random information and user public keys, and outputs cipher text. In one embodiment, C i ←Enc(PK i , RandNum i ), where i represents any user, RandNum i represents the random number output by the chip, PK i represents the public key of the user, Enc represents the public key encryption algorithm The encryption algorithm, C i represents the ciphertext output by the encryption algorithm.
在步骤305,可信执行芯片将随机信息承诺、随机信息承诺的签名和随机信息的密文发送给节点。In step 305, the trusted execution chip sends the random information promise, the signature of the random information promise, and the ciphertext of the random information to the node.
在步骤306,节点验证随机信息承诺的签名有效性。节点调用验证算法,输入芯片公钥和随机信息承诺签名对,输出有效性判断。In step 306, the node verifies the validity of the signature promised by the random information. The node calls the verification algorithm, inputs the chip public key and random information promise signature pair, and outputs the validity judgment.
在一个实施例中,Valid/Invalid=Ver(PK 0,Hash(δ i),σ i),其中,i表示任意一个用户,σ i表示数字签名算法输出的签名值,δ i表示承诺算法输出的承诺值,Hash表示哈希算法,PK 0表示可信执行芯片的公钥,Ver表示数字签名算法中的验证算法,Valid/Invalid表示签名验证算法输出结果,即有效或无效。 In one embodiment, Valid/Invalid=Ver(PK 0 , Hash(δ i ), σ i ), where i represents any user, σ i represents the signature value output by the digital signature algorithm, and δ i represents the commitment algorithm output Hash indicates the hash algorithm, PK 0 indicates the public key of the trusted execution chip, Ver indicates the verification algorithm in the digital signature algorithm, and Valid/Invalid indicates the output result of the signature verification algorithm, that is, valid or invalid.
在步骤307,节点把随机信息的承诺、随机信息承诺的签名、随机信息的密文广播到区块链。节点广播的信息包括:(δ i,σ i,C i,PK i),其中,i表示任意一个用户,PK i表示用户的公钥,C i表示加密算法输出的密文,σ i表示数字签名算法输出的签名值,δ i表示承诺算法输出的承诺值。 In step 307, the node broadcasts the promise of random information, the signature of the promise of random information, and the ciphertext of the random information to the blockchain. Broadcast information node comprising: (δ i, σ i, C i, PK i), where, i denotes any user, PK i represents the user's public key, C i represents the output ciphertext encryption algorithm, σ i represents a number The signature value output by the signature algorithm, δ i represents the commitment value output by the commitment algorithm.
在步骤308,用户调用解密算法,输入私钥和随机信息密文,输出随机信息明文。In step 308, the user calls the decryption algorithm, inputs the private key and the ciphertext of random information, and outputs the plaintext of random information.
在一个实施例中,用户解密:RandNum i←Dec(SK i,C i),其中,i表示任意一个用户,C i表示加密算法输出的密文,SK i表示用户的私钥,Dec表示公钥加密算法中的解密算法,RandNum i表示芯片输出的随机数。 In one embodiment, the user decrypts: RandNum i ←Dec(SK i , C i ), where i represents any user, C i represents the ciphertext output by the encryption algorithm, SK i represents the user’s private key, and Dec represents the public The decryption algorithm in the key encryption algorithm, RandNum i represents the random number output by the chip.
用户解密并公开随机信息,而其他用户验证承诺有效性,通过调用验证算法,输入随机信息明文和随机信息承诺,输出有效性判断。在一个实施例中,其他用户验证承诺:Valid/Invalid←Ver(RandNum i,δ i),其中,i表示任意一个用户,δ i表示承诺算法输出的承诺值,RandNum i表示芯片输出的随机数,Ver表示承诺算法中的验证算法,Valid/Invalid表示承诺验证算法输出结果,即有效或无效。 The user decrypts and discloses the random information, while other users verify the validity of the promise, by calling the verification algorithm, input the random information plaintext and the random information promise, and output the validity judgment. In one embodiment, other users verify the commitment: Valid/Invalid←Ver(RandNum i , δ i ), where i represents any user, δ i represents the commitment value output by the commitment algorithm, and RandNum i represents the random number output by the chip , Ver represents the verification algorithm in the commitment algorithm, Valid/Invalid represents the output result of the commitment verification algorithm, that is, valid or invalid.
图4示出根据本公开的车牌抽签方法的一个实施例的流程图。车牌抽签系统中有多个用户和多个抽签公司(矿工)。用户:提交身份信息到车牌抽签区块链网络,并从区块链上下载抽签信息。抽签公司(矿工):抽签公司根据用户身份信息进行抽签,并把抽签结果广播到区块链上。FIG. 4 shows a flowchart of an embodiment of a method for drawing lots of license plates according to the present disclosure. There are multiple users and multiple drawing companies (miners) in the license plate lottery system. User: Submit identity information to the license plate lottery blockchain network, and download lottery information from the blockchain. Lottery company (miner): Lottery company draws lots based on user identity information and broadcasts the lottery results to the blockchain.
如图4所示,在S402,申请者把身份信息的数字签名提交到车牌抽签区块链网络。As shown in Figure 4, in S402, the applicant submits the digital signature of the identity information to the license plate lottery blockchain network.
在S404,区块链网络中的各个节点(抽签公司)验证身份信息及数字签名的有效性。In S404, each node (lottery company) in the blockchain network verifies the validity of the identity information and the digital signature.
各个节点然后分别独立进行抽签过程:Each node then performs the lottery process independently:
在S406,各个节点输入申请者的身份信息数字签名到可信执行芯片。In S406, each node inputs the digital signature of the applicant's identity information to the trusted execution chip.
在S408,可信执行芯片根据申请者的身份信息数字签名生成一段随机信息;可信执行芯片输入随机信息,输出随机信息承诺;可信执行芯片输入随机信息承诺和私钥,输出签名;可信执行芯片输入随机信息和申请者公钥,输出密文。In S408, the trusted execution chip generates a piece of random information based on the digital signature of the applicant's identity information; the trusted execution chip inputs random information and outputs random information promises; the trusted execution chip inputs random information promises and private keys, and outputs signatures; trusted The implementation chip inputs random information and applicant public key, and outputs ciphertext.
在S410,各个节点接收随机信息承诺、随机信息承诺的签名和随机信息的密文,输入芯片公钥和随机信息承诺签名对,输出有效性判断。In S410, each node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information, inputs the chip public key and the random information promise signature pair, and outputs the validity judgment.
在S412,各个多个抽签公司把随机信息承诺、随机信息承诺签名、随机信息密文广播到区块链上。In S412, multiple lottery companies broadcast the random information promise, random information promise signature, and random information cipher text to the blockchain.
在S414,申请者从区块链上获得该随机信息密文,解密获得随机信息明文。In S414, the applicant obtains the ciphertext of the random information from the blockchain, and decrypts to obtain the plaintext of the random information.
在S416,申请者根据随机信息是否满足预定条件确定抽签成功。例如,如果该随机信息小于某个阈值,则抽签成功(即获得车牌号)。In S416, the applicant determines that the lottery is successful according to whether the random information meets the predetermined conditions. For example, if the random information is less than a certain threshold, the draw is successful (that is, the license plate number is obtained).
在S416,申请者公开随机信息,则区块链网络用户均可验证随机信息的正确性。否则等待下一次抽签。In S416, if the applicant discloses random information, blockchain network users can verify the correctness of the random information. Otherwise, wait for the next draw.
上述实施例的步骤中,随机信息在可信执行芯片内部生成,各个节点(抽签公司)无法获得。随机信息承诺具有完整性、绑定性、隐藏性,因此用户公布随机信息能够进行完整性验证;用户不能把随机信息打开为其他随机信息;攻击者无法获得随机信息。随机信息数字签名能够保证随机信息是由可信执行芯片生成的。随机信息加密保证任意抽签公司均不知道用户的随机信息明文,仅有申请者本人能够解密并获得。如果有少数抽签公司发生作弊行为,则在区块链网络验证中将会被抛弃(非诚实数据不会得到全网的 共识)。仅当抽签公司诚实抽签,才可能广播到区块链上。区块链网络验证用的的区块链共识算法不需要限定具体的共识算法,仅要求是诚实参与方占多数情况下能够保证系统安全并达成共识的算法均可,例如工作量证明机制POW共识算法、权益证明机制共识算法等等。In the steps of the foregoing embodiment, random information is generated inside the trusted execution chip, and each node (lottery company) cannot obtain it. Random information promises to be complete, binding, and concealed. Therefore, users can publish random information for integrity verification; users cannot open random information as other random information; attackers cannot obtain random information. Random information digital signature can ensure that random information is generated by a trusted execution chip. The random information encryption ensures that no random lottery company knows the plain text of the user's random information, and only the applicant can decrypt and obtain it. If a few lottery companies cheat, they will be discarded in the blockchain network verification (dishonest data will not get the consensus of the entire network). Only when the lottery company honestly draws the lottery can it be broadcast to the blockchain. The blockchain consensus algorithm used for blockchain network verification does not need to limit the specific consensus algorithm. It only requires an algorithm that can ensure the security of the system and reach a consensus when the honest participants are the majority, such as the proof-of-work mechanism POW consensus Algorithms, consensus algorithms for proof of rights and interests, etc
上述实施例中的分布式车牌抽签方法,整个抽签系统以区块链系统以及可信执行芯片为基础,车牌抽签无法作弊,且具有公平性、不可操控性和保密性。而抽签是否成功仅有申请者本人知道,但其他人可以对申请者是否成功进行验证。In the distributed license plate lottery method in the foregoing embodiment, the entire lottery system is based on a blockchain system and a trusted execution chip. The license plate lottery cannot be cheated, and has fairness, non-controllability, and confidentiality. Only the applicant knows whether the lottery is successful, but other people can verify whether the applicant is successful.
另外一个类似的应用场景是公司年终奖抽签。与车牌抽签类似,申请者获得一个随机数根据随机数大小决定是否抽中年终奖。具体可以参见上述的车牌抽签的实现,为简洁起见在此不再详细描述。Another similar application scenario is the company's year-end prize draw. Similar to the lottery for license plates, applicants receive a random number to determine whether to draw the year-end prize or not. For details, please refer to the implementation of the above-mentioned license plate drawing, which is not described in detail here for the sake of brevity.
图5示出根据本公开的棋牌活动的一个实施例的流程图。棋牌游戏系统中有多个用户和多个棋牌运营方(矿工)。其中,用户对某种棋牌游戏进行数字签名,申请参与游戏,并从区块链上下载棋牌游戏所需的随机数。棋牌运营方(矿工)根据用户的数字签名生成随机数,并把结果广播到区块链。FIG. 5 shows a flowchart of an embodiment of a chess and card activity according to the present disclosure. There are multiple users and multiple chess and card operators (miners) in the chess and card game system. Among them, the user digitally signs a certain board game, applies to participate in the game, and downloads the random number required for the board game from the blockchain. The chess and card operator (miner) generates a random number based on the user's digital signature and broadcasts the result to the blockchain.
如图5所示,在步骤S502,用户对游戏进行数字签名。As shown in Figure 5, in step S502, the user digitally signs the game.
在步骤S504,棋牌运营方对数字签名进行有效性验证。In step S504, the chess and card operator verifies the validity of the digital signature.
在步骤S506,棋牌运营方输入用户的数字签名到可信执行芯片。In step S506, the chess and card operator inputs the user's digital signature to the trusted execution chip.
各个棋牌运营方分别独立进行抽签过程:Each chess and card operator conducts the drawing process independently:
在步骤S508,可信执行芯片生成随机信息、随机信息承诺、随机信息承诺的数字签名和随机信息的密文。In step S508, the trusted execution chip generates random information, random information promise, digital signature of random information promise, and ciphertext of random information.
随机信息生成:输入用户的数字签名到可信执行芯片,可信执行芯片根据用户的数字签名生成一段随机信息。Random information generation: Input the user's digital signature to the trusted execution chip, and the trusted execution chip generates a piece of random information based on the user's digital signature.
随机信息承诺:可信执行芯片输入随机信息,输出随机信息承诺。Random information promise: Trusted execution chip inputs random information and outputs random information promise.
随机信息数字签名:可信执行芯片输入随机信息承诺和私钥,输出签名。Random information digital signature: Trusted execution chip inputs random information promise and private key, and outputs signature.
随机信息加密:可信执行芯片输入随机信息、和申请者公钥,输出密文。Random information encryption: The trusted execution chip inputs random information and the applicant's public key, and outputs ciphertext.
在步骤S510,多个棋牌运营方接收可信执行芯片生成随机信息承诺、随机信息承诺的数字签名和随机信息的密文。棋牌运营方(矿工)验证签名有效性:输入芯片公钥和随机信息承诺签名对,输出有效性判断。In step S510, multiple chess and card operators receive the credible execution chip to generate random information promises, digital signatures of random information promises, and ciphertexts of random information. Chess and card operators (miners) verify the validity of the signature: input the chip public key and random information promise signature pair, and output the validity judgment.
在步骤S512,多个棋牌运营方把随机信息承诺、随机信息承诺签名、随机信息密文广播到区块链上。In step S512, multiple chess and card operators broadcast the random information promise, random information promise signature, and random information cipher text to the blockchain.
在步骤S514,用户从区块链上获得该随机信息密文,解密获得随机信息明文。In step S514, the user obtains the ciphertext of the random information from the blockchain, and decrypts to obtain the plaintext of the random information.
在步骤S516,用户根据随机信息明文参与棋牌游戏。In step S516, the user participates in the board game in plaintext according to random information.
在步骤S518,用户公开随机信息,则棋牌运营方或者全网用户均可验证随机信息的正确性。In step S518, if the user discloses the random information, the card operator or the entire network user can verify the correctness of the random information.
上述实施例中的分布式棋牌游戏,整个棋牌游戏系统以区块链系统和可信执行芯片为基础,因此随机数的生成无法作弊,且具有公平性、不可操控性和保密性。多个用户 能够共同申请一个总随机信息,并各自获得部分随机信息。各用户的部分随机信息具有互斥性,且互斥的随机信息并集等于总随机信息。因此满足棋牌类游戏要求。In the distributed chess and card game in the foregoing embodiment, the entire chess and card game system is based on a blockchain system and a trusted execution chip. Therefore, the generation of random numbers cannot be cheated, and has fairness, uncontrollability, and confidentiality. Multiple users can jointly apply for a total random information and obtain part of the random information separately. Part of the random information of each user is mutually exclusive, and the union of mutually exclusive random information is equal to the total random information. So meet the requirements of chess and card games.
图6示出用于本公开的可信执行芯片的一个实施例的结构示意图。如图6所示,该可信执行芯片包括:Fig. 6 shows a schematic structural diagram of an embodiment of a trusted execution chip used in the present disclosure. As shown in Figure 6, the trusted execution chip includes:
接收模块61,用于接收用户的随机信息请求和所述用户的公钥;The receiving module 61 is configured to receive a random information request from a user and the public key of the user;
随机信息生成模块62,用于接收所述用户的随机信息请求,根据所述用户的随机信息请求生成随机信息;The random information generating module 62 is configured to receive the random information request of the user, and generate random information according to the random information request of the user;
承诺生成模块63,用于根据所述随机信息生成随机信息承诺;The promise generating module 63 is configured to generate a random information promise according to the random information;
承诺签名生成模块64,用于通过所述可信执行芯片的私钥对所述随机信息承诺进行签名获得随机信息承诺的数字签名;The commitment signature generating module 64 is configured to sign the random information commitment through the private key of the trusted execution chip to obtain a digital signature of the random information commitment;
随机密文生成模块65,用于通过所述用户的公钥对所述随机信息加密生成所述随机信息的密文;A random ciphertext generating module 65, configured to encrypt the random information with the user's public key to generate a ciphertext of the random information;
输出模块66,用于输出所述随机信息承诺、随机信息承诺的签名和随机信息的密文。The output module 66 is configured to output the random information promise, the signature of the random information promise, and the cipher text of the random information.
在一个实施例中,随机信息生成模块62基于可信执行芯片的私钥和用户的随机信息请求生成随机信息。In one embodiment, the random information generating module 62 generates random information based on the private key of the trusted execution chip and the random information request of the user.
上述各个功能模块的实现可以参见上文实施例中关于对应方法的描述,为简洁起见在此不再详细描述。For the implementation of the above-mentioned various functional modules, reference may be made to the description of the corresponding method in the above embodiment, and the detailed description is omitted here for brevity.
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "Circuit", "Module" or "System".
下面参照图7来描述根据本发明的这种实施方式的电子设备600。图7显示的电子设备600仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。The electronic device 600 according to this embodiment of the present invention will be described below with reference to FIG. 7. The electronic device 600 shown in FIG. 7 is only an example, and should not bring any limitation to the function and application scope of the embodiment of the present invention.
如图7所示,电子设备600以通用计算设备的形式表现。电子设备600的组件可以包括但不限于:上述至少一个处理单元610、上述至少一个存储单元620、连接不同系统组件(包括存储单元620和处理单元610)的总线630。As shown in FIG. 7, the electronic device 600 is represented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: the aforementioned at least one processing unit 610, the aforementioned at least one storage unit 620, and a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610).
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元610执行,使得所述处理单元610执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。例如,所述处理单元610可以执行如图2中所示的S202,接收用户的随机信息请求,将所述用户的随机信息请求和所述用户的公钥发送给可信执行芯片;S204,接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文;其中,所述随机信息由所述可信执行芯片基于所述用户的随机信息请求生成,所述随机信息的密文由所述用户的公钥对所述随机信息加密生成,所述随机信息承诺根据所述随机信息生成,所述随机信息承诺的签名由使用所述可信执行芯片的私钥对所述随机信息承诺进行签名获得;S206,将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the various exemplary methods described in the "exemplary method" section of this specification. Implementation steps. For example, the processing unit 610 may execute S202 as shown in FIG. 2, receive a random information request from a user, and send the random information request of the user and the public key of the user to the trusted execution chip; S204, receive The random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip; wherein the random information is generated by the trusted execution chip based on the random information request of the user, and the random information The ciphertext of the information is generated by encrypting the random information with the public key of the user, the random information promise is generated according to the random information, and the signature of the random information promise is generated by using the private key pair of the trusted execution chip The random information promise is obtained by signing; S206, the random information promise, the signature of the random information promise, and the ciphertext of the random information are broadcast to the blockchain network to form a blockchain.
存储单元620可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)6201和/或高速缓存存储单元6202,还可以进一步包括只读存储单元(ROM)6203。The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and/or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.
存储单元620还可以包括具有一组(至少一个)程序模块6205的程序/实用工具6204,这样的程序模块6205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 620 may also include a program/utility tool 6204 having a set of (at least one) program module 6205. Such program module 6205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线630可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 630 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
电子设备600也可以与一个或多个外部设备(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备600交互的设备通信,和/或与使得该电子设备600能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口650进行。并且,电子设备600还可以通过网络适配器660与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器660通过总线630与电子设备600的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备600使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 600 may also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 600, and/or communicate with The electronic device 600 can communicate with any device (such as a router, modem, etc.) that communicates with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 650. In addition, the electronic device 600 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 660. As shown in the figure, the network adapter 660 communicates with other modules of the electronic device 600 through the bus 630. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。In the exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which is stored a program product capable of implementing the above method in this specification. In some possible implementation manners, various aspects of the present invention may also be implemented in the form of a program product, which includes program code, and when the program product runs on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.
根据本发明的实施方式的用于实现上述方法的程序产品,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只 读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言-诸如Java、C++等,还包括常规的过程式程序设计语言-诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code used to perform the operations of the present invention can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages-such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the various steps of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in the specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present disclosure.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由所附的权利要求指出。Those skilled in the art will easily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The description and the embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.

Claims (15)

  1. 一种基于区块链的抽签处理方法,其特征在于,包括:A lottery processing method based on blockchain, which is characterized in that it includes:
    节点接收用户的随机信息请求,将所述用户的随机信息请求和所述用户的公钥发送给可信执行芯片;The node receives the user's random information request, and sends the user's random information request and the user's public key to the trusted execution chip;
    所述节点接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文;其中,所述随机信息由所述可信执行芯片基于所述用户的随机信息请求生成,所述随机信息的密文由所述用户的公钥对所述随机信息加密生成,所述随机信息承诺根据所述随机信息生成,所述随机信息承诺的签名由使用所述可信执行芯片的私钥对所述随机信息承诺进行签名获得;The node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip; wherein the random information is generated by the trusted execution chip based on the user's random information request , The ciphertext of the random information is generated by encrypting the random information with the public key of the user, the random information promise is generated according to the random information, and the signature of the random information promise is generated by using the trusted execution chip The private key of is obtained by signing the random information promise;
    所述节点将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。The node broadcasts the random information promise, the signature of the random information promise, and the ciphertext of the random information to the blockchain network to form a blockchain.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    所述用户通过私钥对所述随机信息的密文进行解密获得所述随机信息。The user decrypts the ciphertext of the random information by using the private key to obtain the random information.
  3. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    其他用户接收所述用户提供的所述随机信息,基于所述随机信息承诺验证所述随机信息的有效性。Other users receive the random information provided by the user, and promise to verify the validity of the random information based on the random information.
  4. 根据权利要求1所述的方法,其特征在于,所述节点接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文后还包括:The method according to claim 1, wherein after the node receives the random information promise, the signature of the random information promise, and the ciphertext of the random information output by the trusted execution chip, the method further comprises:
    所述节点根据所述可信执行芯片的公钥和所述随机信息承诺的签名验证所述随机信息承诺的有效性。The node verifies the validity of the random information promise according to the public key of the trusted execution chip and the signature of the random information promise.
  5. 根据权利要求1所述的方法,其特征在于,所述用户的随机信息请求为所述用户的随机信息请求的数字签名;The method according to claim 1, wherein the random information request of the user is a digital signature of the random information request of the user;
    所述节点接收用户的随机信息请求后,所述方法还包括:After the node receives the random information request from the user, the method further includes:
    所述节点验证所述用户的随机信息请求的数字签名的有效性。The node verifies the validity of the digital signature of the random information request of the user.
  6. 根据权利要求1所述的方法,其特征在于,所述随机信息由所述可信执行芯片基于所述可信执行芯片的私钥和所述用户的随机信息请求生成。The method according to claim 1, wherein the random information is generated by the trusted execution chip based on a private key of the trusted execution chip and a random information request of the user.
  7. 根据权利要求1所述的方法,其特征在于,所述用户发送给所述可信执行芯片的公钥通过所述可信执行芯片的公钥加密传输。The method according to claim 1, wherein the public key sent by the user to the trusted execution chip is encrypted and transmitted by the public key of the trusted execution chip.
  8. 根据权利要求1至7中任意一项所述的方法,其特征在于,所述区块链网络中包括多个节点,每个节点都具有可信执行芯片,所述用户的随机信息请求发送给多个节点,由多个节点的可信执行芯片生成并输出所述随机信息承诺、随机信息承诺的签名和随机信息的密文。The method according to any one of claims 1 to 7, wherein the blockchain network includes multiple nodes, each node has a trusted execution chip, and the user's random information request is sent to The multiple nodes generate and output the random information promise, the signature of the random information promise, and the ciphertext of the random information by the trusted execution chips of the multiple nodes.
  9. 根据权利要求8所述的方法,其特征在于,还包括:The method according to claim 8, further comprising:
    对多个可信执行芯片进行初始化,以便所述多个可信执行芯片具有相同的公钥、私钥 和种子。The multiple trusted execution chips are initialized so that the multiple trusted execution chips have the same public key, private key, and seed.
  10. 根据权利要求9所述的方法,其特征在于,所述节点将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链包括:The method according to claim 9, wherein the node broadcasting the random information promise, the signature of the random information promise, and the ciphertext of the random information to a blockchain network to form a blockchain comprises:
    对于所述多个节点广播到区块链网络的所述随机信息承诺、随机信息承诺的签名、随机信息的密文,基于区块链共识算法生成区块链。For the random information promise, the signature of the random information promise, and the ciphertext of the random information that the multiple nodes broadcast to the blockchain network, a blockchain is generated based on a blockchain consensus algorithm.
  11. 一种可信执行芯片,其特征在于,包括:A trusted execution chip, characterized in that it comprises:
    接收模块,用于接收用户的随机信息请求和所述用户的公钥;The receiving module is used to receive the random information request of the user and the public key of the user;
    随机信息生成模块,用于接收所述用户的随机信息请求,根据所述用户的随机信息请求生成随机信息;A random information generating module, configured to receive a random information request from the user, and generate random information according to the random information request of the user;
    承诺生成模块,用于根据所述随机信息生成随机信息承诺;A promise generation module, used to generate a random information promise based on the random information;
    承诺签名生成模块,用于通过所述可信执行芯片的私钥对所述随机信息承诺进行签名获得随机信息承诺的数字签名;A commitment signature generation module, configured to sign the random information commitment through the private key of the trusted execution chip to obtain a digital signature of the random information commitment;
    随机密文生成模块,用于通过所述用户的公钥对所述随机信息加密生成所述随机信息的密文;A random ciphertext generating module, configured to generate a ciphertext of the random information by encrypting the random information with the public key of the user;
    输出模块,用于输出所述随机信息承诺、随机信息承诺的签名和随机信息的密文。The output module is used to output the random information promise, the signature of the random information promise, and the ciphertext of the random information.
  12. 根据权利要求11所述的可信执行芯片,其特征在于,所述随机信息生成模块基于所述可信执行芯片的私钥和所述用户的随机信息请求生成所述随机信息。The trusted execution chip according to claim 11, wherein the random information generation module generates the random information based on a private key of the trusted execution chip and a random information request of the user.
  13. 一种区块链网络节点,其特征在于,包括如权利要求11或12所述的可信执行芯片,其中,所述区块链网络节点接收用户的随机信息请求,将所述用户的随机信息请求和所述用户的公钥发送给所述可信执行芯片,接收所述可信执行芯片输出的随机信息承诺、随机信息承诺的签名和随机信息的密文,将所述随机信息承诺、随机信息承诺的签名、随机信息的密文广播到区块链网络以形成区块链。A block chain network node, characterized by comprising the trusted execution chip according to claim 11 or 12, wherein the block chain network node receives a user's random information request, and transfers the user's random information The request and the public key of the user are sent to the trusted execution chip, and the random information promise, the signature of the random information promise and the ciphertext of the random information output by the trusted execution chip are received, and the random information promises, random information The signature of the information promise and the ciphertext of the random information are broadcast to the blockchain network to form a blockchain.
  14. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1~10中任意一项所述的基于区块链的抽签处理方法。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the blockchain-based lottery processing method according to any one of claims 1 to 10 when the computer program is executed by a processor.
  15. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;以及Processor; and
    存储器,用于存储所述处理器的可执行指令;A memory for storing executable instructions of the processor;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1~10中任意一项所述的基于区块链的抽签处理方法。Wherein, the processor is configured to execute the blockchain-based lottery processing method according to any one of claims 1 to 10 by executing the executable instructions.
PCT/CN2019/077250 2019-03-07 2019-03-07 Lot-drawing processing method, trusted chip, node, storage medium and electronic device WO2020177109A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/077250 WO2020177109A1 (en) 2019-03-07 2019-03-07 Lot-drawing processing method, trusted chip, node, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/077250 WO2020177109A1 (en) 2019-03-07 2019-03-07 Lot-drawing processing method, trusted chip, node, storage medium and electronic device

Publications (1)

Publication Number Publication Date
WO2020177109A1 true WO2020177109A1 (en) 2020-09-10

Family

ID=72338407

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077250 WO2020177109A1 (en) 2019-03-07 2019-03-07 Lot-drawing processing method, trusted chip, node, storage medium and electronic device

Country Status (1)

Country Link
WO (1) WO2020177109A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572810A (en) * 2021-06-09 2021-10-29 北京邮电大学 Method for designing and realizing private multi-account book block chain system for Internet of things
WO2024023425A1 (en) * 2022-07-27 2024-02-01 La Française Des Jeux Method, device and computer program for carrying out an electronic draw

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107862782A (en) * 2017-10-27 2018-03-30 链家网(北京)科技有限公司 Drawing method and device based on ether mill block chain
CN108269090A (en) * 2018-01-19 2018-07-10 中国科学院软件研究所 Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation
KR101887964B1 (en) * 2017-04-28 2018-08-13 주식회사 더블체인 Blockchain core server having security ability based on quantum random number, blockchain security method and electronic cash exchange system
CN109003083A (en) * 2018-07-27 2018-12-14 山东渔翁信息技术股份有限公司 A kind of ca authentication method, apparatus and electronic equipment based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101887964B1 (en) * 2017-04-28 2018-08-13 주식회사 더블체인 Blockchain core server having security ability based on quantum random number, blockchain security method and electronic cash exchange system
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107862782A (en) * 2017-10-27 2018-03-30 链家网(北京)科技有限公司 Drawing method and device based on ether mill block chain
CN108269090A (en) * 2018-01-19 2018-07-10 中国科学院软件研究所 Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation
CN109003083A (en) * 2018-07-27 2018-12-14 山东渔翁信息技术股份有限公司 A kind of ca authentication method, apparatus and electronic equipment based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572810A (en) * 2021-06-09 2021-10-29 北京邮电大学 Method for designing and realizing private multi-account book block chain system for Internet of things
WO2024023425A1 (en) * 2022-07-27 2024-02-01 La Française Des Jeux Method, device and computer program for carrying out an electronic draw
FR3138553A1 (en) * 2022-07-27 2024-02-02 La Française Des Jeux Method, device and computer program for electronic printing

Similar Documents

Publication Publication Date Title
US11271730B2 (en) Systems and methods for deployment, management and use of dynamic cipher key systems
US10142107B2 (en) Token binding using trust module protected keys
US10484354B2 (en) Data owner restricted secure key distribution
CN102271037B (en) Based on the key protectors of online key
US11930103B2 (en) Method, user device, management device, storage medium and computer program product for key management
CN111431713B (en) Private key storage method and device and related equipment
WO2022199290A1 (en) Secure multi-party computation
EP2095288B1 (en) Method for the secure storing of program state data in an electronic device
US11210658B2 (en) Constructing a distributed ledger transaction on a cold hardware wallet
CN106576043A (en) Virally distributable trusted messaging
US20170310479A1 (en) Key Replacement Direction Control System and Key Replacement Direction Control Method
KR101879758B1 (en) Method for Generating User Digital Certificate for Individual User Terminal and for Authenticating Using the Same Digital Certificate
EP4150879A1 (en) Constructing a distributed ledger transaction on a cold hardware wallet
CN112740615A (en) Multi-party computed key management
JP2017112604A (en) Method for improving encryption/decryption speed by complexly applying symmetric key encryption and asymmetric key double encryption
CN104486087A (en) Digital signature method based on remote hardware security modules
WO2021098152A1 (en) Blockchain-based data processing method, device, and computer apparatus
CN111181944B (en) Communication system, information distribution method, device, medium, and apparatus
CN109361512A (en) Data transmission method
WO2020177109A1 (en) Lot-drawing processing method, trusted chip, node, storage medium and electronic device
Sharma et al. Secure file storage on cloud using hybrid cryptography
CN111010283B (en) Method and apparatus for generating information
JP4840575B2 (en) Terminal device, certificate issuing device, certificate issuing system, certificate acquisition method and certificate issuing method
CN110414269B (en) Processing method, related device, storage medium and system of application installation package
KR20180024389A (en) Apparatus and method for key management

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19917771

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/01/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19917771

Country of ref document: EP

Kind code of ref document: A1