CN111443895A - Verifiable random number generation method applied to block chain - Google Patents

Verifiable random number generation method applied to block chain Download PDF

Info

Publication number
CN111443895A
CN111443895A CN202010171373.0A CN202010171373A CN111443895A CN 111443895 A CN111443895 A CN 111443895A CN 202010171373 A CN202010171373 A CN 202010171373A CN 111443895 A CN111443895 A CN 111443895A
Authority
CN
China
Prior art keywords
numbers
random number
random
unpredictable
rule
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
CN202010171373.0A
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.)
Hangzhou Pan Chain Technology Co ltd
Original Assignee
Hangzhou Pan Chain Technology Co ltd
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 Hangzhou Pan Chain Technology Co ltd filed Critical Hangzhou Pan Chain Technology Co ltd
Priority to CN202010171373.0A priority Critical patent/CN111443895A/en
Publication of CN111443895A publication Critical patent/CN111443895A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses a verifiable random number generation method applied to a block chain, which comprises the steps of (1) generating deterministic and unpredictable numbers by a plurality of participating nodes based on previous random numbers and a B L S signature algorithm, (2) verifying whether the unpredictable numbers generated by other nodes meet the verification condition of the B L S signature algorithm by each participating node, (3) screening all the verified unpredictable numbers according to a preset random rule I to form a subset, sequentially calculating according to the sequence of the unpredictable numbers when calculating by the preset random rule I, and using the result of the last calculation as one input during each calculation, and (4) generating random numbers by the subset obtained by the S3 according to a preset random rule II.

Description

