CN115442106A - Block chain supervision method, system, equipment and storage medium - Google Patents

Block chain supervision method, system, equipment and storage medium Download PDF

Info

Publication number
CN115442106A
CN115442106A CN202211052832.9A CN202211052832A CN115442106A CN 115442106 A CN115442106 A CN 115442106A CN 202211052832 A CN202211052832 A CN 202211052832A CN 115442106 A CN115442106 A CN 115442106A
Authority
CN
China
Prior art keywords
block
supervision
node
nodes
replacement
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
CN202211052832.9A
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.)
Changsha University of Science and Technology
Original Assignee
Changsha University of Science and Technology
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 Changsha University of Science and Technology filed Critical Changsha University of Science and Technology
Priority to CN202211052832.9A priority Critical patent/CN115442106A/en
Publication of CN115442106A publication Critical patent/CN115442106A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/102Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying security measure for e-commerce

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block chain supervision method, a system, equipment and a storage medium, which comprises the steps of randomly selecting supervision nodes from a plurality of nodes in a block chain, generating sentinel blocks through the supervision nodes, generating common blocks through the supervision nodes, storing block heights and version numbers of the common blocks in a block version tree, modifying transaction contents of the common blocks in preset block chain supervision time by the supervision nodes through chameleon Hash trap functions to obtain replacement blocks, broadcasting the block heights of the replacement blocks and the replacement blocks to other nodes in the block chain through the supervision nodes to enable other nodes to receive the replacement blocks, changing the common blocks into the replacement blocks to complete data supervision and supervision of the whole system, and supervising the block chain system behaviors of the block chain system through the cooperation of the sentinel blocks and the supervision nodes with the chameleon Hash trap functions to realize local supervision, editing and censoring of the block chain system.

Description

Block chain supervision method, system, equipment and storage medium
Technical Field
The present invention relates to the field of block chain related technologies, and in particular, to a block chain monitoring method, system, device, and storage medium.
Background
The blockchain system is essentially a point-to-point computer network system in a completely distributed environment, any user node in the system can package the contents of signed files, transaction information, transaction data, identity information, behavior data and the like into corresponding transaction data through Hash operation, the legality and validity of the transaction information are guaranteed through a digital signature technology, and then the transaction data are transmitted into the blockchain system.
At the same time, non-tampering is one of the important characteristics of the blockchain, which guarantees the integrity and correctness of the data on the chain. However, absolute non-falsification is not beneficial to error detection and timely stop-loss supervision of the blockchain, for example, if some inappropriate data (such as personal privacy, business secret, etc.) is sent to the blockchain along with the transaction, or some abnormal situations occur due to a mistake in previous design. Due to the non-tamper-proof property of the block chain, the error before modification becomes extremely difficult, and further privacy of related users is revealed or personal and property safety is affected.
Therefore, the manageability of the blockchain is important. The existing editable block chain technology mainly realizes the modification of historical block data through a chameleon hash function, but there are some problems in the current research on the scheme: 1) The problem of centralized trap door holding easily causes the abuse of the trap door to cause the historical data to be modified, and the rule of block chain decentralized is violated; 2) The problem of block editing granularity is that block historical data can only be modified by taking a block as a unit, and the modification granularity is overlarge; 3) Only the latest version number of a certain block being edited can be known: the historical number of modifications of the version and the span between versions of a certain tile cannot be checked.
Disclosure of Invention
The present invention is directed to at least solving the problems of the prior art. Therefore, the invention provides a block chain supervision method, a system, equipment and a storage medium, which can realize local supervision, editing and examination of a block chain system.
In a first aspect of the present invention, a block chain supervision method is provided, including the following steps:
randomly selecting a supervision node from a plurality of nodes in a block chain;
packing supervision information according to a preset supervision period through the supervision node to generate sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information comprises a block version tree;
generating a common block containing transaction contents by the supervision node according to the supervision period in a packaging mode, and storing the block height and the version number of the common block in the block version tree;
modifying the transaction content of the common block within a preset block chain supervision time limit by the supervision node by using a chameleon Hash trapdoor function to obtain a replacement block, and storing the block height and the version number of the replacement block in the sentinel block, wherein the block height of the replacement block is the same as the block height of the common block;
broadcasting the replacement block and the block height of the replacement block to all other nodes in the block chain through the supervision node, so that all other nodes receive the replacement block, find a corresponding common block according to the block height of the replacement block, and change the common block into the replacement block.
According to the embodiment of the invention, at least the following technical effects are achieved:
the method includes the steps that supervision nodes are randomly selected from a plurality of nodes in a block chain, supervision information is packaged by the supervision nodes according to a preset supervision period to generate sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, the supervision information comprises a block version tree, the common blocks containing transaction contents are packaged by the supervision nodes according to the supervision period, the block heights and the version numbers of the common blocks are stored in the block version tree, the transaction contents of the common blocks in a preset block chain supervision time are modified by the supervision nodes through a chameleon Hash function to obtain replacement blocks, the block heights and the version numbers of the replacement blocks are stored in the sentinel blocks, the block heights of the replacement blocks are the same as the block heights of the common blocks, the replacement blocks and the block heights of the replacement blocks are broadcast to all other nodes in the block chain through the supervision nodes, all other nodes receive the replacement blocks, the corresponding common blocks are found according to the block heights of the replacement blocks, the common blocks are changed into the replacement blocks, the data of a whole supervision system are completed, and the supervision nodes are matched with the chameleon Hash function, so that the supervision nodes and the supervision nodes can edit the supervision nodes.
According to some embodiments of the invention, said randomly selecting the policing node from a plurality of nodes in the blockchain comprises:
obtaining a first supervision node candidate list according to the number of nodes in a preset supervision candidate list and a random number generated by a random beacon;
and when the tenure period of the supervision node reaches half of a preset tenure period, updating the first supervision node candidate list once according to a random beacon to obtain a second supervision node candidate list, so that when the tenure period of the supervision node is ended, a new supervision node is determined from the second supervision node candidate list.
According to some embodiments of the present invention, the block version tree stores data using hexadecimal coding to store the block height of the normal block and the block height of the replacement block.
According to some embodiments of the invention, the block version tree comprises a branch node, a leaf node and an extension node, wherein the branch node comprises 17 slots, each slot being mapped to either the leaf node or the extension node;
said leaf node including a version number of said normal block and an encoded value ending in hexadecimal representation of the block height of said normal block;
the expansion nodes are obtained through a path compression algorithm, the expansion nodes comprise coded values of non-branched paths which represent the block heights of the common blocks in hexadecimal and block height hash value pointers pointing to other nodes, and the expansion nodes are linked to the next node through the pointers.
According to some embodiments of the present invention, the modifying, by the supervisory node, the transaction content of the normal block within the preset block chain supervision time limit by using a chameleon hashed trapdoor function to obtain a replacement block includes:
the method comprises the following steps of S1, obtaining a public key and a trap door according to a preset safety parameter and a key generation function, wherein the calculation formula for obtaining the public key and the trap door according to the preset safety parameter and the key generation function is as follows:
CHGen(1 k )=(Hk,Tk)
wherein k is the preset security parameter, CHGen is a key generation function, hk is a public key, and Tk is a trapdoor;
s2, obtaining chameleon hash values and first random numbers by utilizing a hash generation function according to the transaction contents of the common block and the public key, wherein the calculation formula for obtaining the chameleon hash values and the random numbers by utilizing the hash generation function according to the transaction contents of the common block and the public key is as follows:
CHash(Hk,Tx)=(CH,ξ)
the CHash is a Hash generation function, tx is the transaction content of the common block, CH is the chameleon Hash value, and xi is a first random number;
s3, verifying the chameleon hash value and the first random number according to a hash verification function, wherein a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is as follows:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value;
if d is 1, continuing to execute step S4, if d is 0, returning to step S2,
step S4, a second random number is obtained by utilizing a Hash collision function, so that the transaction content of the common block is successfully modified into replacement transaction content, and the replacement block is obtained, wherein the calculation formula for obtaining the second random number by utilizing the Hash collision function is as follows:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the replacement transaction content and ξ' is the second random number.
In a second aspect of the present invention, a system for managing a blockchain is provided, the system comprising:
the supervision node selection module is used for randomly selecting supervision nodes from a plurality of nodes in the block chain;
the sentinel block generation module is used for packaging supervision information according to a preset supervision period through the supervision node to generate the sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information comprises a block version tree;
the common block generation module is used for generating a common block containing transaction contents by the supervision node according to the supervision period in a packaging mode, and storing the block height and the version number of the common block in the block version tree;
the transaction content replacing module is used for modifying the transaction content of the common block within a preset block chain supervision time limit by using a chameleon Hash trapdoor function through the supervision node to obtain a replacing block, and storing the block height and the version number of the replacing block into the sentinel block, wherein the block height of the replacing block is the same as the block height of the common block;
and the data updating module is used for broadcasting the replacement block and the block height of the replacement block to all other nodes in the block chain through the supervisory node so that all other nodes receive the replacement block, finding a corresponding common block according to the block height of the replacement block and changing the common block into the replacement block.
The system randomly selects a supervisory node from a plurality of nodes in a block chain, packs supervisory information according to a preset supervisory period through the supervisory node to generate sentry blocks, wherein the supervisory period is the number of common blocks between two adjacent sentry blocks, the supervisory information comprises a block version tree, packs and generates the common blocks containing transaction contents according to the supervisory period through the supervisory node, stores the block height and the version number of the common blocks in the block version tree, modifies the transaction contents of the common blocks in a preset block chain supervisory time limit through a trapdoor function of chameleon hash through the supervisory node to obtain replacement blocks, stores the block height and the version number of the replacement blocks in the sentry blocks, wherein the block height of the replacement blocks is the same as the block height of the common blocks, broadcasts the replacement blocks and the block height of the replacement blocks to all other nodes in the block chain through the supervisory node, so that all other nodes receive the replacement blocks, finds corresponding common blocks according to the block height of the replacement blocks, modifies the common blocks into the replacement, completes the supervision of the whole system, and realizes the supervision through the cooperation of the trapdoor function of the sentry blocks and the supervisory node, and the system can edit the sentry blocks.
According to some embodiments of the invention, the supervisory node selection module further comprises:
the acquisition module of a first supervision node candidate list is used for acquiring the first supervision node candidate list according to the number of nodes of the preset supervision candidate list and the random number generated by the random beacon;
and the supervision node determining and updating module is used for determining the supervision nodes according to the first supervision node candidate list, and updating the first supervision node candidate list once according to a random beacon to obtain a second supervision node candidate list when the term period of the supervision nodes reaches half of a preset term period, so that a new supervision node is determined from the second supervision node candidate list when the term period of the supervision nodes is finished.
According to some embodiments of the invention, the transaction content replacement module further comprises:
the key generation module is used for obtaining a public key and a trap door according to a preset safety parameter and a key generation function, wherein the calculation formula for obtaining the public key and the trap door according to the preset safety parameter and the key generation function is as follows:
CHGen(1 k )=(Hk,Tk)
wherein k is the preset security parameter, CHGen is a key generation function, hk is a public key, and Tk is a trapdoor;
a hash generation module, configured to obtain a chameleon hash value and a first random number by using a hash generation function according to the transaction content of the common block and the public key, where a calculation formula for obtaining the chameleon hash value and the random number by using the hash generation function according to the transaction content of the common block and the public key is as follows:
CHash(Hk,Tx)=(CH,ξ)
the CHash is a hash generation function, tx is the transaction content of the common block, CH is the chameleon hash value, and xi is a first random number;
a hash verification module, configured to verify the chameleon hash value and the first random number according to a hash verification function, where a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value;
if d is 1, skipping to a hash collision module, if d is 0, skipping to a hash generation module,
a hash collision module, configured to obtain a second random number by using a hash collision function, so that the transaction content of the ordinary block is successfully modified into a replacement transaction content, and the replacement block is obtained, where a calculation formula for obtaining the second random number by using the hash collision function is:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the replacement transaction content and ξ' is the second random number.
In a third aspect of the invention, there is provided a blockchain supervising electronic device comprising at least one control processor and a memory for communicative connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the above-described block chain policing method.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, which stores computer-executable instructions for causing a computer to perform the above-mentioned block chain supervision method.
It should be noted that the advantageous effects between the second to fourth aspects of the present invention and the prior art are the same as the advantageous effects between the above-mentioned one kind of blockchain supervision system and the prior art, and will not be described in detail here.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a block chain supervision method according to an embodiment of the present invention;
fig. 2 is a flowchart of step S101 in fig. 1;
fig. 3 is a flowchart of a system for managing a block chain according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, if there are first, second, etc. described, it is only for the purpose of distinguishing technical features, and it is not understood that relative importance is indicated or implied or the number of indicated technical features is implicitly indicated or the precedence of the indicated technical features is implicitly indicated.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to, for example, the upper, lower, etc., is indicated based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, but does not indicate or imply that the device or element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
In the description of the present invention, it should be noted that unless otherwise explicitly defined, terms such as arrangement, installation, connection and the like should be broadly understood, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
Before the embodiment of the invention is introduced, a chameleon hash algorithm, private key-public key cryptography, a random beacon and workload certification are briefly explained:
the chameleon hash algorithm can replace original transaction data by utilizing the trapdoor on the premise of not changing a hash value, and can still pass integrity verification.
Private-public key cryptography, or asymmetric cryptography, refers to both public keys that can be widely spread by any cryptosystem using a key pair and private keys that are known only to the owner. Has two functions: authentication and encryption.
Random beacon: providing a trusted randomization scheme, generating a series of truly random values, can be guaranteed to be unpredictable even if an attacker has access to a random source.
And the workload proves that: accounting power must be obtained through a certain workload, and the global consensus is obtained through voting based on the workload. Firstly, a certain workload is completed before accounting, which ensures that people who participate in accounting pay a certain amount to confirm that the people pay attention and cherish the accounting right; secondly, the principle of one ticket of workload is guaranteed, and the voting right is evenly distributed; thirdly, the result of the billing is checked by people, and if the billing is correct, the reward is obtained. If billing is incorrect, the previous workload is wasted. Under this rule, honest people are rewarded, and dishonest people waste work without any benefit. Therefore, most people can keep on the rules, and the normal operation of the system is ensured.
The existing editable block chain technology mainly realizes the modification of historical block data through a chameleon hash function, but there are some problems in the current research on the scheme: 1) The problem of centralized trap door holding easily causes the abuse of the trap door to cause the historical data to be modified, and the rule of block chain decentralized is violated; 2) The problem of block editing granularity is that block historical data can only be modified by taking a block as a unit, and the modification granularity is overlarge; 3) Only the latest version number of a certain block being edited can be known: the historical number of modifications of the version and the span between versions of a certain tile cannot be checked.
In order to solve the technical defects, referring to fig. 1, the present invention further provides a block chain supervision method, including:
step S101, randomly selecting a supervision node from a plurality of nodes in a block chain.
And S102, packing supervision information according to a preset supervision period through the supervision node to generate the sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information comprises a block version tree.
Step S103, generating a common block containing transaction contents by the supervisory node according to the supervisory period in a packaging mode, and storing the block height and the version number of the common block in a block version tree.
And step S104, modifying the transaction content of the common block in the preset block chain supervision time limit by using a chameleon Hash trapdoor function through the supervision node to obtain a replacement block, and storing the block height and the version number of the replacement block in the sentinel block, wherein the block height of the replacement block is the same as the block height of the common block.
Step S105, broadcasting the replacement block and the block height of the replacement block to all other nodes in the block chain by the monitoring node, so that all other nodes receive the replacement block, and find a corresponding normal block according to the block height of the replacement block, and change the normal block into the replacement block.
The method includes the steps that supervision nodes are randomly selected from a plurality of nodes in a block chain, supervision information is packaged by the supervision nodes according to a preset supervision period to generate sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, the supervision information comprises a block version tree, the common blocks containing transaction contents are packaged by the supervision nodes according to the supervision period, the block heights and the version numbers of the common blocks are stored in the block version tree, the transaction contents of the common blocks in a preset block chain supervision time are modified by the supervision nodes through a chameleon Hash function to obtain replacement blocks, the block heights and the version numbers of the replacement blocks are stored in the sentinel blocks, the block heights of the replacement blocks are the same as the block heights of the common blocks, the replacement blocks and the block heights of the replacement blocks are broadcast to all other nodes in the block chain through the supervision nodes, all other nodes receive the replacement blocks, the corresponding common blocks are found according to the block heights of the replacement blocks, the common blocks are changed into the replacement blocks, the data of a whole supervision system are completed, and the supervision nodes are matched with the chameleon Hash function, so that the supervision nodes and the supervision nodes can edit the supervision nodes.
Referring to fig. 2, in some embodiments, step S101 may include, but is not limited to including, steps S201 to S202:
step S201, a first supervision node candidate list is obtained according to the number of nodes in the preset supervision candidate list and the random number generated by the random beacon.
Step S202, a supervisory node is determined according to the first supervisory node candidate list, and when the term period of the supervisory node reaches half of the preset term period, the first supervisory node candidate list is updated for one time according to the random beacon to obtain a second supervisory node candidate list, so that when the term period of the supervisory node is finished, a new supervisory node is determined from the second supervisory node candidate list.
The randomness of election and operation of the supervision nodes is ensured.
In some embodiments, the block version tree stores data in hexadecimal coding to store the block height of the normal block and the block height of the replacement block.
In some embodiments, the block version tree includes a branch node, a leaf node, and an extension node, wherein the branch node includes 17 slots, each slot mapped to either the leaf node or the extension node.
The leaf node includes a version number of the normal block and an encoded value ending in hexadecimal representing the block height of the normal block.
The expansion nodes are obtained through a path compression algorithm, the expansion nodes comprise encoding values of non-branched paths which represent the block heights of the common blocks in hexadecimal and block height hash value pointers pointing to other nodes, and the expansion nodes are linked to the next node through the pointers.
In some embodiments, step S104 may include, but is not limited to including, step S401 to step S404:
step S401, obtaining a public key and a trapdoor according to a preset security parameter and a key generation function, where a calculation formula for obtaining the public key and the trapdoor according to the preset security parameter and the key generation function is:
CHGen(1 k )=(Hk,Tk)
and k is a preset safety parameter, CHGen is a key generation function, hk is a public key, and Tk is a trapdoor.
Step S402, obtaining a chameleon hash value and a first random number by utilizing a hash generation function according to the transaction content and the public key of the common block, wherein the calculation formula for obtaining the chameleon hash value and the random number by utilizing the hash generation function according to the transaction content and the public key of the common block is as follows:
CHash(Hk,Tx)=(CH,ξ)
the method comprises the steps of obtaining a first random number, obtaining a chameleon hash value, obtaining a CHash, obtaining a chameleon hash value, and obtaining a Tzeon hash value.
Step S403, verifying the chameleon hash value and the first random number according to a hash verification function, wherein a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is as follows:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value.
If d is 1, the process continues to step S404, and if d is 0, the process returns to step S402.
Step S404, obtaining a second random number by using a hash collision function, so that the transaction content of the ordinary block is successfully modified into a replacement transaction content, and obtaining a replacement block, wherein a calculation formula for obtaining the second random number by using the hash collision function is as follows:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the replacement transaction content and ξ' is the second random number.
According to the block chain storage data management method, the chameleon Hash is used for constructing the common block, and the supervision nodes endowed with supervision authority are used for carrying out local supervision in supervision timeliness, so that editability of wrong historical data and malicious behaviors in a block chain system is achieved, and credibility, controllability and accountability of block chain storage data are improved.
In some embodiments, the packaging of the sentinel blocks does not require workload certification, and all common blocks other than the sentinel blocks are packaged for chaining by workload certification.
The monitoring node is ensured to complete the packaging and uplink of the sentinel blocks without spending a large amount of computing resources.
In addition, referring to fig. 3, an embodiment of the present invention provides a blockchain supervision system, which includes a supervision node selection module 1100, a sentinel block generation module 1200, a common block generation module 1300, a transaction content replacement module 1400, and a data update module 1500, wherein:
the supervisory node selection module 1100 is configured to randomly select a supervisory node from a plurality of nodes in a blockchain;
the sentinel block generation module 1200 is configured to package supervision information according to a preset supervision period by a supervision node to generate sentinel blocks, where the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information includes a block version tree;
the common block generation module 1300 is configured to generate a common block containing transaction content by the supervisory node according to the supervision period in a package manner, and store the block height and the version number of the common block in the block version tree;
the transaction content replacement module 1400 is configured to modify, by the monitoring node, the transaction content of the normal block within the preset block chain monitoring time limit by using a chameleon hash trapdoor function, to obtain a replacement block, and store the block height and the version number of the replacement block in the sentinel block, where the block height of the replacement block is the same as the block height of the normal block;
the data updating module 1500 is configured to broadcast the replacement block and the block height of the replacement block to all other nodes in the block chain through the monitoring node, so that all other nodes receive the replacement block, find a corresponding normal block according to the block height of the replacement block, and change the normal block into the replacement block.
The system randomly selects a supervision node from a plurality of nodes in a block chain, packs supervision information according to a preset supervision period by the supervision node to generate sentry blocks, wherein the supervision period is the number of common blocks between two adjacent sentry blocks, the supervision information comprises a block version tree, packs the supervision information according to the supervision period by the supervision node to generate the common blocks containing transaction contents, stores the block height and the version number of the common blocks in the block version tree, modifies the transaction contents of the common blocks within the preset block chain supervision time by the supervision node by using a chameleon Hash trap function to obtain replacement blocks, stores the block height and the version number of the replacement blocks in the sentry blocks, wherein the block height of the replacement blocks is the same as the block height of the common blocks, broadcasts the replacement blocks and the block height of the replacement blocks to all other nodes in the block chain by the supervision node to enable all other nodes to receive the replacement blocks, finds the corresponding common blocks according to the block height of the replacement blocks, changes the common blocks into the replacement blocks, completes supervision of the whole supervision system, and implements supervision behavior modification of the sentry blocks by matching the chameleon the supervision node and the supervision node of the supervision chain.
In some embodiments, the supervisory node selection module further comprises:
the acquisition module of a first supervision node candidate list is used for acquiring the first supervision node candidate list according to the number of nodes of the preset supervision candidate list and the random number generated by the random beacon;
and the supervision node determining and updating module is used for determining the supervision nodes according to the first supervision node candidate list, and updating the first supervision node candidate list once according to the random beacon to obtain a second supervision node candidate list when the tenure period of the supervision nodes reaches half of a preset tenure period, so that a new supervision node is determined from the second supervision node candidate list when the tenure period of the supervision nodes is finished.
In some embodiments, the transaction content replacement module further comprises:
the key generation module is used for obtaining a public key and a trap door according to a preset safety parameter and a key generation function, wherein the calculation formula for obtaining the public key and the trap door according to the preset safety parameter and the key generation function is as follows:
CHGen(1 k )=(Hk,Tk)
the system comprises a key generation module, a trap door generation module, a key generation module and a data processing module, wherein k is a preset safety parameter, CHGen is a key generation function, hk is a public key, and Tk is the trap door;
the hash generation module is used for obtaining a chameleon hash value and a first random number by utilizing a hash generation function according to the transaction content and the public key of the common block, wherein the calculation formula for obtaining the chameleon hash value and the random number by utilizing the hash generation function according to the transaction content and the public key of the common block is as follows:
CHash(Hk,Tx)=(CH,ξ)
the method comprises the following steps that A, CHash is a Hash generation function, tx is transaction content of a common block, CH is a chameleon Hash value, and xi is a first random number;
the hash verification module is used for verifying the chameleon hash value and the first random number according to a hash verification function, wherein a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is as follows:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value;
if d is 1, skipping to the hash collision module, if d is 0, skipping to the hash generation module,
the hash collision module is used for obtaining a second random number by using a hash collision function so as to successfully modify the transaction content of the common block into the replacement transaction content to obtain a replacement block, wherein a calculation formula for obtaining the second random number by using the hash collision function is as follows:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the alternate transaction content and ξ' is the second random number.
It should be noted that the embodiment of the present system and the embodiment of the system described above are based on the same inventive concept, and therefore, the related contents of the embodiment of the method described above are also applicable to the embodiment of the present system, and are not described herein again.
The present application further provides a block chain supervision electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing: such as the above block chain policing method.
The processor and memory may be connected by a bus or other means.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the blockchain supervision method of the above-described embodiments are stored in the memory, and when executed by the processor, perform the blockchain supervision method of the above-described embodiments, for example, perform the above-described method steps S101 to S105 in fig. 1.
The present application further provides a computer-readable storage medium storing computer-executable instructions for performing: such as the above-described blockchain policing method.
The computer-readable storage medium stores computer-executable instructions, which are executed by a processor or controller, for example, by a processor in the above-mentioned electronic device embodiment, and can make the above-mentioned processor execute the block chain supervision method in the above-mentioned embodiment, for example, execute the above-mentioned method steps S101 to S105 in fig. 1.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program elements or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program elements, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as is well known to those of ordinary skill in the art.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (10)

