CN108768647A - A kind of random-number generating method and system of block chain - Google Patents
A kind of random-number generating method and system of block chain Download PDFInfo
- Publication number
- CN108768647A CN108768647A CN201810880884.2A CN201810880884A CN108768647A CN 108768647 A CN108768647 A CN 108768647A CN 201810880884 A CN201810880884 A CN 201810880884A CN 108768647 A CN108768647 A CN 108768647A
- Authority
- CN
- China
- Prior art keywords
- random number
- sub
- block chain
- fragment
- authorization node
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a kind of random-number generating methods of block chain, including each authorization node of block chain to generate sub- random number;Sub- random number will be generated and be divided into N number of fragment;N parts of fragment is sent respectively to block chain authorization node by each authorization node of block chain;N number of fragment of sub- random number is encrypted;Encrypted result is sent respectively to N number of block chain authorization node;It is decrypted in block chain authorization node;Sub- random number fragment after decryption is sent to the authorization node of assembling random number;The authorization node of assembling random number restores the sub- random number reached at first;The authorization node of assembling random number is assembled into finally the sub- random number of recovery with number.The present invention can prevent the producer node of multiple sub- random numbers from going to generate random number again in the case where other nodes have generated sub- random number, assembly node preferentially restores and is assembled into final random number using the sub- random number reached at first, to achieve the purpose that be unable to altered data.
Description
Technical field
The present invention relates to Internet technical field more particularly to a kind of random-number generating methods and system of block chain.
Background technology
Block chain is the novel of the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm
Application model.So-called common recognition mechanism is that the mathematics calculation for trusting, obtaining equity is established between realizing different nodes in block catenary system
Method.Block chain is the Floor layer Technology of bit coin, as a database account book, records all transaction records.This technology also because
Safely and conveniently characteristic has gradually obtained the concerns of bank and financial circles for it.
For narrow sense, block chain is a kind of be sequentially in time combined into data block in such a way that sequence is connected one
Kind linked data structure, and the distributed account book that can not be distorted He can not forge ensured in a manner of cryptography;Broadly, area
Block chain technology is to verify and store data using block linked data structure, know together algorithm using distributed node to generate and more
New data, utilizes the intelligence being made of automatized script code at the safety for ensureing data transmission and access in the way of cryptography
Can contract program a kind of completely new distributed basis framework and calculation with operation data.
But in the prior art, the sub- random number generated in block chain is easy to be interfered by the sub- random number producer,
It is easy to be utilized and distorted by artificial control so as to cause the data in block chain.
Invention content
The purpose of the present invention is to solve the problems of the prior art, and a kind of random number of the block chain proposed generates
Method and system.
To achieve the goals above, present invention employs following technical solutions:
A kind of random-number generating method of block chain, includes the following steps:
(1), each authorization node of block chain generates sub- random number according to threshold secret sharing algorithm;
(2), sub- random number will be generated and is divided into N number of fragment, form sub- random number fragment, the N is the parameter freely set;
(3), each authorization node bundle random number of block chain is divided into N parts of fragment and is sent respectively to N number of block chain mandate section
Point;
(4), each authorization node of block chain is respectively encrypted N number of fragment of sub- random number;
(5), the result after N number of fragment of each authorization node of block chain bundle random number respectively is encrypted is sent respectively to
N number of block chain authorization node;
(6), block chain authorization node receives corresponding sub- random number fragment, and it is decrypted;
(7), each authorization node is sent to the sub- random number fragment after decryption the authorization node of assembling random number;
(8), the authorization node of assembling random number receives each sub- random number fragment, and the authorization node for assembling random number restores
Several sub- random numbers reached at first;
(9), former sub- random numbers of recovery are assembled into final random number by the authorization node of assembling random number.
Preferably, it is to the encrypted method of N number of fragment of sub- random number in the step (4):It first obtains and authorizes section
The public key address of point, then be encrypted respectively with public key bundle random number is broken.
Preferably, the method for decryption is in the step (6):Each authorization node of block chain using private key to receive son with
Machine number fragment is decrypted.
Preferably, the authorization node of every sub- random number can only see the part that other sub- random number authorization nodes are shared
Sub- random number.
Preferably, the final random number generated in the step (9) needs to be put into block chain, and it is logical to carry out the whole network broadcast
It accuses.
The invention also provides a kind of random number of block chain generate system, including sub- random number generation module, son with
Machine number sending module, sub- random number receiving module and sub- random number comprising modules, the sub- random number generation module are used for block
Each authorization node of chain generates sub- random number, and the sub- random number of generation is divided into several fragments, forms sub- random number fragment;Institute
It is that the sub- random number fragment of formation is sent to other mandates for each authorization node of block chain to state sub- random number sending module
Node, and sub- random number fragment is encrypted;The sub- random number receiving module is received for each authorization node of block chain
The encrypted sub- random number fragment that other authorization nodes are sent, is decrypted it reduction, and the sub- random number after reduction
Fragment is sent to the authorization node of assembling random number;Sub- random number comprising modules will be received for assembling the authorization node of random number
To sub- random number fragment be assembled into final random number, and be put into block chain.
Compared with prior art, the present invention provides a kind of random-number generating method and system of block chain, have following
Advantageous effect:The random-number generating method and system of the block chain, by introducing privacy sharing skill in random number generation mechanism
Art make other sub- random number producer nodes of sub- random number producer node public key encryption be written block chain in, then other
Reduction restores all sub- random numbers after the encrypted sub- random number respectively received is decrypted in sub- random number producer node
And each sub- random number of random combine, synthesize final random number, the producer node for reaching multiple sub- random numbers cannot be intentional
Other nodes go to generate the purpose of random number in the case of having generated sub- random number again, and assembly node utilizes existing for network not
Certainty, it is preferential to restore and be assembled by certain " random rule " using the former sub- random numbers reached at first final random
Number, to achieve the purpose that distort and go prediction data.
It is not directed to part in the device to be the same as those in the prior art or can be realized by using the prior art, structure of the invention
Simply, easy to operate.
Description of the drawings
Fig. 1 is a kind of flow chart of the random-number generating method of block chain proposed by the present invention;
Fig. 2 is a kind of flow chart of the random-number generating method for block chain that the embodiment of the present invention 2 proposes;
Fig. 3 is the structure composition figure for the system that a kind of random number of block chain proposed by the present invention generates
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.
Embodiment 1
As shown in Figure 1, a kind of random-number generating method of block chain, includes the following steps:
(1), each authorization node of block chain generates sub- random number according to threshold secret sharing algorithm;
(2), sub- random number will be generated and is divided into N number of fragment, form sub- random number fragment, the N is the parameter freely set;
(3), each authorization node bundle random number of block chain is divided into N parts of fragment and is sent respectively to N number of block chain mandate section
Point;
(4), each authorization node of block chain is respectively encrypted N number of fragment of sub- random number;
(5), the result after N number of fragment of each authorization node of block chain bundle random number respectively is encrypted is sent respectively to
N number of block chain authorization node;
(6), block chain authorization node receives corresponding sub- random number fragment, and it is decrypted;
(7), each authorization node is sent to the sub- random number fragment after decryption the authorization node of assembling random number;
(8), the authorization node of assembling random number receives each sub- random number fragment, and the authorization node for assembling random number restores
Several sub- random numbers reached at first;
(9), former sub- random numbers of recovery are assembled into final random number by the authorization node of assembling random number.
Further, it is to the encrypted method of N number of fragment of sub- random number in the step (4):It first obtains and authorizes
The public key address of node, then be encrypted respectively with public key bundle random number is broken.
Further, the method for decryption is in the step (6):Each authorization node of block chain is using private key to the son that receives
Random number fragment is decrypted.
Further, the authorization node of every sub- random number can only see the portion that other sub- random number authorization nodes are shared
Molecule random number.
Further, the final random number generated in the step (9) needs to be put into block chain, and carries out the whole network broadcast
Notice.
Embodiment 2
As shown in Fig. 2, each authorization node of block chain generates sub- random number A, and bundle random number A is divided into A1, A2, A3, An
A fragment forms sub- random number fragment A1, A2, A3, An;Each authorization node of block chain obtains the public key address of node 1,2,3, n,
And it is encrypted respectively with public key bundle random number fragment A1, A2, A3, An;Each authorization node of block chain distinguishes bundle random number
The encrypted data of fragment A1, A2, A3, An are sent respectively to node 1,2,3, n;Block chain authorization node 1 receives sub- random number
Fragment A1 is used in combination private key that sub- random number fragment A1 is decrypted, and block chain authorization node 2 receives sub- random number fragment A2, and
Sub- random number fragment A2 is decrypted with private key, block chain authorization node 3 receives sub- random number fragment A3, and private key antithetical phrase is used in combination
Random number fragment A3 is decrypted, and block chain authorization node n receives sub- random number fragment An, is used in combination private key to sub- random number fragment
An is decrypted;Sub- random number fragment A1, A2, A3, An after decryption is separately sent to the authorization node of assembling random number, group
The authorization node of dress random number restores the sub- random number reached at first, and the sub- random number of recovery is assembled into final random number,
The final random number being assembled into is put into block chain, and carries out the whole network broadcasting announcements.
Embodiment 3
As shown in figure 3, the system that a kind of random number of block chain generates, including sub- random number generation module, sub- random number
Sending module, sub- random number receiving module and sub- random number comprising modules, the sub- random number generation module are each for block chain
Authorization node generates sub- random number, and the sub- random number of generation is divided into several fragments, forms sub- random number fragment;The son
Random number sending module is that the sub- random number fragment of formation is sent to other authorization nodes for each authorization node of block chain,
And sub- random number fragment is encrypted;The sub- random number receiving module is to receive others for each authorization node of block chain
The encrypted sub- random number fragment that authorization node is sent is decrypted it reduction, and the sub- random number fragment after reduction is sent out
Give the authorization node of assembling random number;Sub- random number comprising modules are the sons that will be received for assembling the authorization node of random number
Random number fragment is assembled into final random number, and is put into block chain.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Any one skilled in the art in the technical scope disclosed by the present invention, according to the technique and scheme of the present invention and its
Inventive concept is subject to equivalent substitution or change, should be covered by the protection scope of the present invention.
Claims (6)
1. a kind of random-number generating method of block chain, it is characterised in that:Include the following steps:
(1), each authorization node of block chain generates sub- random number according to threshold secret sharing algorithm;
(2), sub- random number will be generated and is divided into N number of fragment, form sub- random number fragment, the N is the parameter freely set;
(3), each authorization node bundle random number of block chain is divided into N parts of fragment and is sent respectively to N number of block chain authorization node;
(4), each authorization node of block chain is respectively encrypted N number of fragment of sub- random number;
(5), the result after N number of fragment of each authorization node of block chain bundle random number respectively is encrypted is sent respectively to N number of
Block chain authorization node;
(6), block chain authorization node receives corresponding sub- random number fragment, and it is decrypted;
(7), each authorization node is sent to the sub- random number fragment after decryption the authorization node of assembling random number;
(8), the authorization node of assembling random number receives each sub- random number fragment, and the authorization node for assembling random number restores at first
Several sub- random numbers reached;
(9), former sub- random numbers of recovery are assembled into final random number by the authorization node of assembling random number.
2. a kind of random-number generating method of block chain according to claim 1, it is characterised in that:In the step (4)
The encrypted method of N number of fragment to sub- random number is:The public key address of authorization node is first obtained, then uses public key bundle respectively
Random number is broken to be encrypted.
3. the random-number generating method and system of a kind of block chain according to claim 1, it is characterised in that:The step
(6) method of decryption is in:Each authorization node of block chain is decrypted the sub- random number fragment received using private key.
4. a kind of random-number generating method of block chain according to claim 1, it is characterised in that:Every a sub- random number
Authorization node can only see the sub- random number in part that other sub- random number authorization nodes are shared.
5. a kind of random-number generating method of block chain according to claim 1, it is characterised in that:In the step (9)
The final random number generated needs to be put into block chain, and carries out the whole network broadcasting announcements.
6. the system generated according to a kind of random number of any block chains of claim 1-5, it is characterised in that:Including son
Random number generation module, sub- random number sending module, sub- random number receiving module and sub- random number comprising modules, the son are random
Number generation module generates sub- random number for each authorization node of block chain, and the sub- random number of generation is divided into several fragments,
Form sub- random number fragment;The sub- random number sending module is for each authorization node of block chain that the sub- random number of formation is broken
Piece is sent to other authorization nodes, and sub- random number fragment is encrypted;The sub- random number receiving module is to be used for area
Each authorization node of block chain receives the encrypted sub- random number fragment that other authorization nodes are sent, it is decrypted reduction, and
Sub- random number fragment after reduction is sent to the authorization node of assembling random number;Sub- random number comprising modules be for assemble with
The sub- random number fragment received is assembled into final random number by the authorization node of machine number, and is put into block chain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810880884.2A CN108768647B (en) | 2018-08-04 | 2018-08-04 | Random number generation method for block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810880884.2A CN108768647B (en) | 2018-08-04 | 2018-08-04 | Random number generation method for block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108768647A true CN108768647A (en) | 2018-11-06 |
CN108768647B CN108768647B (en) | 2022-06-14 |
Family
ID=63968918
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810880884.2A Active CN108768647B (en) | 2018-08-04 | 2018-08-04 | Random number generation method for block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108768647B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109559119A (en) * | 2018-11-29 | 2019-04-02 | 成都捕风数据科技有限公司 | By entrusting the block producer to reach the method for the credible endogenous random process of block chain |
CN109617679A (en) * | 2018-11-29 | 2019-04-12 | 哈希未来(北京)科技有限公司 | Generate, obtain and provide method, system and the storage medium of random number |
CN110865793A (en) * | 2018-12-29 | 2020-03-06 | 北京版全家科技发展有限公司 | Method for generating random number based on block chain intelligent contract |
CN111291411A (en) * | 2020-02-13 | 2020-06-16 | 福州大学 | Safe video anomaly detection system and method based on convolutional neural network |
CN111488134A (en) * | 2020-04-09 | 2020-08-04 | 堡垒科技有限公司 | Public random number generation method and device based on block chain |
CN112562168A (en) * | 2020-11-27 | 2021-03-26 | 中国联合网络通信集团有限公司 | Block chain-based online shaking method, system, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827402A (en) * | 2016-05-18 | 2016-08-03 | 武汉理工大学 | Distributed public verifiable random number generation method |
US20170331624A1 (en) * | 2016-05-13 | 2017-11-16 | Gideon Samid | Cyber Passport |
-
2018
- 2018-08-04 CN CN201810880884.2A patent/CN108768647B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170331624A1 (en) * | 2016-05-13 | 2017-11-16 | Gideon Samid | Cyber Passport |
CN105827402A (en) * | 2016-05-18 | 2016-08-03 | 武汉理工大学 | Distributed public verifiable random number generation method |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109559119A (en) * | 2018-11-29 | 2019-04-02 | 成都捕风数据科技有限公司 | By entrusting the block producer to reach the method for the credible endogenous random process of block chain |
CN109617679A (en) * | 2018-11-29 | 2019-04-12 | 哈希未来(北京)科技有限公司 | Generate, obtain and provide method, system and the storage medium of random number |
CN110865793A (en) * | 2018-12-29 | 2020-03-06 | 北京版全家科技发展有限公司 | Method for generating random number based on block chain intelligent contract |
CN110865793B (en) * | 2018-12-29 | 2023-05-12 | 北京版全家科技发展有限公司 | Method for generating random number based on blockchain intelligent contract |
CN111291411A (en) * | 2020-02-13 | 2020-06-16 | 福州大学 | Safe video anomaly detection system and method based on convolutional neural network |
CN111291411B (en) * | 2020-02-13 | 2022-12-23 | 福州大学 | Safe video anomaly detection system and method based on convolutional neural network |
CN111488134A (en) * | 2020-04-09 | 2020-08-04 | 堡垒科技有限公司 | Public random number generation method and device based on block chain |
CN111488134B (en) * | 2020-04-09 | 2021-04-27 | 堡垒科技有限公司 | Public random number generation method and device based on block chain |
CN112562168A (en) * | 2020-11-27 | 2021-03-26 | 中国联合网络通信集团有限公司 | Block chain-based online shaking method, system, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108768647B (en) | 2022-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108768647A (en) | A kind of random-number generating method and system of block chain | |
CN112232527B (en) | Safe distributed federal deep learning method | |
CN109257346B (en) | Concealed transmission system based on block chain | |
CN109067522A (en) | A kind of random number Verified secret sharing method | |
CN101383703B (en) | Dynamic ciphering method based on broad sense information field | |
CN101394268B (en) | Advanced ciphering system and method based on broad sense information field | |
CN105812366A (en) | Server, anti-crawler system and anti-crawler verification method | |
CN109711834B (en) | Address management method for block chain cold wallet | |
CN102684884B (en) | A kind of Portal Web server and the method preventing from forging the request of rolling off the production line thereof | |
CN111324881A (en) | Data security sharing system and method fusing Kerberos authentication server and block chain | |
CN106411926A (en) | Data encryption communication method and system | |
CN105637801A (en) | Polymorphic encryption key matrices | |
CN109450629A (en) | Based on block chain random-number generating method | |
CN112242898B (en) | Encryption method for onion network system consensus file | |
US8527766B2 (en) | Reducing leakage of information from cryptographic systems | |
CN116383857A (en) | Cross-platform authentication-based storage method, device and storage medium | |
CN110865793B (en) | Method for generating random number based on blockchain intelligent contract | |
CN105337963A (en) | Multimedia data encryption method and device | |
US11803631B2 (en) | Binding a hardware security token to a host device to prevent exploitation by other host devices | |
CN114567428A (en) | Block chain data hidden transmission method supporting dynamic labels | |
CN111698252B (en) | Cloud platform data encryption transmission method and system | |
CN112580071A (en) | Data processing method and device | |
CN109428712A (en) | Data Encrypt and Decrypt method and data Encrypt and Decrypt system | |
CN109802962B (en) | Encryption and decryption method in block chain technology | |
CN114244635B (en) | Encryption type data coding method of communication equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |