CN111641496A - Block chain data updating method, device, equipment, system and readable storage medium - Google Patents

Block chain data updating method, device, equipment, system and readable storage medium Download PDF

Info

Publication number
CN111641496A
CN111641496A CN202010475644.1A CN202010475644A CN111641496A CN 111641496 A CN111641496 A CN 111641496A CN 202010475644 A CN202010475644 A CN 202010475644A CN 111641496 A CN111641496 A CN 111641496A
Authority
CN
China
Prior art keywords
node
chameleon
data
target
updating
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
Application number
CN202010475644.1A
Other languages
Chinese (zh)
Other versions
CN111641496B (en
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.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN202010475644.1A priority Critical patent/CN111641496B/en
Publication of CN111641496A publication Critical patent/CN111641496A/en
Application granted granted Critical
Publication of CN111641496B publication Critical patent/CN111641496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Power Engineering (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a block chain data updating method, a device, equipment, a system and a readable storage medium, wherein the method comprises the following steps: receiving a data updating request, and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Merckel tree both store hash values obtained by calculation through a chameleon hash algorithm; determining a target path from a target leaf node to a root node in a target chameleon Merckel tree and a first chameleon node on the target path; according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object; calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number; updating the first chameleon node by using the target random number and the new data to obtain a new block; and starting a block updating process to identify the new block among the block link points. The method can realize maintainability and monitorability of the block chain data.

Description

Block chain data updating method, device, equipment, system and readable storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method, an apparatus, a system, a device, and a readable storage medium for updating block chain data.
Background
The data on the blockchain cannot be easily tampered with is one of the largest characteristics of the blockchain, and such a technical scheme has the risk of being misused while ensuring the data security.
For example, if some inappropriate (e.g., personal privacy, trade secrets, etc.) data is sent to the blockchain as the transaction is sent to the chain, or some abnormal situation arises due to a previous design mistake. 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.
To solve these problems, hard forking can be solved only by using hard forking or even discarding the whole block chain. Hard forking can change the difficulty level of the mining algorithm, and abandoning the whole block chain can cause great loss.
In summary, how to effectively solve the problems of maintaining editable maintainability of blockchain data is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a device, equipment and a system for updating block chain data and a readable storage medium, so as to achieve the purpose of modifying and maintaining the block chain data.
In order to solve the technical problem, the application provides the following technical scheme:
a blockchain data updating method is applied to a supervision node in a blockchain system, and comprises the following steps:
receiving a data updating request, and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm;
determining a target path from the target leaf node to the root node in the target chameleon Merckel tree and a first chameleon node on the target path;
according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object;
calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number;
updating the first chameleon node by using the target random number and the new data to obtain a new block;
and starting a block updating process, and identifying the new block among the block link points.
Preferably, according to the target path, sequentially updating the target leaf node to the first chameleon node by using new data of the target object, including:
judging whether the target leaf node is the first chameleon node or not;
if so, determining to update the old data to the new data; correspondingly, updating the first chameleon node by using the target random number and the new data comprises: updating the first chameleon node by using the target random number and the new data;
if not, calculating a hash value corresponding to the new data, and updating the target leaf node by using the hash value and the new data; and sequentially updating all intermediate nodes between the target leaf node and the first chameleon node.
Preferably, sequentially updating all intermediate nodes between the target leaf node and the first chameleon node, including:
for the target intermediate node, calculating a new local hash value by combining the updated child node data in the local node;
and updating local data by using the new local hash value so as to enable the father node of the target intermediate node to continue data updating.
Preferably, calculating a hash collision of the first chameleon node for the new data, and obtaining a target random number includes:
and calculating the corresponding target random number when the new data and the old data have Hash collision by combining a trapdoor private key.
Preferably, calculating the target random number corresponding to the new data and the old data when the new data and the old data have a hash collision by combining a trapdoor private key, includes:
acquiring the trapdoor private key generated based on the elliptic curve;
acquiring a target hash value of local old data;
and calculating the target random number when the new data corresponds to the target hash value by combining the trapdoor private key.
Preferably, before receiving the data update request, the method further includes:
generating a random number as a trapdoor private key based on an elliptic curve, and calculating according to the trapdoor private key to obtain a trapdoor public key;
and disclosing the trapdoor public key to other nodes in the blockchain system so that the proposed node in the blockchain system utilizes the trapdoor public key to construct the chameleon Merckel tree.
A block chain data updating device applied to a supervision node in a block chain system comprises:
the request receiving module is used for receiving a data updating request and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Mercker tree both store hash values obtained by calculating by adopting a chameleon hash algorithm;
a node information determining module, configured to determine a target path from the target leaf node to the root node in the target chameleon merkel tree, and a first chameleon node on the target path;
the data iteration updating module is used for sequentially updating the target leaf node to the first chameleon node by using the new data of the target object according to the target path;
the hash collision calculation module is used for calculating the hash collision of the first chameleon node aiming at the new data to obtain a target random number;
the data collision updating module is used for updating the first chameleon node by using the target random number and the new data to obtain a new block;
and the consensus updating module is used for starting a block updating process and making consensus on the new blocks among the block link points.
A blockchain data update apparatus, comprising:
a memory for storing a computer program;
a processor, configured to implement the steps of the above block chain data updating method when executing the computer program.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above block chain data updating method.
A blockchain system comprising a policing node and a proposal node, wherein the policing node is configured to perform the steps of the blockchain data updating method as described above;
the proposal node is used for constructing a chameleon Merck tree by using the trapdoor public key and sending a data updating request to the supervision node.
By applying the method provided by the embodiment of the application, a data updating request is received, and a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree is determined; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm; determining a target path from a target leaf node to a root node in a target chameleon Merckel tree and a first chameleon node on the target path; according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object; calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number; updating the first chameleon node by using the target random number and the new data to obtain a new block; and starting a block updating process to identify the new block among the block link points.
In the method, transaction data in a blockchain is stored according to a chameleon Merckel tree structure. The hash value of the chameleon hash is calculated by adopting chameleon hash for the right leaf node and the root node of the chameleon Merckel tree. It should be noted that Chameleon Hash (CH) is different from most Hash functions, and CH additionally contains a trapdoor key. For users who do not possess trapdoor keys, the nature of the CH is indistinguishable from the normal hash function. But finding a hash pre-image collision would be an easy computational problem for the owner of the trapdoor key. Based on the method, when the supervision node receives a data updating request, a target leaf node corresponding to the old data to be updated in the chameleon Merckel tree can be determined. Then, a target path from the target leaf node to the root node and a first chameleon node on the target path are found. And then, according to the sequence of the target path, sequentially updating the target leaf node to the first chameleon node by using the new data. And for updating the first chameleon node, calculating the Hash collision of the first chameleon node to the new data, and obtaining the target random number. Finally, the first chameleon node is updated by using the target random number and the new data, and the hash value of the first chameleon node is the same as the original hash value, so that other nodes which do not update data are not influenced; and starting a block updating process to identify the new block among the block link points. Therefore, the data can be updated, and the maintainability and the monitorability of the block chain data are realized. Namely, when the disclosure is not suitable or program errors occur, the method can be adopted to solve the problems and reduce various losses.
Accordingly, embodiments of the present application further provide a device, an apparatus, and a readable storage medium for updating blockchain data corresponding to the method for updating blockchain data, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a block chain data updating method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a chameleon Merckel tree in an embodiment of the present application;
FIG. 3 is a block chain data update apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a block chain data updating apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a block chain data updating apparatus according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to facilitate understanding of technical solutions provided by the embodiments of the present application, technical terms and related technologies are briefly described below.
One, hash function
The Hash Function (herein, abbreviated as H) is a cryptographic one-way Function, and is an algorithm that takes data information of any length as input and maps the data information into data of a certain fixed length as output. The hash function has the characteristics of unidirectionality, weak collision resistance and strong collision resistance, and specifically comprises the following steps:
1. unidirectional: given y ═ h (x), it is difficult to search for x. Unidirectional means that the output result Y can be easily calculated by a hash algorithm through one input X, but if only Y is possessed, the original input X is difficult to be reversely deduced in a limited time.
2. Weak impact resistance: given y ≠ H (x), it is difficult to search for x '≠ x and y ═ H (x'). The weak collision resistance of the hash algorithm means that it is difficult to find a data x 'not equal to x in a limited time, assuming that x is the result y obtained by the algorithm h (x), so that the output result of x' and the result of x are equal to y as well.
3. Strong impact resistance: it is difficult to search for a pair (x, x ') such that x ≠ x ' and H (x) ═ H (x '). The method means that a pair of unequal data x and x' cannot be effectively found by any means, so that the hash algorithm meets the requirement that the hash output result of the two data is equal to the same value y, and the hash algorithm meets the strong collision resistance. The main difference between strong and weak impact resistance lies in the difference in safety assumptions. Weak collision resistance requires finding a collision related to a certain input, while strong collision resistance means that the safety property is broken if any pair of hashes with different inputs and the same output exist.
Second, the principle that the block chain data is not easily tampered
The transaction is sent to the consensus nodes in a transaction form, the consensus nodes of the proposed block chain pack all received transactions into blocks and send the blocks to other consensus nodes, and after the blocks are agreed by a consensus algorithm, the blocks are stored in a database in a persistent mode. Since the block header contains the Root of the Merkle Tree constructed by all transactions, i.e., the Merkle Root, modifying any transaction in the block affects the value of the Merkle Root in the block header, and further affects the hash value of the entire block header. Since the block header of each block also contains the hash value of the last block to which it is linked, any change in the data of the old block will cause a change in all subsequent blocks that have a direct or indirect linking relationship with it. Thus, for an attacker who intends to tamper with a blockchain, modifying the old block means modifying all blocks following this block, which is a task that is almost impossible for the attacker to accomplish. The blockchain thus also ensures that the data is not tampered with.
Color-changing Longhao
Chameleon Hash (CH). Chameleon hashing is a special hash function and is constructed based on an ElGamal algorithm. Unlike most hash functions, the CH additionally contains a trapdoor key. For users who do not possess trapdoor keys, the nature of the CH makes little difference from the generic hash function described above. But finding a hash pre-image collision would be an easy computational problem for the owner of the trapdoor key.
The form of chameleon hash is as follows:
y=CH(x,r)
wherein CH is chameleon hash function, x is the input of hash, r is another part of the input of a random number, and y is the output of chameleon hash, i.e., hash value.
For any existing chameleon hash mapping relation y ═ CH (x, r) and any message x ', the owner of the trapdoor key can easily find r', so that y ═ CH (x, r),r) I.e. weak and strong collision resistance properties that break the hash mentioned above.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart illustrating a method for updating blockchain data in a blockchain system, the method being applicable to a supervisory node in the blockchain system, the method including the steps of:
s101, receiving a data updating request, and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree.
The right node and the root node of the chameleon Merck tree both store hash values obtained by calculation through a chameleon hash algorithm, or the left node and the root node of the chameleon Merck tree both store hash values obtained by calculation through the chameleon hash algorithm. For example, the hash value calculated by using the chameleon hash algorithm is stored in the right node and the root node, and a scheme for storing a large hash value calculated by using the chameleon hash algorithm in the left node and the root node may be referred to herein, and is not described in detail herein.
The target object may be a file to be updated or other data resource. The Chameleon Authentication Tree (CAT) is an improved Chameleon Authentication Tree (CAT), and the data structure is used for replacing a Merkle Tree in an original block chain structure, namely, the improved Chameleon tacle Tree is a binary Tree formed by combining an anti-collision hash (H) and a collision-Capable Hash (CH). For convenience of description, the new data structure, Chameleon Merkle Tree (CMT), is referred to in this embodiment.
Specifically, the data structure of the chameleon merkel tree can be seen in fig. 2, where the rectangles represent ROOT nodes (ROOTs) or middle nodes, and the circles represent leaf nodes; the non-shadow nodes adopt general non-collision Hash, namely common Hash; adopting chameleon hash when the shaded nodes calculate the hash value; leaf nodes may be numbered sequentially from 0 to N, with the other nodes (except the root node) being numbered two-dimensionally (V-a-b), where the first digit a represents the tree height and the second digit b represents the sequence number in the current height.
The monitoring node may specifically be a monitoring node in a private chain or a federation chain scene, and the monitoring node may hold a trapdoor key of chameleon hash.
Before the block chain data updating method provided by the embodiment of the present application is implemented, that is, before a data updating request is received, transaction data in the block chain may be stored according to the chameleon merkel tree. The specific implementation process comprises the following steps:
generating a random number based on an elliptic curve as a trapdoor private key, and calculating according to the trapdoor private key to obtain a trapdoor public key;
and step two, disclosing the trapdoor public key to other nodes in the blockchain system, so that the proposed node in the blockchain system utilizes the trapdoor public key to construct the chameleon Merckel tree.
Specifically, the trapdoor private key and the public key are generated in advance by the supervisory node, and then the public key is published, so that when the proposed node needs to update the block, the trapdoor public key is used for constructing the chameleon merkel tree, and only the constructed chameleon merkel tree can calculate the collision random number by using the trapdoor private key.
Wherein the proposed node can calculate the height of the chameleon merkel tree and construct the chameleon merkel tree using the total amount of data to be stored. That is, the block proposer needs to construct the CMT in the process of constructing the block. First, the proposer determines the total number of transactions to be packed, N, i.e., the total amount of data to be stored. And calculating the height h of the CMT tree structure, wherein h is logN, and constructing. The proposer then inserts the transactions into the CMT tree in sequence. Wherein, the proposer can be a supervisory node and can also be other nodes. In the CMT, according to the structure shown in fig. 2, the left nodes all adopt the non-collision hash function H, and the root nodes and the right nodes (such as nodes L1, L3, L5, and L7 shown in fig. 2) all adopt the chameleon hash function CH. For convenience of description, a node using a chameleon hash function is referred to as a chameleon node, a node using a non-collision hash function is referred to as a common node, and the common node is hashed by using H; and for the chameleon node, performing hash by adopting CH.
The hash of the following record for each transaction (i.e., data stored in the blockchain) is: the current transaction hashes, which correspond to the verification Path on the CMT (similar to the Merkle Path in the original Merkle Tree). It should be noted that, if the node is a chameleon node, the node also includes a random number input r used for CH calculation.
The root node calculated by the entire CMT will be recorded in the block header.
For example, the leaf node L2 shown in FIG. 2 corresponds to a transaction that requires the storage of hash values H (L2), CH (L3), H (V-1-0), CH (V-2-1), CH (ROOT), and the random number r used to calculate CH (V-1-1).
After writing the data to be stored to the block in the manner described above, consensus can be made among the various nodes in the blockchain to propagate the currency.
In this way, after the supervisory node receives the data update request, the data update request may be parsed to determine the old data to be updated for the new data to be updated, and determine the position of the old data in the CMT, that is, specifically under which leaf node, the leaf node to which the old data to be updated belongs is determined as the target leaf node.
S102, determining a target path from a target leaf node to a root node in a target chameleon Merckel tree and a first chameleon node on the target path.
And finding out the father node of the target leaf node and then finding out the father node of the father node, and circularly finding out the father node of each father node until the final father node is the root node.
In this embodiment, the common node and the chameleon node may be marked so as to quickly determine whether the node is a chameleon node. Thus, after the target path is determined, the first chameleon node in the target path can be determined. Since the root node is a chameleon node, at least one node on the path from each leaf node to the root node is a chameleon node. Specifically, the node distribution of the chameleon Merck tree has the probability that the target leaf node at any position is the first chameleon node
Figure BDA0002515792170000091
The probability that the father node is the first chameleon node is
Figure BDA0002515792170000092
The probability that the middle node of the next upper layer is the first chameleon node is
Figure BDA0002515792170000093
In this kind ofAnd the later the first chameleon node appears, the lower the probability.
Taking fig. 2 as an example, if the target leaf node is L0, the target path from L0 to ROOT is L0-V-1-0-V-2-0-ROOT, and the first chameleon node on the target path is ROOT; if the target leaf node is L1, the target path from L1 to ROOT is L1-V-1-0-V-2-0-ROOT, and the first chameleon node on the target path is L1; if the target leaf node is L2, the target path from L2 to ROOT is L2-V-1-V-2-0-ROOT, and the first chameleon node on the target path is V-1-1.
S103, according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object.
Specifically, because the chameleon node adopts chameleon hash algorithm, based on the uniqueness of the chameleon hash algorithm, collision hash can be quickly found with the aid of the trapdoor key. Therefore, the data can be updated to the chameleon node without influencing other nodes. The specific implementation process comprises the following steps:
step one, judging whether a target leaf node is a first chameleon node or not;
step two, if yes, determining to update the old data into the new data;
if not, calculating a hash value corresponding to the new data, and updating the target leaf node by using the hash value and the new data; and sequentially updating all intermediate nodes between the target leaf node and the first chameleon node.
For convenience of description, the above three steps will be described in combination.
Specifically, whether the target leaf node is a chameleon node can be determined by judging whether the target leaf node has a chameleon node mark. Or judging whether the random number r is stored at the same time when the hash value stored by the target leaf node is judged, and if the random number r is stored, indicating that the target leaf node is the chameleon node.
When the target leaf node is determined to be a non-chameleon node, the hash value of the new data can be directly calculated, and the target leaf node is updated by the new data and the hash value corresponding to the new data. That is, if the old data x stored in the target leaf node and the hash value H (x) corresponding to the old data x are replaced with the new data x ' and the new hash value H (x ') corresponding to the new data x ', the parent node of the target leaf node updates the node data based on the new data and the new hash. The data updating process for the intermediate node between the target leaf node and the first chameleon node in the target path may include the following steps:
step 1, for a target intermediate node, calculating a new local hash value by combining updated child node data in a local node;
and 2, updating the local data by using the new local hash value so as to enable the father node of the target intermediate node to continue data updating.
That is, each intermediate node updates data based on the hash values of the two child nodes to which it belongs. Particularly, for an intermediate node which needs to be updated and is not a chameleon node, attention needs to be paid to the updated child node and the non-updated child node, a new hash value is calculated again according to a common hash algorithm, and data updating is completed. Therefore, after each intermediate node is sequentially updated according to the sequence of the target path, the changed data can be transmitted to the first chameleon node. And finally, the chameleon node finishes the data updating by calculating collision hash.
Upon determining that the target leaf node is a chameleon node, new data for updating the target leaf node may be used. So that the first chameleon node, i.e., the target leaf node itself, computes the hash collision with the new data. Taking fig. 2 as an example, if the first chameleon node is L1, the hash value of guarantee L1 only needs to be unchanged.
And S104, calculating the Hash collision of the first chameleon node aiming at the new data, and obtaining a target random number.
Specifically, the first chameleon node may be a target leaf node, an intermediate node between the target leaf node and a root node, or the root node. And performing hash collision on the new data in the data updating process, and finally obtaining a target random number meeting the hash collision generated between the new data and the originally stored old data. Finally, the Hash value of the first chameleon node is guaranteed to be unchanged, and nodes on the upper layer of the chameleon node are not affected.
When the first chameleon node is a target leaf node, the new data is the new data for replacing the old data in the target leaf node; when the first chameleon node is not a target leaf node, the new data is the new data which is to replace the old data of the local node after being updated in sequence.
When the first chameleon node is not a target leaf node, it may be specifically an intermediate node or a root node. The chameleon node calculates hash collision for new data corresponding to child node data (including a child node which has performed data updating) of the chameleon node, and finds out a target random number which keeps the final hash value consistent before and after updating.
The chameleon hash algorithm adopted by the first chameleon node calculates the hash, so that the calculation process of the target random number can specifically be combined with the trapdoor private key to calculate the corresponding target random number when the new data and the old data have hash collision.
Preferably, for ease of calculation, chameleon hashing based on elliptic curve implementation may be employed. Accordingly, the determination process of the target random number may include the steps of:
the method comprises the following steps of firstly, obtaining a trapdoor private key generated based on an elliptic curve;
step two, acquiring a target hash value of local old data;
and step three, calculating a target random number when the new data corresponds to the target hash value by combining the trapdoor private key.
For convenience of description, the above three steps will be described in combination.
Wherein the target hash value is read from the verification hash stored by the target leaf node.
Trapdoor key generation KeyGen (1)λ): for the case of the safety parameter λ, assuming that G is the base point of the elliptic curve, a number cs is randomly generated within the range of the order of the elliptic curvek is used as a trap door private key, and CPK is calculated as csk G and is published as a public key.
Hash calculation CH (x, r): inputting data x with any length and a random number r in an elliptic curve order range, firstly carrying out standardization operation on x by using a non-collision hash function H, outputting H (x), and then calculating CH (x, r) ═ H (x) · G + r · CPK on an elliptic curve domain
Collision calculation COL (x, r, x', csk): given the original input message x and the random number r, the new message x ', and the trapdoor key csk, CH (x, r) ═ H (x) · G + r · CPK ═ H (x ') · G + r ' CPK. Since CPK is csk · G, it is possible to obtain:
H(x)·G+r·csk·G=H(x′)·G+r′·csk·G
(H(x)+r·csk)·G=(H(x′)+r′·csk)·G
H(x)+r·csk=H(x′)+r′·csk
r′=csk-1·(H(x)-H(x′))
the calculated r 'is such that CH (x, r) ═ CH (x', r ') can be satisfied, i.e. a collision (x', r ') of CH with respect to (x, r) is found, where r' is the target random number. Particularly, a real discrete logarithm domain adopted in the original KR00 algorithm is replaced by combining an elliptic curve discrete logarithm problem, the key length and the hash length are both shortened to be less than 1/10 of the original scheme under the condition of the same security level, the storage space is saved, and the operation efficiency is improved.
And S105, updating the first chameleon node by using the target random number and the new data to obtain a new block.
Specifically, the first chameleon node is updated by using the target random number and the new data, after the chameleon node is updated, the newly calculated random number r' in the chameleon node needs to be updated in the transaction, and then a new block is obtained based on the updated transaction.
With reference to the above steps S101 to S105, it can be seen that when the supervisor or other node needs to update data, it needs to determine the location of the old data of the target object in the CMT, then find the first CH node (chameleon node) on the path from the leaf node to the root node, and sequentially calculate and update all nodes from the new leaf node to the CH node. For the corresponding nodes needing to be updated (namely, the leaf nodes needing to update data, the first chameleon node on the path from the leaf nodes needing to update data to the root node and all the intermediate nodes between the leaf nodes and the first chameleon node), if the nodes adopt the H function to calculate the hash, directly using new data as the input of the H function, and calculating a new hash result for updating; if the node calculates the hash by using the CH function, the corresponding collision needs to be calculated. Because the supervisor has the trapdoor key of the CH, the collision of the corresponding CH to the input can be easily calculated, that is, y is CH (x, r) is CH (x ', r'), that is, x is the original hash original image, x 'is the new hash original image, r is the target random number obtained by calculating the local old data through the CH trapdoor algorithm, and r' is the target random number obtained by calculating the new data through the CH trapdoor algorithm.
And finally, after calculating the complete target path and relating to the updated node data, updating the corresponding calculation result according to the data related to the transaction hash in the added new node. Then, step S106 is executed to recognize the new block, i.e. the update and replacement of the data content are completed.
For example, if it is found that there is a problem in the transaction data corresponding to the node located at L2 in fig. 2 in the history block at a certain height, and replacement is needed, the transaction data content at L2 is updated first, then H (x ') hash calculation is performed on the new data content x ' to obtain the result H (L2) ', and then for the node V-1-1 at a higher level, the hash is performed by using the CH function, i.e., a collision operation is performed on this node. Since the hash input is changed from H (L2) | CH (L3, r3) to H (L2) ' | CH (L3, r3), it is necessary to calculate the random number r-1-1 ' corresponding to V-1-1 by using the trapdoor private key and then update r-1-1 ' to the transaction (see step S106). Since the V-1-1 node finds the hash collision, the hash result keeps consistent with the original hash result, and therefore other nodes do not need to be changed.
In general, for a CMT of height H, the number of hashes that need to be computed to update a piece of transaction data is expected to be
Figure BDA0002515792170000131
Therefore, when the block transaction data is not close to or fixed to the power of 2, the modification variation range is large, the modification efficiency is low, the application effect is better, and the huge calculation amount brought by the storage transaction can be reduced.
S106, starting a block updating process, and identifying the new block among the block link points.
In order to facilitate the circulation and propagation of new data in the block chain network, after the first chameleon node is updated by using the target random number and the new data, a block updating process can be started, and the new block is identified between block chain nodes. Namely, the supervisory node initiates a block update process to make a new block be commonly known among other nodes. It is also necessary for the consensus algorithm to add a white list to the supervising node, prioritize the proposal from the supervising node to update the history blocks, and update the local history blocks after consensus is completed. Thus, this scheme is more applicable to either a federation chain or private chain scenario. Therefore, error data or data which is not suitable for disclosure in the block chain network can be modified and adjusted, and the requirement on data maintainability in the block chain network is met.
By applying the method provided by the embodiment of the application, a data updating request is received, and a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree is determined; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm; determining a target path from a target leaf node to a root node in a target chameleon Merckel tree and a first chameleon node on the target path; according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object; calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number; updating the first chameleon node by using the target random number and the updating data to obtain a new block; and starting a block updating process to identify the new block among the block link points.
In the method, transaction data in a blockchain is stored according to a chameleon Merckel tree structure. The hash value of the chameleon hash is calculated by adopting chameleon hash for the right leaf node and the root node of the chameleon Merckel tree. It should be noted that Chameleon Hash (CH) is different from most Hash functions, and CH additionally contains a trapdoor key. For users who do not possess trapdoor keys, the nature of the CH is indistinguishable from the normal hash function. But finding a hash pre-image collision would be an easy computational problem for the owner of the trapdoor key. Based on the method, when the supervision node receives a data updating request, a target leaf node corresponding to the old data to be updated in the chameleon Merckel tree can be determined. Then, a target path from the target leaf node to the root node and a first chameleon node on the target path are found. And then, according to the sequence of the target path, sequentially updating the target leaf node to the first chameleon node by using the new data. And for updating the first chameleon node, calculating the Hash collision of the first chameleon node to the new data, and obtaining the target random number. Finally, the first chameleon node is updated by using the target random number and the new data, and the hash value of the first chameleon node is the same as the original hash value, so that other nodes which do not update data are not influenced; and starting a block updating process to identify the new block among the block link points. Therefore, the data can be updated, and the maintainability and the monitorability of the block chain data are realized. Namely, when the disclosure is not suitable or program errors occur, the method can be adopted to solve the problems and reduce various losses.
It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improvements. In the preferred/improved embodiment, the same steps as those in the above embodiment or corresponding steps may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the preferred/improved embodiment herein.
With the method described in the first embodiment, for other unsupervised nodes, even if the supervising node can modify the block history data arbitrarily, the supervising process is left with trace, because the data of the block chain is already propagated and circulated in the network, and the history data may exist in a certain node and is not updated or backup is left. Thus, when the supervising node abuses the authority to modify the blockchain history data, other nodes may prove that the supervising node modified the history data by taking out the pre-change metadata and its corresponding blocks as evidence. Since only the supervisor owns the trapdoor key, it is almost impossible for other unsupervised nodes to find the hash collision satisfying the algorithm condition, so that the supervising node cannot repudiate its own operation of modifying the history data, and thus the reverse supervising node does not abuse the right to modify the history data of the block chain.
Preferably, on the basis of the first embodiment, the modification can also be demonstrated. The specific implementation process comprises the following steps:
step one, receiving a modification demonstration request, and determining reference data and suspect data;
step two, if hash collision is generated between the reference data and the suspect data, the suspect data is determined to be modified;
and step three, if the reference data and the suspect data do not generate Hash collision, determining that the suspect data is not modified.
For convenience of description, the above four steps will be described in combination.
The modification demonstration request may be initiated by other nodes, specifically unsupervised nodes, which may carry the reference data and indicate suspect data. The reference data may be block data that is backed up in advance, or may be interval data that is not updated in the block. Suspect data is data for which a modification is suspected.
Without the trapdoor key, it is almost impossible to compute a hash collision. Thus, once two different data appear, but the chameleon hash calculations of the two data are consistent, it can be determined that the suspect data was modified. Of course, it may also be directly determined whether the reference data and the suspect data are completely consistent, if so, it may be indicated that the suspect data is not modified, otherwise, it is determined that the suspect data is modified. Thus, the modification of the data can be supervised and demonstrated. That is, the operation of the supervisor to modify the block can be discovered by the non-supervisor, so that the operation of the supervisor to modify the block can be reversely supervised from the perspective of the non-supervisor, and the supervisor can not abuse the right.
Example two:
corresponding to the above method embodiments, the present application further provides a blockchain data updating apparatus applicable to a supervisory node in a blockchain system, and the blockchain data updating apparatus described below and the blockchain data updating method described above may be referred to correspondingly.
Referring to fig. 3, the apparatus includes the following modules:
a request receiving module 101, configured to receive a data update request, and determine a target leaf node corresponding to old data of a target object in a chameleon merkel tree; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm;
a node information determining module 102, configured to determine a target path from a target leaf node to a root node in a target chameleon merkel tree, and a first chameleon node on the target path;
the data iteration updating module 103 is configured to sequentially update the target leaf node to the first chameleon node by using new data of the target object according to the target path;
the hash collision calculation module 104 is configured to calculate a hash collision of the first chameleon node for the new data, and obtain a target random number;
a data collision update module 105, configured to update the first chameleon node with the target random number and the new data to obtain a new block;
the consensus update module 106 is used to initiate a block update process to identify new blocks among the block link points.
The device provided by the embodiment of the application is applied to receive a data updating request and determine a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm; determining a target path from a target leaf node to a root node in a target chameleon Merckel tree and a first chameleon node on the target path; according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object; calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number; updating the first chameleon node by using the target random number and the new data to obtain a new block; and starting a block updating process to identify the new block among the block link points.
In the device, transaction data in a block chain is stored according to a chameleon Merckel tree structure. The hash value of the chameleon hash is calculated by adopting chameleon hash for the right leaf node and the root node of the chameleon Merckel tree. It should be noted that Chameleon Hash (CH) is different from most Hash functions, and CH additionally contains a trapdoor key. For users who do not possess trapdoor keys, the nature of the CH is indistinguishable from the normal hash function. But finding a hash pre-image collision would be an easy computational problem for the owner of the trapdoor key. Based on the method, when the supervision node receives a data updating request, a target leaf node corresponding to the old data to be updated in the chameleon Merckel tree can be determined. Then, a target path from the target leaf node to the root node and a first chameleon node on the target path are found. And then, according to the sequence of the target path, sequentially updating the target leaf node to the first chameleon node by using the new data. And for updating the first chameleon node, calculating the Hash collision of the first chameleon node to the new data, and obtaining the target random number. Finally, the first chameleon node is updated by using the target random number and the new data, and the hash value of the first chameleon node is the same as the original hash value, so that other nodes which do not update data are not influenced; and starting a block updating process to identify the new block among the block link points. Therefore, the data can be updated, and the maintainability and the monitorability of the block chain data are realized. Namely, when the disclosure is not suitable or program errors occur, the device can be adopted to solve the problems and reduce various losses.
In a specific embodiment of the present application, the data iteration updating module 103 is specifically configured to determine whether a target leaf node is a first chameleon node; if so, determining to update the old data into the new data; correspondingly, the data collision updating module 105 is specifically configured to update the first chameleon node with the target random number and the new data;
if not, calculating a hash value corresponding to the new data, and updating the target leaf node by using the hash value and the new data; and sequentially updating all intermediate nodes between the target leaf node and the first chameleon node.
In a specific embodiment of the present application, the data iteration updating module 103 is specifically configured to calculate, for a target intermediate node, a new local hash value by combining updated child node data in a local node; and updating the local data by using the new local hash value so that the parent node of the target intermediate node continues to update the data.
In a specific embodiment of the present application, the hash collision calculation module 104 is specifically configured to calculate, by combining with a trapdoor private key, a target random number corresponding to the new data and the old data when a hash collision occurs.
In a specific embodiment of the present application, the hash collision calculation module 104 is specifically configured to obtain a trapdoor private key generated based on an elliptic curve; acquiring a target hash value of local old data; and calculating a target random number when the new data also corresponds to the target hash value by combining the trapdoor private key.
In one embodiment of the present application, the method further includes:
the trapdoor key public module is used for generating a random number based on an elliptic curve as a trapdoor private key and calculating according to the trapdoor private key to obtain a trapdoor public key; and disclosing the trapdoor public key to other nodes in the blockchain system, so that the proposed nodes in the blockchain system construct the chameleon Merckel tree by using the trapdoor public key.
Example three:
corresponding to the above method embodiments, the present application further provides a block chain data updating device, and a block chain data updating device described below and a block chain data updating method described above may be referred to correspondingly.
Referring to fig. 4, the block chain data updating apparatus includes:
a memory D1 for storing computer programs;
the processor D2 is configured to implement the steps of the block chain data updating method of the above-mentioned method embodiment when executing the computer program.
In this embodiment, the blockchain data updating device may be a PC (Personal Computer), or may also be a terminal device of a smart phone, a tablet Computer, a palmtop Computer, a portable Computer, or a network storage device.
The blockchain data update apparatus may be a node constituting a blockchain network.
Referring to fig. 5, fig. 5 is a schematic diagram of another block chain data updating apparatus disclosed in the embodiment of the present application. The blockchain data update device may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the blockchain data updating device, for example a hard disk of the blockchain data updating device. The memory 11 may also be an external storage device of the blockchain data update device in other embodiments, such as a plug-in hard disk provided on the blockchain data update device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit of the block chain data updating apparatus and an external storage apparatus. The memory 11 may be used not only to store application software installed in the blockchain data update apparatus and various types of data, such as codes of the blockchain data update program, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing a block chain data updating program.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Further, the blockchain data updating device may further include a network interface, which may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), and is generally used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the device and for displaying a visualized user interface.
While fig. 5 shows only a blockchain data update device with components 11-13, those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the device and may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
Example four:
corresponding to the above method embodiments, the present application further provides a readable storage medium, and a readable storage medium described below and a block chain data updating method described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the block chain data updating method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Example five:
corresponding to the above method embodiments, the present application further provides a blockchain system, and a blockchain system described below and a blockchain data updating method described above may be referred to correspondingly.
The blockchain system comprises a supervisory node and a proposal node, wherein the supervisory node is used for executing the steps of the blockchain data updating method described in the first embodiment;
and the proposal node is used for constructing the chameleon Merckel tree by using the trapdoor public key and sending a data updating request to the supervision node.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

Claims (10)

1. A method for updating blockchain data, which is applied to a supervisory node in a blockchain system, the method comprising:
receiving a data updating request, and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm;
determining a target path from the target leaf node to the root node in the target chameleon Merckel tree and a first chameleon node on the target path;
according to the target path, sequentially updating the target leaf node to the first chameleon node by using the new data of the target object;
calculating the Hash collision of the first chameleon node aiming at the new data to obtain a target random number;
updating the first chameleon node by using the target random number and the new data to obtain a new block;
and starting a block updating process, and identifying the new block among the block link points.
2. The method according to claim 1, wherein sequentially updating the target leaf node to the first chameleon node according to the target path by using new data of the target object comprises:
judging whether the target leaf node is the first chameleon node or not;
if so, determining to update the old data to the new data; correspondingly, updating the first chameleon node by using the target random number and the new data comprises: updating the first chameleon node by using the target random number and the new data;
if not, calculating a hash value corresponding to the new data, and updating the target leaf node by using the hash value and the new data; and sequentially updating all intermediate nodes between the target leaf node and the first chameleon node.
3. The method of updating blockchain data according to claim 2, wherein sequentially updating all intermediate nodes between the target leaf node and the first chameleon node comprises:
for the target intermediate node, calculating a new local hash value by combining the updated child node data in the local node;
and updating local data by using the new local hash value so as to enable the father node of the target intermediate node to continue data updating.
4. The method for updating blockchain data according to claim 1, wherein calculating a hash collision of the first chameleon node for the new data to obtain a target random number comprises:
and calculating the corresponding target random number when the new data and the old data have Hash collision by combining a trapdoor private key.
5. The blockchain data updating method according to claim 4, wherein calculating the target random number corresponding to the new data and the old data when the new data and the old data have a hash collision by combining a trapdoor private key comprises:
acquiring the trapdoor private key generated based on the elliptic curve;
acquiring a target hash value of local old data;
and calculating the target random number when the new data corresponds to the target hash value by combining the trapdoor private key.
6. The blockchain data update method of claim 1, further comprising, before receiving the data update request:
generating a random number as a trapdoor private key based on an elliptic curve, and calculating according to the trapdoor private key to obtain a trapdoor public key;
and disclosing the trapdoor public key to other nodes in the blockchain system so that the proposed node in the blockchain system utilizes the trapdoor public key to construct the chameleon Merckel tree.
7. A block chain data updating device is applied to a supervisory node in a block chain system, and comprises:
the request receiving module is used for receiving a data updating request and determining a target leaf node corresponding to the old data of the target object in the chameleon Merckel tree; the right node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of a chameleon Hash algorithm, or the left node and the root node of the chameleon Merck tree both store Hash values obtained by calculation of the chameleon Hash algorithm;
a node information determining module, configured to determine a target path from the target leaf node to the root node in the target chameleon merkel tree, and a first chameleon node on the target path;
the data iteration updating module is used for sequentially updating the target leaf node to the first chameleon node by using the new data of the target object according to the target path;
the hash collision calculation module is used for calculating the hash collision of the first chameleon node aiming at the new data to obtain a target random number;
the data collision updating module is used for updating the first chameleon node by using the target random number and the new data to obtain a new block;
and the consensus updating module is used for starting a block updating process and making consensus on the new blocks among the block link points.
8. A block chain data update apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the blockchain data update method according to any one of claims 1 to 6 when executing the computer program.
9. A readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the blockchain data updating method according to any one of claims 1 to 6.
10. A blockchain system comprising a policing node and a proposing node, wherein the policing node is configured to perform the steps of the blockchain data updating method according to any one of claims 1 to 6;
the proposal node is used for constructing a chameleon Merck tree by using the trapdoor public key and sending a data updating request to the supervision node.
CN202010475644.1A 2020-05-29 2020-05-29 Block chain data updating method, device, equipment, system and readable storage medium Active CN111641496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010475644.1A CN111641496B (en) 2020-05-29 2020-05-29 Block chain data updating method, device, equipment, system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010475644.1A CN111641496B (en) 2020-05-29 2020-05-29 Block chain data updating method, device, equipment, system and readable storage medium

Publications (2)

Publication Number Publication Date
CN111641496A true CN111641496A (en) 2020-09-08
CN111641496B CN111641496B (en) 2023-11-17

Family

ID=72331611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010475644.1A Active CN111641496B (en) 2020-05-29 2020-05-29 Block chain data updating method, device, equipment, system and readable storage medium

Country Status (1)

Country Link
CN (1) CN111641496B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380584A (en) * 2021-01-13 2021-02-19 北京笔新互联网科技有限公司 Block chain data updating method and device, electronic equipment and storage medium
CN113704272A (en) * 2021-10-25 2021-11-26 北京大学 Digital object state expression method and device under man-machine-object fusion environment
CN115442106A (en) * 2022-08-31 2022-12-06 长沙理工大学 Block chain supervision method, system, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274481A (en) * 2018-08-01 2019-01-25 中国科学院数据与通信保护研究教育中心 A kind of traceable method of data of block chain

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274481A (en) * 2018-08-01 2019-01-25 中国科学院数据与通信保护研究教育中心 A kind of traceable method of data of block chain

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
李洪星: "支持PDP协议的混合云存储系统的研究", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 01, pages 1 - 50 *
王红伟等: "基于动态变色龙认证树的一次签名方案", 《密码学报》 *
王红伟等: "基于动态变色龙认证树的一次签名方案", 《密码学报》, no. 06, 15 December 2016 (2016-12-15) *
袁勇等: "可编辑区块链:模型、技术与方法", 自动化学报, no. 05, pages 1 - 16 *
黄雪刚等: "面向流式数据认证的变色龙认证树算法研究", 《四川大学学报(工程科学版)》 *
黄雪刚等: "面向流式数据认证的变色龙认证树算法研究", 《四川大学学报(工程科学版)》, no. 04, 20 March 2016 (2016-03-20), pages 140 - 143 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380584A (en) * 2021-01-13 2021-02-19 北京笔新互联网科技有限公司 Block chain data updating method and device, electronic equipment and storage medium
CN112380584B (en) * 2021-01-13 2021-04-16 北京笔新互联网科技有限公司 Block chain data updating method and device, electronic equipment and storage medium
CN113704272A (en) * 2021-10-25 2021-11-26 北京大学 Digital object state expression method and device under man-machine-object fusion environment
CN113704272B (en) * 2021-10-25 2022-01-18 北京大学 Digital object state expression method and device under man-machine-object fusion environment
CN115442106A (en) * 2022-08-31 2022-12-06 长沙理工大学 Block chain supervision method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN111641496B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN111641712B (en) Block chain data updating method, device, equipment, system and readable storage medium
KR102627000B1 (en) Script-based blockchain interaction
EP3693886B1 (en) Optimizations for verification of interactions system and method
US11424935B2 (en) Tampering detection system and method for detecting tampering
CN111641496A (en) Block chain data updating method, device, equipment, system and readable storage medium
JP2020504927A (en) Method and apparatus for a distributed database enabling deletion of events
CN110321735B (en) Business handling method, system and storage medium based on zero knowledge certification
EP3308280A2 (en) Making cryptographic claims about stored data using an anchoring system
Zheng et al. Efficient query integrity for outsourced dynamic databases
CN108494557B (en) Social security digital certificate management method, computer readable storage medium and terminal device
CN109525403B (en) Anti-leakage public cloud auditing method supporting full-dynamic parallel operation of user
US20110246779A1 (en) Zero-knowledge proof system, zero-knowledge proof device, zero-knowledge verification device, zero-knowledge proof method and program therefor
EP3258458A1 (en) Share recovery system, share recovery device, share recovery method, and program
CN107707354A (en) A kind of cloud storage data verification method and system based on elliptic curve cryptography
CN111984725A (en) Validation of measurement data sets in a distributed database
CN112613601A (en) Neural network model updating method, device and computer storage medium
CN106611136A (en) Data tampering verification method in cloud storage
Liu et al. Towards fully verifiable forward secure privacy preserving keyword search for IoT outsourced data
CN112868202B (en) Continuous inextensible code with space limitation in strong space evidence
CN114402352A (en) Method and apparatus for tracking and measuring a proof of work contribution in a mine
CN111339209B (en) Information management method and information management system based on block chain
CN117574408B (en) Production data management method and device based on block chain and electronic equipment
CN112968904B (en) Block chain data protection method and system
EP4068686A1 (en) Signing system for validating stateful hash-based digital signatures
CN115118429A (en) Verifiable and fully editable block chain system, method, equipment and terminal

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210914

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240620

Address after: 518000, 2101 to 2107, Xunlei Building, No. 3709 Baishi Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Xunlei Networking Technologies, Ltd.

Country or region after: China

Address before: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: Xunlei Networking Technologies, Ltd.

Country or region before: China

Patentee before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.