1. A block chain supervision method, comprising:
randomly selecting a supervision node from a plurality of nodes in a block chain;
packing supervision information according to a preset supervision period through the supervision node to generate the sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information comprises a block version tree;
generating a common block containing transaction contents by the supervision node according to the supervision period in a packaging mode, and storing the block height and the version number of the common block in the block version tree;
modifying the transaction content of the common block within a preset block chain supervision time limit by the supervision node by using a chameleon Hash trapdoor function to obtain a replacement block, and storing the block height and the version number of the replacement block into the sentinel block, wherein the block height of the replacement block is the same as the block height of the common block;
broadcasting the replacement block and the block height of the replacement block to all other nodes in the block chain through the supervision node, so that all other nodes receive the replacement block, find a corresponding common block according to the block height of the replacement block, and change the common block into the replacement block.
2. A method as claimed in claim 1, wherein said randomly selecting a policing node from a plurality of nodes in a blockchain comprises:
obtaining a first supervision node candidate list according to the number of nodes in the preset supervision candidate list and the random number generated by the random beacon;
and updating the first supervision node candidate list once according to a random beacon to obtain a second supervision node candidate list when the tenure period of the supervision node reaches half of a preset tenure period, so that when the tenure period of the supervision node is ended, a new supervision node is determined from the second supervision node candidate list.
3. A method as claimed in claim 2, wherein the block version tree stores data in hexadecimal coding to store the block height of the normal block and the block height of the replacement block.
4. A method for managing a blockchain according to claim 3, wherein said blockchain version tree includes a branch node, a leaf node and an extension node, wherein said branch node includes 17 slots, each of said slots being mapped to said leaf node or said extension node;
said leaf node including a version number of said normal block and an encoded value ending in hexadecimal representation of the block height of said normal block;
the expansion nodes are obtained through a path compression algorithm, the expansion nodes comprise coded values of non-branched paths which represent the block heights of the common blocks in hexadecimal and block height hash value pointers pointing to other nodes, and the expansion nodes are linked to the next node through the pointers.
5. The blockchain supervision method according to claim 4, wherein the modifying, by the supervision node, the transaction content of the normal block within a preset blockchain supervision age by using a trapdoor function of chameleon hashing to obtain a replacement block comprises:
the method comprises the following steps of S1, obtaining a public key and a trap door according to a preset safety parameter and a key generation function, wherein the calculation formula for obtaining the public key and the trap door according to the preset safety parameter and the key generation function is as follows:
CHGen(1 k )=(Hk,Tk)
wherein k is the preset security parameter, CHGen is a key generation function, hk is a public key, and Tk is a trapdoor;
s2, obtaining chameleon hash values and first random numbers by utilizing a hash generation function according to the transaction contents of the common block and the public key, wherein the calculation formula for obtaining the chameleon hash values and the random numbers by utilizing the hash generation function according to the transaction contents of the common block and the public key is as follows:
CHash(Hk,Tx)=(CH,ξ)
the CHash is a Hash generation function, tx is the transaction content of the common block, CH is the chameleon Hash value, and xi is a first random number;
s3, verifying the chameleon hash value and the first random number according to a hash verification function, wherein a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is as follows:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value;
if d is 1, continuing to execute step S4, if d is 0, returning to step S2,
step S4, a second random number is obtained by utilizing a Hash collision function, so that the transaction content of the common block is successfully modified into replacement transaction content, and the replacement block is obtained, wherein the calculation formula for obtaining the second random number by utilizing the Hash collision function is as follows:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the alternate transaction content and ξ' is the second random number.
6. A blockchain supervision system, the blockchain supervision system comprising:
the supervision node selection module is used for randomly selecting supervision nodes from a plurality of nodes in the block chain;
the sentinel block generation module is used for packaging supervision information according to a preset supervision period through the supervision node to generate sentinel blocks, wherein the supervision period is the number of common blocks between two adjacent sentinel blocks, and the supervision information comprises a block version tree;
the common block generation module is used for generating a common block containing transaction contents by the supervision node according to the supervision period in a packaging mode, and storing the block height and the version number of the common block in the block version tree;
the transaction content replacing module is used for modifying the transaction content of the common block within a preset block chain supervision time limit by using a chameleon Hash trapdoor function through the supervision node to obtain a replacing block, and storing the block height and the version number of the replacing block into the sentinel block, wherein the block height of the replacing block is the same as the block height of the common block;
and the data updating module is used for broadcasting the replacement block and the block height of the replacement block to all other nodes in the block chain through the monitoring node so that all other nodes receive the replacement block, finding a corresponding common block according to the block height of the replacement block and changing the common block into the replacement block.
7. A system as claimed in claim 6, wherein said supervisory node selection module further comprises:
the first supervision node candidate list acquisition module is used for acquiring a first supervision node candidate list according to the number of nodes in a preset supervision candidate list and a random number generated by a random beacon;
and the supervision node determining and updating module is used for determining the supervision nodes according to the first supervision node candidate list, and updating the first supervision node candidate list once according to a random beacon to obtain a second supervision node candidate list when the term period of the supervision nodes reaches half of a preset term period, so that a new supervision node is determined from the second supervision node candidate list when the term period of the supervision nodes is finished.
8. The system of claim 7, wherein the transaction content replacement module further comprises:
the key generation module is used for obtaining a public key and a trap door according to a preset safety parameter and a key generation function, wherein the calculation formula for obtaining the public key and the trap door according to the preset safety parameter and the key generation function is as follows:
CHGen(1 k )=(Hk,Tk)
wherein k is the preset security parameter, CHGen is a key generation function, hk is a public key, and Tk is a trapdoor;
a hash generation module, configured to obtain a chameleon hash value and a first random number by using a hash generation function according to the transaction content of the common block and the public key, where a calculation formula for obtaining the chameleon hash value and the random number by using the hash generation function according to the transaction content of the common block and the public key is as follows:
CHash(Hk,Tx)=(CH,ξ)
the CHash is a Hash generation function, tx is the transaction content of the common block, CH is the chameleon Hash value, and xi is a first random number;
a hash verification module, configured to verify the chameleon hash value and the first random number according to a hash verification function, where a calculation formula for verifying the chameleon hash value and the first random number according to the hash verification function is:
CHVer(Hk,Tx,(CH,ξ))=d
wherein d is a Boolean value;
if d is 1, skipping to a hash collision module, if d is 0, skipping to a hash generation module,
the hash collision module is configured to obtain a second random number by using a hash collision function, so that the transaction content of the ordinary block is successfully modified into a replacement transaction content, and the replacement block is obtained, where a calculation formula for obtaining the second random number by using the hash collision function is as follows:
CHCol(Tk,(CH,Tx,ξ)),Tx′)=ξ′
where Tx 'is the replacement transaction content and ξ' is the second random number.
9. A blockchain policing device comprising at least one control processor and a memory for communicative connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the block chain supervision method of any one of claims 1 to 5.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores computer-executable instructions for causing a computer to perform the block chain supervision method according to any one of claims 1 to 5.
CN202211052832.9A 2022-08-31 2022-08-31 Block chain supervision method, system, equipment and storage medium Pending CN115442106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211052832.9A CN115442106A (en) 2022-08-31 2022-08-31 Block chain supervision method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211052832.9A CN115442106A (en) 2022-08-31 2022-08-31 Block chain supervision method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115442106A true CN115442106A (en) 2022-12-06