Verifiable random number generation method applied to block chain
Technical Field
The invention relates to the technical field of block chains, in particular to a verifiable random number generation method applied to a block chain.
Background
The blockchain is an algorithm in which a plurality of nodes participate together and a unified control center is not available. The desire to implement random number algorithms on blockchains adds two new requirements over the normal random algorithms. One is that it is not possible for a node to specify a random number because it is likely that the node will manipulate the random number for benefit; the second is to make all nodes agree on each other and to acknowledge the validity of the calculation.
The block chain random number scheme, which is common at present, is roughly thought as follows: firstly, weak random numbers are selected as input, and then the random numbers are calculated through a plurality of set aggregation algorithms to obtain the required random numbers. The selection of the weak random number is divided into two types, the first type is generated by a block outlet node, such as a block head hash, a block time stamp and the like, and as the aggregation algorithm is known, the random number can be manipulated to a certain extent by adjusting the block head hash and the like at the last block outlet node in the weak random number selection interval; the second type is provided by common participants of non-block-out nodes through contracts and other modes, firstly, the scheme is often a 'promise-opening' two-stage flow, and the flow is complex; secondly, the ordinary participant can still choose to "not open" to manipulate the random number to some extent; finally, the transactions of the common participants are packaged by the block-out node, and the block-out node can discard the open transactions of the common trader at the last moment of the open period, so that the random number is manipulated to a certain extent.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a verifiable random number generation method applied to a block chain, which has the following specific technical scheme:
a verifiable random number generation method applied to a block chain, which is synchronously executed in the running process of the block chain, and generates a random number in each time interval, and the random number generation method comprises the following steps in each time interval:
s1, the plurality of participating nodes generating deterministic, unpredictable numbers based on both the previous random numbers and the B L S signature algorithm;
s2, each participating node verifies whether the unpredictable numbers generated by other nodes meet the verification condition of the B L S signature algorithm;
s3: screening out a plurality of numbers of all verified unpredictable numbers S2 according to a preset random rule I to form a subset; when the preset random rule I is calculated, the calculation is carried out in sequence according to the sequence of the unpredictable numbers, and the result of the previous calculation is used as one input of the calculation in each time;
s4: and generating random numbers according to a preset random rule two by the subset obtained in the step S3.
Furthermore, the plurality of participating nodes are candidate nodes for block output of the block chain, and are selected according to the random number generated in the last time interval.
Further, the second preset random rule is specifically that a polymerization operation is used to convert all numbers into a number, and then a hash algorithm is used to operate the result to obtain a final random number.
The invention has the following beneficial effects:
(1) the B L S algorithm is adopted to replace the common two-stage flow of 'first promise and then opening', so that the flow is more simplified;
(2) due to the certainty of the B L S algorithm, the possibility of selecting block hash and timestamp which may be adopted by some nodes is eliminated, and the operation space of malicious nodes is reduced.
(3) Before the deterministic aggregation algorithm, a process of screening subsets is added, so that each node cannot determine whether the relationship between the information provided by the node and the final result exists before providing the information, and the possibility of manipulating the result is further reduced.
Drawings
FIG. 1 is a block diagram illustrating a method for generating verifiable random numbers according to the present invention;
FIG. 2 is a flow chart of the application of the verifiable random number generation method of the present invention in the consensus process.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments, and the objects and effects of the invention will become more apparent. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the verifiable random number generation method of the present invention, which is executed synchronously during the operation of the block chain, generates a random number in each time interval, and comprises the following steps in each time interval:
s1, the plurality of participating nodes generating deterministic, unpredictable numbers based on both the previous random numbers and the B L S signature algorithm;
s2, each participating node verifies whether the unpredictable numbers generated by other nodes meet the verification condition of the B L S signature algorithm;
s3: screening out a plurality of numbers of all verified unpredictable numbers S2 according to a preset random rule I to form a subset; when the preset random rule I is calculated, the calculation is carried out in sequence according to the sequence of the unpredictable numbers, and the result of the previous calculation is used as one input of the calculation in each time;
s4: and generating random numbers according to a preset random rule two by the subset obtained in the step S3.
Preferably, when the method of the present invention is applied to the block chain consensus process, the plurality of participating nodes are candidate out-of-block nodes of the block chain, and are selected based on the random number generated in the previous time interval.
In order to ensure that the random number of each participating node affects the final random result, and thus ensure that any N-1 nodes are communicated with each other and cannot manipulate the final random result, the second preset random rule is to use an aggregation operation to convert all numbers into one number, and then use a hash algorithm to perform an operation on the result to obtain the final random number. Here, N refers to the number of all nodes participating in the random process.
The method of the present invention is described below by taking as an example the application of the method in the consensus process of blockchains, as shown in fig. 2.
1. Each node on the blockchain uses the public key of the B L S signature algorithm as an identity.
2. Every 720 blocks are divided into one round, and each round is started:
2.1. and selecting the block output node of the round by matching the random number of the previous round with a specific algorithm.
For convenience of description, it is not necessary to set all blocks in the round to obtain numbers 1,2,3 … 720 according to the block sequence;
when a node goes out of a block, a B L S signature containing the hash of the previous block is needed, otherwise, the previous block is regarded as an illegal block, and the value of the signature is represented by rho i.
2.2 when the round is finished, h (i) (i ═ 1,2,3, … 720) is calculated as follows: h (i) ═ Hash (H (i-1) | | ρ i), for i ═ 1, the random number obtained in the previous round of calculation is taken as the value of H (0), where the "|" operator represents the concatenation of two character strings;
and selecting the smallest H (m) in the set { H (i) | i >360}, wherein H (i) generated by all nodes with numbers less than or equal to m is not the last random number set.
Calculating Hash (∑⊕ rho i) (i is more than or equal to 1 and less than or equal to m), wherein the operator of ∑⊕ represents that all input data are subjected to exclusive OR in sequence according to bits to obtain a result, and the specific calculation sequence is not limited because the exclusive OR algorithm conforms to the commutative law and the combination law.
2.5 then back to 2.1.
In the whole chain consensus operation process, each round can generate a random number, and when a contract needs to use the random number, the random number of a certain round in the future can be appointed to be used as the random number of the contract, so that the randomness is ensured.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and although the invention has been described in detail with reference to the foregoing examples, it will be apparent to those skilled in the art that various changes in the form and details of the embodiments may be made and equivalents may be substituted for elements thereof. All modifications, equivalents and the like which come within the spirit and principle of the invention are intended to be included within the scope of the invention.

Claims (3)

1. A verifiable random number generation method applied to a block chain is characterized in that the method is synchronously executed in the running process of the block chain, the method generates a random number in each time interval, and the random number generation method comprises the following steps in each time interval:
s1, the plurality of participating nodes generating deterministic, unpredictable numbers based on both the previous random numbers and the B L S signature algorithm;
s2, each participating node verifies whether the unpredictable numbers generated by other nodes meet the verification condition of the B L S signature algorithm;
s3: screening out a plurality of numbers of all verified unpredictable numbers S2 according to a preset random rule I to form a subset; when the preset random rule I is calculated, the calculation is carried out in sequence according to the sequence of the unpredictable numbers, and the result of the previous calculation is used as one input of the calculation in each time.
S4: and generating random numbers according to a preset random rule two by the subset obtained in the step S3.
2. The method as claimed in claim 1, wherein the participating nodes are candidate nodes for block out of the blockchain, and are selected based on the random number generated in the previous time interval.
3. The method as claimed in claim 1, wherein the second predetermined random rule is a clustering operation, which converts all numbers into a number, and then a hash algorithm is used to operate the result to obtain the final random number.
CN202010171373.0A 2020-03-12 2020-03-12 Verifiable random number generation method applied to block chain Pending CN111443895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010171373.0A CN111443895A (en) 2020-03-12 2020-03-12 Verifiable random number generation method applied to block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010171373.0A CN111443895A (en) 2020-03-12 2020-03-12 Verifiable random number generation method applied to block chain