Family

ID=84245751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211052832.9A Pending CN115442106A (en) 2022-08-31 2022-08-31 Block chain supervision method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115442106A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109903049A (en) * 2019-03-01 2019-06-18 长沙理工大学 A kind of block chain transaction data storage method, device, equipment and storage medium
CN111641712A (en) * 2020-05-29 2020-09-08 深圳市网心科技有限公司 Block chain data updating method, device, equipment, system and readable storage medium
CN111641496A (en) * 2020-05-29 2020-09-08 深圳市网心科技有限公司 Block chain data updating method, device, equipment, system and readable storage medium
WO2021114918A1 (en) * 2019-12-13 2021-06-17 华为技术有限公司 Integrity checking method and apparatus, terminal device and verification server
CN113810185A (en) * 2021-09-17 2021-12-17 华中科技大学 Anti-trapdoor leakage on-chain data restoration system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109903049A (en) * 2019-03-01 2019-06-18 长沙理工大学 A kind of block chain transaction data storage method, device, equipment and storage medium
WO2021114918A1 (en) * 2019-12-13 2021-06-17 华为技术有限公司 Integrity checking method and apparatus, terminal device and verification server
CN111641712A (en) * 2020-05-29 2020-09-08 深圳市网心科技有限公司 Block chain data updating method, device, equipment, system and readable storage medium
CN111641496A (en) * 2020-05-29 2020-09-08 深圳市网心科技有限公司 Block chain data updating method, device, equipment, system and readable storage medium
CN113810185A (en) * 2021-09-17 2021-12-17 华中科技大学 Anti-trapdoor leakage on-chain data restoration system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李佩丽;徐海霞;马添军;穆永恒;: "可更改区块链技术研究", 密码学报, no. 05, 15 October 2018 (2018-10-15) *

Similar Documents

Publication Publication Date Title
Koteska et al. Blockchain implementation quality challenges: a literature
US10069634B2 (en) Apparatuses and methods for certificate generation, certificate revocation and certificate verification
CN111543031B (en) Method and control system for controlling and/or monitoring a device
CN112311735B (en) Credible authentication method, network equipment, system and storage medium
CN109450638A (en) Electronic component data management system and method based on block chain
CN101395595B (en) Data transferring method and content transferring method
CN109359978B (en) Intelligent contract trading method and system based on block chain network
US20210203476A1 (en) Primary and secondary blockchain device
CN113742782A (en) Block chain access authority control method based on privacy protection and block chain system
CN112152778B (en) Node management method and device and electronic equipment
CN114139203B (en) Block chain-based heterogeneous identity alliance risk assessment system and method and terminal
EP3292495B1 (en) Cryptographic data
CN109815732B (en) Workshop data storage and access system, method and device based on alliance chain
CN113726913B (en) Backbone node access method and block chain system
EP3817320A1 (en) Blockchain-based system for issuing and validating certificates
Wang et al. Housing rental scheme based on redactable blockchain
Sani et al. Idenx: A blockchain-based identity management system for supply chain attacks mitigation in smart grids
CN115442106A (en) Block chain supervision method, system, equipment and storage medium
CN113691376B (en) Key management method and device
CN116389504A (en) Block chain-based identity authentication quick consensus method, system, equipment and medium
CN112887078B (en) Method and device for editing blocks in block chain
CN113225191A (en) Method and device for generating consensus node, storage medium and processor
US20200213135A1 (en) System and method for secure manufacturing of articles
CN113179165B (en) Block chain-based mobile network key management and communication method, device and medium
US20240064023A1 (en) Cryptographic proof of identity with independent verification and provable recovery

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