Publications (1)

Publication Number Publication Date
CN111443895A true CN111443895A (en) 2020-07-24

Family

ID=71627402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010171373.0A Pending CN111443895A (en) 2020-03-12 2020-03-12 Verifiable random number generation method applied to block chain

Country Status (1)

Country Link
CN (1) CN111443895A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090943A (en) * 2021-11-22 2022-02-25 杭州萝卜智能技术有限公司 Random shaking number based on interval grouping and shaking number result verification method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789090A (en) * 2017-02-24 2017-05-31 陈晶 Public key infrastructure system and semi-random participating certificate endorsement method based on block chain
CN108845790A (en) * 2018-06-20 2018-11-20 胡晓东 A kind of application block chain generates the method and relevant apparatus of credible random number
CN109743173A (en) * 2018-12-20 2019-05-10 弗洛格(武汉)信息科技有限公司 Go out block node in block chain and determines method, block verification method and block catenary system
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random
CN110247753A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain meshed network
CN110400409A (en) * 2019-07-26 2019-11-01 深圳市网心科技有限公司 Thresholding voting method, system and relevant device based on BLS signature algorithm
CN110445603A (en) * 2019-06-28 2019-11-12 成都鹰翔天际科技有限公司 A kind of decentralization random digit generation method
CN110599173A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Block chain consensus node determination method, device, equipment and storage medium
CN110798308A (en) * 2019-10-31 2020-02-14 支付宝(杭州)信息技术有限公司 Block chain signature method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789090A (en) * 2017-02-24 2017-05-31 陈晶 Public key infrastructure system and semi-random participating certificate endorsement method based on block chain
CN108845790A (en) * 2018-06-20 2018-11-20 胡晓东 A kind of application block chain generates the method and relevant apparatus of credible random number
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random
CN109743173A (en) * 2018-12-20 2019-05-10 弗洛格(武汉)信息科技有限公司 Go out block node in block chain and determines method, block verification method and block catenary system
CN110247753A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain meshed network
CN110445603A (en) * 2019-06-28 2019-11-12 成都鹰翔天际科技有限公司 A kind of decentralization random digit generation method
CN110400409A (en) * 2019-07-26 2019-11-01 深圳市网心科技有限公司 Thresholding voting method, system and relevant device based on BLS signature algorithm
CN110599173A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Block chain consensus node determination method, device, equipment and storage medium
CN110798308A (en) * 2019-10-31 2020-02-14 支付宝(杭州)信息技术有限公司 Block chain signature method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090943A (en) * 2021-11-22 2022-02-25 杭州萝卜智能技术有限公司 Random shaking number based on interval grouping and shaking number result verification method and system

Similar Documents

Publication Publication Date Title
Weng et al. Deepchain: Auditable and privacy-preserving deep learning with blockchain-based incentive
Feige et al. Multiple non-interactive zero knowledge proofs based on a single random string
CN113095510B (en) Federal learning method and device based on block chain
Radian et al. Semi-quantum money
US10887104B1 (en) Methods and systems for cryptographically secured decentralized testing
CN109542883A (en) A kind of information duplicate checking method based on block chain
Damgård et al. Unclonable group identification
CN111597590B (en) Block chain-based data integrity quick inspection method
Alcover et al. A new randomness test for bit sequences
TW201320701A (en) Information processing device, information processing method, and program
US11409907B2 (en) Methods and systems for cryptographically secured decentralized testing
CN112348518B (en) Block chain transaction certification method and device
Pfeifer et al. Spread: a new layer for profiled deep-learning side-channel attacks
Huang et al. Efficient secure computation with garbled circuits
CN114281888A (en) Block chain consensus method, device, equipment and storage medium
CN110868286A (en) Method for generating random number based on block chain intelligent contract
WO2020186750A1 (en) Multi-evidence error correction-based lattice-based digital signature method
US20230237437A1 (en) Apparatuses and methods for determining and processing dormant user data in a job resume immutable sequential listing
CN111865595B (en) Block chain consensus method and device
CN111443895A (en) Verifiable random number generation method applied to block chain
Wisiol et al. Why attackers lose: Design and security analysis of arbitrarily large XOR arbiter PUFs
WO2021016546A1 (en) Unity protocol consensus
CN113541952A (en) Digital signature method based on lattice
Jivanyan et al. Hierarchical one-out-of-many proofs with applications to blockchain privacy and ring signatures
US20230269090A1 (en) Apparatus for secure multiparty computations for machine-learning

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200724

WD01 Invention patent application deemed withdrawn after publication