Maintainable and verifiable data flow method and system based on editable block chain
By introducing editable blockchain technology and chameleon certification tree in the VDS system, the calculation and management complexity brought about by the dependence of the existing VDS protocol on PKI and the frequent data updates are solved, and more efficient, flexible and secure data management is achieved.
Patent Information
- Application Number
- CN202510236847.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-27
AI Technical Summary
The existing VDS protocol relies on public key infrastructure (PKI), resulting in computational and management complexity, and the computational burden and signature management complexity brought about by frequent data updates are difficult to solve.
Using editable blockchain-based technology, the root node value of the chameleon certification tree (CAT) is recorded in the blockchain, and data integrity is ensured through the immutability of the blockchain, allowing the blockchain to be edited to quickly adjust the records and reduce unnecessary computing overhead.
Reduces dependence on PKI, simplifies signature management, improves the flexibility and security of data management, and is suitable for application scenarios where data is frequently updated, reducing the computing and management burden.
Smart Images

Figure CN120223280A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to, but is not limited to, the technical field of cloud servers, and particularly relates to a method and system for maintainable and verifiable data streams based on an editable blockchain. Background Art
[0002] With the rapid development of network and information technology, data has shown an explosive growth. Due to the limited computing and storage capabilities of some clients themselves, they are unable to process data, so the data needs to be sent to the cloud server for management. The cloud server has powerful storage and computing capabilities, which can better meet the needs of users. However, the cloud server is not completely trustworthy. A malicious cloud server may tamper with or lose users' data, causing serious losses to users. Therefore, it is of great significance to ensure the confidentiality and integrity of outsourced data. In recent years, many scholars have been researching the issues of confidentiality and integrity of outsourced data (Ateniese G, Burns R, Curtmola R, et al. Provable data possession at untrusted stores [C] / / ACM Conference on Computer & Communications Security. ACM, 2007. DOI: 10.1145 / 1315245.1315318. Juels A, Jr B S K. Pors: proofs of retrievability for large files [C] / / Association for Computing Machinery Conference on Computer and Communications Security. ACM, 2007. DOI: 10.1145 / 1315245.1315317.), but these solutions do not emphasize the order of data. For ordered data, not only the integrity of the data needs to be verified, but also the data needs to be ensured to be stored in the corresponding positions. Benabbas et al. proposed the verifiable database technology, which solves the problem of order, but mainly targets data of a fixed scale and cannot be appended subsequently (Benabbas S, Gennaro R, Vahlis Y. Verifiable Delegation of Computation over Large Datasets [C] / / Advances in Cryptology - CRYPTO 2011 - 31st Annual Cryptology Conference, Santa Barbara, CA, USA, August 14 - 18, 2011. Proceedings. Springer, Berlin, Heidelberg, 2011. DOI: 10.1007 / 978 - 3 - 642 - 22792 - 9_7.).Subsequently, Chen et al. solved the problem of dynamic data update, but there is a huge overhead problem (Chen X, Li J, Weng J, et al. Verifiable Computation over Large Database with Incremental Updates[C] / / ESORICS 2014. 2014. Miao S M J. Publicly verifiable database scheme with efficient keyword search[J]. Information Sciences: An International Journal, 2019, 475.). In practice, data stream is a new type of data. Such data not only has orderliness but also has dynamics and is continuously generated over time. et al. proposed the concept of verifiable data streaming (VDS). This protocol is based on the Merkle tree and constructs a static chameleon authentication tree by combining the chameleon hash function. With the chameleon authentication tree as the core, a verifiable data stream protocol is constructed, which provides verifiability for users to outsource data streams and can realize data update operations. However, this scheme needs to determine the scale of data in advance ( D, H. Verifiable data streaming[M]. Proceedings of the 2012 ACM conference on Computer and communications security, ACM, 2012: 953–964.). Chen Ke proposed a dynamic chameleon authentication tree structure and constructed a verifiable data stream scheme based on this structure. This scheme can add data infinitely, but it needs to continuously update the root node and the corresponding signature. The client needs to store the entire authentication tree structure, which violates the original intention of outsourcing (Chen Ke. Research and Application of Streaming Data Integrity Verification Based on Dynamic Chameleon Authentication Tree[D]. Northeastern University, 2014.). et al. proposed a design method for dynamic chameleon authentication trees, constructed a verifiable data stream framework that supports unbounded addition, and solved the problem that existing schemes can only verify a fixed number of streaming data. The dynamic chameleon authentication tree does not need to set the size of the tree in advance and is gradually generated according to the storage quantity, supporting an infinite number of data outsourcing. However, this scheme can only be proven secure in the random oracle model ( D, SIMKIN M. VeriStream—A framework for verifiable data streaming[C]. In: Financial Cryptography and Data Security—FC 2015. Springer Berlin Heidelberg, 2015: 548–566. [DOI: 10.1007 / 978-3-662-47854-7_34].)。Krupp et al. proposed two VDS protocols in the standard model. Both protocols support an infinite number of data outsourcing. The first scheme is based on chameleon vector commitments, and a top-down binary tree authentication structure is designed based on this to achieve the verification of outsourced data streams; the second scheme combines digital signatures and cryptographic accumulators to achieve constant computational overhead during verification (KRUPP J, D, SIMKIN M, et al. Nearly optimal verifiable data streaming[C]. In: Public-Key Cryptography—PKC 2016. Springer Berlin Heidelberg, 2016: 417–445. [DOI: 10.1007 / 978-3-662-49384-7_16].). Sun Yi et al. proposed a dynamic verifiable method for outsourced data flow with access control. By combining hash functions, double trapdoor hash functions, and ciphertext-policy attribute-based encryption algorithms, a dynamic authenticable data structure with access control was constructed, thus realizing operations such as addition, update, and fine-grained dynamic authentication of data streams (Sun Yi, Chen Xingyuan, Du Xuehui, et al. A dynamic verifiable method for outsourced data flow under a cloud platform with access control[J]. Chinese Journal of Computers, 2017, 40(2): 337-350.). Tsai et al. proposed a VDS protocol with range queries. By using a data structure called HPBTree, the data confidentiality and query answer integrity of range queries in the data stream were ensured (Tsai I C, Yu C M, Yokota H, et al. VENUS: Verifiable range query in data streaming[C]. In: Proceedings of IEEE INFOCOM 2018—IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS). IEEE, 2018: 160–165. [DOI: 10.1109 / INFCOMW.2018.8406898].). Zhang et al. (proposed a VDS protocol with an accountability mechanism. This article first proposed the cryptographic primitive of dimensionality-increasing vector commitment. On the basis of this primitive, a probabilistically verifiable CVDS protocol and a deterministic CVDS protocol with probabilistic verifiability were constructed by combining a counting Bloom filter and a dynamic accumulator respectively ZHANG Z W, CHEN X F, MA J F, et al. New efficient constructions of verifiable data streaming with accountability[J]. Annals of Telecommunications, 2019, 74(7): 483–499. [DOI: 10.1007 / s12243-018-0687-7].).Subsequently, Miao et al. proposed the Double Trapdoor Chameleon Hash Authentication Tree (DCHT), which constructs a VDS protocol with a constant update cost by using double trapdoor chameleon hash clusters to calculate and fix leaf nodes (Miao M, Wei J, Wu J, et al. Verifiable data streaming with efficient update for intelligent automation systems[J]. International Journal of Intelligent Systems, 2021. DOI: 10.1002 / int.22671.). Immediately afterwards, Wei et al. combined the BLS short signature with the RSA accumulator to construct an efficient VDS protocol supporting auditing. The computational complexities of the addition, verification, and update operations in this protocol are all at the constant level, and the security of this protocol was proven in the random oracle model (WEI JH, TIAN GH, SHEN J, et al. Optimal Verifiable Data Streaming Protocol with Data Auditing[J]. European Symposium on Research in Computer Security. Springer, Cham, 2021: 296 - 312.). In recent years, Miao et al. proposed an efficient VDS protocol supporting privacy protection. By constructing a new type of chameleon authentication tree based on the symmetric encryption system and storing the encrypted streaming data to ensure data confidentiality, the overhead of the addition operation in this protocol is at the constant level (Miao Meixia, Li Jiawei, Wang Yunling, Wei Jianghong. An Efficient Verifiable Data Streaming Protocol for Privacy Protection[J]. Journal of Cryptologic Research, 2022, 9(6): 1124 - 1140. DOI: 10.13868 / j.cnki.jcr.000572.). Immediately afterwards, Miao et al. proposed a new type of chameleon authentication tree (UCAT) supporting update history queries. Based on this authentication tree, a VDS protocol supporting update history queries was constructed, which allows data users to retrieve any version of data items (Miao M, Li J, Wang Y, et al. Verifiable data streaming protocol supporting update history queries[J]. International journal of intelligent systems, 2022. DOI: 10.1002 / int.23045.).Subsequently, Jing et al. proposed a verifiable data streaming protocol in the multi-user scenario, which solved the problem that the evidence size grows linearly with the number of users in the multi-user scenario (X. Jing, M. Miao, J. Wei and J. Wang, "Communication-Efficient Verifiable Data Streaming Protocol in the Multi-User Setting," in IEEE Transactions on Cloud Computing, vol. 11, no. 4, pp. 3341-3354, Oct.-Dec. 2023, doi: 10.1109 / TCC.2023.3285783.). Miao et al. introduced a new primitive called Aggregate VDS (AVDS), which allows data users to retrieve the aggregate results of specified data items while ensuring the validity of the aggregate results (M. Miao, S. Zhao, J. Li and J. Wei, "Aggregatably Verifiable Data Streaming," in IEEE Internet of Things Journal, vol. 11, no. 13, pp. 24109-24122, 1 July 1, 2024, doi: 10.1109 / JIOT.2024.3388448.).
[0003] In summary, existing VDS schemes lack support for update operations. In the case of frequent data updates, the cloud server needs to maintain signatures of a large number of root nodes, which will cause cumbersome signature management problems.
[0004] In view of the above analysis, the technical problems urgently needed to be solved in the existing technology are as follows:
[0005] 1. Dependence on PKI: Current VDS protocols generally rely on the public key infrastructure (PKI) to implement digital signature and verification. In resource-constrained devices or environments, the deployment and maintenance of PKI are expensive and complex tasks, increasing the overall complexity and maintenance cost of the system.
[0006] 2. High computational burden: Each data update requires the data owner to generate a new signature, which increases the computational burden and time consumption for frequently updated data, especially in the case of limited computational resources, this consumption is particularly obvious.
[0007] 3. Complexity of signature management: Frequent data updates mean that the corresponding signatures also need to be managed frequently. This complex management process is prone to omissions, increasing the data security risk. Summary of the Invention
[0008] In view of the problems existing in the prior art, the present invention provides a maintainable and verifiable data flow method and system based on an editable blockchain.
[0009] The present invention is implemented as follows. A maintainable and verifiable data flow method based on an editable blockchain.
[0010] S1, data initialization;
[0011] S2, data addition;
[0012] S3, data query;
[0013] S4, data verification;
[0014] S5, data update.
[0015] Further, the initialization steps are as follows:
[0016] In the initialization phase, given the security parameter 1 λ , the blockchain editor calls the chameleon hash parameter generation algorithm CH1.CHPG(1 λ ) to generate the public parameters and the hash function Then, run the chameleon hash key generation algorithm CH1.CHKG(pp1) and return a pair of keys (pk1, sk1), where the private key the public key The blockchain editor retains sk1 and publishes pk1.
[0017] The client selects a collision-resistant cryptographic hash function h: {0, 1} 2len →{0, 1} len , and runs the chameleon hash parameter generation algorithm CH2.CHPG(1 λ ) to generate large prime numbers p2, q2 such that p2 = kq2 + 1. Let g2 be a random generator of, and set the public parameters as pp2 = (p2, q2, g2). After that, the client runs the chameleon hash key generation algorithm CH2.CHKG(pp2), randomly selects as its private key sk2, and calculates as its public key pk2. In addition, the client sets the height of the CAT to D and selects the key K as the key of the pseudorandom function. The client uses the key K to generate the virtual nodes (X ρ , R ρ), and calculates the initial root node ρ by running the chameleon hash algorithm CH2.CHash. The Pseudo-Random Function (PRF) dynamically calculates virtual nodes using the key K to generate random values for real data. The client only needs to store the key K, thus reducing the storage state. Then, the client initializes the counter c = 0, and the state value is st = (c, D, K). Finally, the public key of CAT is pk = (pk2, ρ) and the private key is sk = (sk2, st), and the public key pk is stored as a transaction on the editable blockchain.
[0018] The cloud server creates an empty database DB. At the same time, the editable blockchain calls the chameleon hash algorithm CH1.CHash to generate the chameleon hash value hash and the random number r0, and stores the public key pk as a transaction on the editable blockchain. Specifically, it selects a random number and calculates the value u 1,1 , u 1,2 , u2, tr and the hash value After calculating e, e1, s1, the random value is set to r0 = (e1, e2, s1, s2). Finally, it returns the chameleon hash value hash, the random number r0, and the transaction pk.
[0019] Furthermore, the data addition steps are as follows:
[0020] When the client wishes to append the data item d i to the database DB of the cloud server, he first parses the state value sk = (sk2, st) and recovers the counter c from st. Subsequently, he divides d i into two parts (d ic , d ic+1 ) and calculates the hash values and where R i,c+1 is a virtual value generated by the PRF.
[0021] Furthermore, according to the counter c, the client performs the following operations:
[0022] (1) When c = 0: First, calculate the nodes v 0,0 and v 0,1 , and the corresponding hash values on the path from the leaf node to the root node. In particular, the left node is calculated using the ordinary hash function, while the right node is a virtual node generated using the pseudo-random function, and they are cascaded from top to bottom. Next, use the trapdoor sk2 to calculate the chameleon hash collision value and store it as a new random value. Subsequently, the counter c needs to be updated to 2. At the same time, the state value needs to be updated to st'. Finally, return the index i, the corresponding authentication path auth i and the state st'.
[0023] (2) When c > 0: For each h ∈ [1, D - 2], if and already exists, then calculate the virtual value and At the same time, calculate and store it in the authentication path auth i . If and does not exist, which means the left node is empty. Then calculate the virtual node and generate the chameleon hash value After that, the client updates the random number space R and the index i to c / 2, and at the same time the counter c increases by 2. Finally, the client sends the data item d i and auth i to the cloud server.
[0024] After the cloud server receives d i and the corresponding authentication path auth i , it stores them in the database DB.
[0025] Furthermore, the data query steps are as follows:
[0026] To query a data item, the client or user sends a specific index value i to the cloud server. After receiving the request, the cloud server looks up the data d i corresponding to the index i and the authentication path auth i in the database. Once found, the cloud server returns them to the client or user. If the data item at the corresponding position i in the database does not exist, the cloud server returns the error symbol ⊥. To verify the integrity of the retrieved data item, the client or user obtains the public key pk from the editable blockchain, which includes the public key pk2 of the chameleon hash function and the root node ρ.
[0027] Furthermore, the data verification steps are as follows:
[0028] Given d i and auth i , the user or client starts from a specific leaf node and gradually calculates the hash value until reaching the root node of the CAT, denoted as ρ'. If ρ' = ρ, the verification passes and returns 1; otherwise, the verification fails and returns 0.
[0029] Furthermore, the data update steps are as follows:
[0030] In the data update phase, when the client needs to modify the i-th data item, it passes the index i to the cloud server to obtain d i and auth i. Then, the client runs the verification algorithm. If the verification algorithm returns 1, the client generates a new path auth for the new data d i ' to generate a new path auth i '. As a result, a new root node ρ' is generated. The client then sends an update packet containing the new data d i ', the authentication information auth i ' and the root hash ρ' to the cloud server, and at the same time passes the public key pk' to the blockchain editor.
[0031] The cloud server verifies the integrity of the new data item by calling the verification algorithm. If the verification algorithm returns 1, the cloud server updates d i to d i , updates auth i to auth i ', and updates ρ to ρ'. For the blockchain editor, first call the verification algorithm of the chameleon hash function. If the verification passes, parse the private key sk1. Next, randomly select three values Calculate u 1,1 , u 1,2 and u2. In addition, calculate pk', and let e2 = e - e1 mod q1, s2 = k2 + e2x mod q1. Finally, the blockchain editor updates the public key pk on the blockchain to pk', and let r0'=(e1, e2, s1, s2).
[0032] Another object of the present invention is to provide a maintainable and verifiable data flow system based on an editable blockchain for implementing the maintainable and verifiable data flow method based on an editable blockchain, including:
[0033] 1. Client: The client is responsible for adding new data items or modifying existing data items and storing them in the cloud server. The client writes the public key as a transaction into the editable blockchain. When the client updates a data item, it needs to send the updated public key and an edit request to the blockchain editor.
[0034] 2. Cloud Server: The cloud server stores the data stream outsourced by the client. When the client or user initiates a query request, the cloud server provides the requested data item and proof. For an update request, the cloud server replaces the original data item and proof with the new data item and proof.
[0035] 3. Blockchain Editor: The blockchain editor updates the data on the blockchain according to the client's edit request. The authoritative institution ensures the legality and accuracy of the edit operation. By using the chameleon hash collision it holds, the blockchain editor securely edits the data on the blockchain.
[0036] 4. Redactable Blockchain: The redactable blockchain stores the transactions submitted by the client and modifies the transaction in response to the client's request through a blockchain editor.
[0037] 5. User: When a user hopes to verify the integrity of a data item, the user sends a query request to the cloud server to obtain the corresponding data and proof. The user obtains the public key from the redactable blockchain and invokes the verification algorithm to ensure the integrity of the data item.
[0038] Another object of the present invention is to provide a computer device, which includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor executes the steps of the maintainable and verifiable data flow method based on the redactable blockchain.
[0039] Another object of the present invention is to provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the maintainable and verifiable data flow method based on the redactable blockchain.
[0040] Another object of the present invention is to provide an information data processing terminal, which includes the maintainable and verifiable data flow system based on the redactable blockchain.
[0041] Combined with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by the present invention are as follows:
[0042] First, the present invention aims to solve the problem of the dependence of the existing VDS protocol on the public key infrastructure (PKI), and at the same time reduce the computational and management complexity brought by frequent data updates. Existing systems usually rely on digital signatures and public key systems to ensure data integrity, but this will bring a large computational and management burden to data owners. To this end, the present invention innovatively introduces the redactable blockchain technology, records the root node value of the chameleon authentication tree (CAT) in the blockchain, and uses the immutability of the blockchain to ensure data integrity, while allowing the blockchain to be edited, so that the record can be quickly adjusted during data updates, reducing unnecessary computational overhead.
[0043] One of the core innovations of the present invention is the application of editable blockchain technology. Traditional blockchain structures emphasize the immutability of data, while the present invention adopts a special editing mechanism that allows data records to be flexibly adjusted while ensuring integrity. Specifically, the root value of the CAT is stored as part of a blockchain transaction, and the data owner can adjust the corresponding block when the data is updated without having to regenerate complex digital signatures. This not only ensures the security of the data but also improves the flexibility of data management, making it suitable for application scenarios that require frequent data updates.
[0044] In addition, the present invention designs a signature-free integrity verification mechanism that breaks through the dependence on digital signatures in traditional VDS systems. By leveraging the characteristics of the chameleon authentication tree, the present invention realizes a method for verifying data integrity without digital signatures, thereby reducing the computational burden on the data owner. This approach avoids complex key management issues and makes the system more suitable for resource-constrained devices such as Internet of Things terminals or embedded systems.
[0045] To further improve the efficiency of data updates, the present invention proposes a lightweight data update mechanism. This mechanism allows the data owner to quickly update and verify data without relying on traditional security infrastructure. This not only simplifies the data management process but also reduces the computational overhead caused by update operations, making the system more suitable for lightweight application scenarios such as mobile devices or low-power sensor networks.
[0046] In addition, to prevent the cloud server from returning old version data, the present invention specifically designs a data version management mechanism. By editing the blockchain record and updating the root value of the CAT, it can effectively prevent the server from still returning outdated records after data updates, thus ensuring data consistency and security. This mechanism further enhances the reliability of the system and is particularly suitable for applications that require strict version management, such as financial data storage or distributed storage systems.
[0047] In summary, the core objective of the present invention is to optimize the architecture of the VDS system, get rid of the dependence on PKI, and reduce the computational and management burdens. By combining editable blockchain, signature-free integrity verification, and lightweight data update mechanisms, the present invention can effectively improve the flexibility and security of the system, making it more suitable for resource-constrained environments such as edge computing, intelligent Internet of Things devices, and cloud computing environments.
[0048] Second, the technical solution of the present invention overcomes the technical prejudice of relying on the Public Key Infrastructure (PKI). Through an innovative approach, it realizes efficient data verification without PKI in a Verifiable Data Stream (VDS) environment. Existing VDS protocols generally rely on PKI and use digital signatures as the core to ensure data integrity and authenticity. However, this imposes a significant burden on end-users, especially on resource-constrained devices. The technical solution of the present invention breaks away from this traditional dependence and designs a mechanism that can operate without traditional PKI, significantly reducing the computational burden on data owners when updating data. At the same time, this solution simplifies the complexity of signature management and maintenance, especially in scenarios where data is frequently updated, and solves the problem that the cloud server may return old version data. Through this breakthrough thinking, the solution of the present invention can not only be effectively implemented on lightweight devices but also ensure system security and operational convenience, breaking the traditional concept that VDS systems must rely on PKI. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a schematic diagram of the VDS protocol based on an editable blockchain provided by an embodiment of the present invention;
[0050] Figure 2 is a structural diagram of a maintainable and verifiable data stream system based on an editable blockchain provided by an embodiment of the present invention;
[0051] Figure 3 is a flowchart of a method for a maintainable and verifiable data stream based on an editable blockchain provided by an embodiment of the present invention;
[0052] Figure 4 is an addition process provided by an embodiment of the present invention;
[0053] Figure 5 is a query process provided by an embodiment of the present invention;
[0054] Figure 6 is a verification process provided by an embodiment of the present invention;
[0055] Figure 7 is an update process provided by an embodiment of the present invention;
[0056] Figure 8 is the bandwidth overhead provided by an embodiment of the present invention;
[0057] Figure 9 is a collision algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0058] To make the objectives, technical solutions and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0059] Table 3.1 Basic Symbols
[0060]
[0061] As Figure 1 、 Figure 2 shown, the VDS protocol based on the redactable blockchain includes the following participants: client, cloud server, user, redactable blockchain, and blockchain editor with editing permissions. The specific interaction process is as follows:
[0062] 1. Client:
[0063] The client is responsible for adding new data items or modifying existing data items and storing them in the cloud server.
[0064] The client writes the public key as a transaction into the redactable blockchain.
[0065] When the client updates a data item, it needs to send the updated public key and an edit request to the blockchain editor.
[0066] 2. Cloud Server:
[0067] The cloud server stores the data stream outsourced by the client.
[0068] When the client or user initiates a query request, the cloud server provides the requested data item and proof.
[0069] For an update request, the cloud server replaces the original data item and proof with the new data item and proof.
[0070] 3. Blockchain Editor:
[0071] The blockchain editor updates the data on the blockchain according to the edit request of the client.
[0072] The authoritative institution ensures the legality and accuracy of the edit operation.
[0073] By using the chameleon hash collision it possesses, the blockchain editor securely edits the data on the blockchain.
[0074] 4. Redactable Blockchain:
[0075] The transaction submitted by the editable blockchain storage client can be edited, and the transaction can be modified by the blockchain editor in response to the client's request.
[0076] 5. User:
[0077] When the user hopes to verify the integrity of the data item, a query request is sent to the cloud server to obtain the corresponding data and proof.
[0078] The user obtains the public key from the editable blockchain and calls the verification algorithm to ensure the integrity of the data item.
[0079] The present invention constructs a VDS protocol based on an editable blockchain, and the specific steps are as follows
[0080] The initialization steps are as follows:
[0081] In the initialization phase, given the security parameter 1 λ , the blockchain editor calls the chameleon hash parameter generation algorithm CH1.CHPG(1 λ ) to generate the public parameters and the hash function Then, it runs the chameleon hash key generation algorithm CH1.CHKG(pp1) and returns a pair of keys (pk1, sk1), where the private key the public key The blockchain editor retains sk1 and publishes pk1.
[0082] On the other hand, the client selects a collision-resistant cryptographic hash function h: {0, 1} 2len → {0, 1} len , and runs the chameleon hash parameter generation algorithm CH2.CHPG(1 λ ) to generate large prime numbers p2, q2 such that p2 = kq2 + 1. Let g2 be a random generator of , and set the public parameters as pp2 = (p2, q2, g2). After that, the client runs the chameleon hash key generation algorithm CH2.CHKG(pp2), randomly selects as its private key sk2, and calculates ρ , R ρ), and calculates the initial root node ρ by running the chameleon hash algorithm CH2.CHash. The Pseudo-Random Function (PRF) dynamically calculates virtual nodes using the key K to generate random values for real data. The client only needs to store the key K, thus reducing the storage state. Then, the client initializes the counter c = 0, and the state value is st = (c, D, K). Finally, the public key of CAT is pk = (pk2, ρ) and the private key is sk = (sk2, st), and the public key pk is stored as a transaction on the editable blockchain.
[0083] The cloud server creates an empty database DB. Meanwhile, the editable blockchain calls the chameleon hash algorithm CH1.CHash to generate the chameleon hash value hash and the random number r0, and stores the public key pk as a transaction on the editable blockchain. Specifically, it selects a random number and calculates the value u 1,1 , u 1,2 , u2, tr and the hash value After calculating e, e1, s1, set the random value to r0 = (e1, e2, s1, s2). Finally, return the chameleon hash value hash, the random number r0 and the transaction pk.
[0084] The steps for data addition are as follows
[0085] When the client wishes to append the data item d i to the database DB of the cloud server, he first parses the state value sk = (sk2, st) and recovers the counter c from st. Subsequently, he divides d i into two parts and calculates the hash values and where R i,c+1 is a virtual value generated by PRF. In addition, according to the counter c, the client performs the following operations:
[0086] (1) When c = 0: First, calculate v 0,0 and v 0,1 , and the corresponding hash values on the path from the leaf node to the root node. In particular, the left node is calculated using the ordinary hash function, while the right node is generated using the virtual node and cascaded. Next, calculate the chameleon hash collision value using the trapdoor sk2 and store it as the new random value. Subsequently, the counter c needs to be updated to 2. At the same time, the state value needs to be updated to st'. Finally, return the index i, the corresponding authentication path auth i and the state st'.
[0087] (2) When c > 0: For each h ∈ [1, D - 2], if and If it already exists, calculate and At the same time, calculate and store it in the authentication path auth i in. If and does not exist, which means the left node is empty. Then calculate the virtual node and generate a chameleon hash value After that, the client updates the random number space R and the index i to c / 2, and at the same time the counter c is incremented by 2. Finally, the client sends the data item d i and auth i to the cloud server.
[0088] After the cloud server receives d i and the corresponding authentication path auth i , it stores them in the database DB.
[0089] The data query steps are as follows:
[0090] To query a data item, the client or user sends a specific index value i to the cloud server. After receiving the request, the cloud server looks up the data d corresponding to the index i in the database i and the authentication path auth i . Once found, the cloud server returns them to the client or user. If the data item at the corresponding position i in the database does not exist, the cloud server returns the error symbol ⊥. To verify the integrity of the retrieved data item, the client or user obtains the public key pk from the editable blockchain, which includes the public key pk2 of the chameleon hash function and the root node ρ.
[0091] The data verification steps are as follows:
[0092] Given d i and auth i , the user or client starts from a specific leaf node and gradually calculates the hash value until reaching the root node of the CAT, denoted as ρ'. If ρ' = ρ, the verification passes and 1 is returned; otherwise, the verification fails and 0 is returned.
[0093] The data update steps are as follows:
[0094] In the data update phase, when the client needs to modify the i-th data item, it passes the index i to the cloud server to obtain d i and auth i . Then, the client runs the verification algorithm. If the verification algorithm returns 1, the client generates a new path auth i ' according to the append algorithm. This will also generate a new root node ρ'. The client then includes the new data di ', the authentication information auth i ' and the update package of the root hash ρ' are sent to the cloud server, and at the same time, the public key pk' is passed to the blockchain editor.
[0095] The cloud server verifies the integrity of the new data item by calling the verification algorithm. If the verification algorithm returns 1, the cloud server updates d i to d i ', updates auth i to auth i ', and updates ρ to ρ'. For the blockchain editor, first call the verification algorithm of the chameleon hash function. If the verification passes, parse the private key sk1. Next, randomly select three values Calculate u 1,1 , u 1,2 and u2. In addition, calculate pk', and let e2 = e - e1 mod q1, s2 = k2 + e2x mod q1. Finally, the blockchain editor updates the public key pk on the blockchain to pk', and let r0' = (e1, e2, s1, s2).
[0096] An application embodiment of the present invention provides a computer device, which includes a memory and a processor. A computer program for implementing the method for maintaining and verifying a data stream based on an editable blockchain is stored in the memory. By reading and executing the computer program, the processor can implement the specific steps of data initialization, data addition, data query, data verification, and data update, so as to complete the maintenance and verification operations of the data stream.
[0097] An application embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is read and executed by a processor in a computing device, the processor can implement the various steps of the method for maintaining and verifying a data stream based on an editable blockchain, including generating a chameleon hash value, updating an authentication path, data storage, and verification operations. The storage medium can be applied to various devices, such as servers, clients, or Internet of Things devices.
[0098] An application embodiment of the present invention provides an information data processing terminal, which integrates a system for maintaining and verifying a data stream based on an editable blockchain. The system realizes the dynamic management and verifiable maintenance of information data by calling an initialization module, a data addition module, a data query module, a data verification module, and a data update module. The terminal can be widely applied to data management scenarios in fields such as medical care, finance, or supply chain management.
[0099] An application embodiment of the present invention further provides a system integration solution, in which a computer device, a computer-readable storage medium, and an information data processing terminal jointly constitute a complete maintainable and verifiable data stream application system based on an editable blockchain. Through collaborative work, the system can provide efficient management and integrity verification of data, and is applicable to application requirements that require high security and editable data in various scenarios.
[0100] Embodiment 1
[0101] In a medical data management system, a maintainable and verifiable data stream method based on an editable blockchain is used to manage patients' electronic medical records. In the initialization stage, the system generates public parameters and key pairs through a chameleon hash, sets a pseudo-random function to dynamically generate virtual nodes, creates the root node of the CAT, and stores the public key in the blockchain. Each time new patient medical record data is added, the client generates a virtual value according to the counter, calculates the authentication path and the new state value, and uploads the data and the authentication path to the cloud server. When a doctor or patient queries the medical record, the cloud server returns the data and the authentication path according to the index, and the user checks the integrity of the data through the verification algorithm and obtains the result.
[0102] Embodiment 2
[0103] In supply chain management, a maintainable and verifiable data stream method based on an editable blockchain is used to track the status of goods. The system first initializes the chameleon hash parameters and key pairs, sets a pseudo-random function to generate initial virtual nodes, and stores the root node in the blockchain. Each time the goods pass through a logistics node, the client adds the new status information to the cloud server database, and generates an updated authentication path and root node. Logistics management personnel query the status of the goods through the index, the cloud server returns the status data and the authentication path, and the verification algorithm ensures that the data has not been tampered with. At the same time, when the status of the goods needs to be updated, the system generates a new authentication path and root node, and synchronizes them to the cloud server and the blockchain.
[0104] Experimental results show that the average running time for adding, verifying, and updating data items is positively correlated with the scale of the data items, as Figures 4 - 7 shown; while the running time for querying data items is relatively stable, maintaining between 0 - 0.2 milliseconds. The scale of the data items affects the height of the CAT. Therefore, as the number of data items increases, the average time required to append data items also increases. The running time of the verification algorithm depends on the height of the CAT and requires a corresponding number of hash operations. Therefore, the verification time increases as the height of the CAT increases. The update operation is also affected by the scale of the data items. As the number of data items increases, the height of the tree also increases, resulting in an increase in the average running time for updating data items.
[0105] As Figure 8As shown, in the system performance evaluation, bandwidth overhead is one of the important metrics for measuring the efficiency of an editable blockchain, which is mainly reflected in the size of the evidence data. Through the analysis of experimental data, it can be observed that as the scale of the data processed by the system continuously expands, the height of the underlying data structure increases correspondingly, resulting in the growth of the length of the authentication path. This growth relationship exhibits an approximately logarithmic characteristic, that is, when the data scale increases by one order of magnitude, the length of the authentication path only increases by a fixed proportion. Specifically, when the data scale increases from 32 to 1024, the evidence size increases from approximately 3KB to approximately 6KB, and the increase is controlled within a reasonable range. This predictable growth pattern provides an important reference for system design, enabling developers to pre-plan network bandwidth resources according to the expected data scale to ensure the stable operation of the system under different scales. At the same time, this also highlights the importance of optimizing the data structure design in an editable blockchain system to minimize the bandwidth overhead while ensuring security.
[0106] As Figure 9 shown, in the data update operation, the collision algorithm plays a key role as the core algorithm. Through experimental observation, it is found that as the number of executions of the collision algorithm accumulates, its overall computational overhead shows a gradually increasing trend. This phenomenon mainly stems from the fact that the algorithm needs to maintain and adjust the relevant data structure during each update. However, it is worth noting that although the overall overhead shows a growth trend, the execution time of a single modification operation remains relatively stable. This stability benefits from the optimization strategies adopted in the algorithm design, such as the application of local update mechanisms and caching technologies, which enable each update operation to only process the affected data part, thus ensuring the efficiency of transaction updates in the editable blockchain system. This feature is particularly important for blockchain application scenarios that require frequent updates, providing a reliable guarantee for the high throughput of the system.
[0107] It should be noted that the embodiments of the present invention can be implemented through hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware.
[0108] Those of ordinary skill in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, such as provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above hardware circuits and software such as firmware.
[0109] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A maintainable and verifiable data flow method based on editable blockchain, characterized in that: The following steps are involved: S1: Data initialization, generating public parameters and hash functions by calling the Chameleon Hash Parameter Generation Algorithm, running the Chameleon Hash Key Generation Algorithm to generate a key pair, and setting relevant parameters of the client and cloud server; S2: Data addition, the client appends the data item to the cloud server's database and updates the authentication path, random number, and status value; S3: Data query, the client or user sends an index request to the cloud server, and the cloud server returns the data item and authentication path corresponding to the index; S4: Data verification, the user calculates the hash value from the leaf node to the root node according to the authentication path and verifies the integrity; S5: Data update: The client generates a new authentication path and root node for the data item of the specified index, and sends the update package to the cloud server and blockchain editor to complete the synchronous update.
2. The maintainable and verifiable data flow method based on editable blockchain according to claim 1 is characterized in that: The initialization steps include: Generate public parameters and key pairs for Chameleon Hash, and set the key of the pseudo-random function to generate virtual nodes; Initialize the client's counter, status value and CAT's root node, and store the public key in the blockchain; The cloud server creates an empty database, generates an initial chameleon hash value and random number, and stores the initial transaction information.
3. The maintainable and verifiable data flow method based on editable blockchain according to claim 1 is characterized in that: The steps to add data include: The client generates a virtual value based on the counter and pseudo-random function, and calculates the hash value on the leaf node and path; Update the counter, authentication path, and status value, and store the data item and the corresponding authentication path in the database of the cloud server.
4. The maintainable and verifiable data flow method based on editable blockchain according to claim 1 is characterized in that: The data query steps include: The cloud server retrieves the corresponding data item and authentication path from the database according to the received index request and returns it to the client or user; The client obtains the public key and root node from the blockchain for subsequent verification.
5. The maintainable and verifiable data flow method based on editable blockchain according to claim 1 is characterized in that: The data validation steps include: The user calculates the hash value from the leaf node to the root node step by step, and compares the calculation result with the root node; The verification result returns pass or fail.
6. The maintainable and verifiable data flow method based on editable blockchain according to claim 1 is characterized in that: The data update steps include: The client generates a new authentication path and root node based on the specified index and sends the update package to the cloud server; The cloud server updates the database content after checking the data integrity through the verification algorithm; The blockchain editor parses the private key through the Chameleon hash verification algorithm, generates a new hash value and updates the public key and transaction information on the blockchain.
7. A maintainable and verifiable data flow system based on an editable blockchain, characterized in that: include: Initialization module: used to generate public parameters and key pairs of Chameleon Hash, set the key of pseudo-random function and the root node of CAT, and initialize the parameters of client and cloud server; Data adding module: used to generate virtual nodes according to the counter, calculate the authentication path of the data item and update the status value, and store the data in the database of the cloud server; Data query module: used to receive query requests from clients or users, retrieve corresponding data items and authentication paths in the database and return them; Data verification module: used to verify data integrity according to the authentication path, and complete the verification by calculating the hash value and comparing it with the root node; Data update module: used to generate new authentication paths and root nodes for data items with specified indexes, and synchronously update the cloud server and blockchain.
8. The maintainable and verifiable data flow system based on editable blockchain according to claim 1, characterized in that: The initialization module includes: Parameter generation unit: used to generate public parameters and key pairs of Chameleon hash function; Pseudo-random function unit: used to generate random values of virtual nodes based on pseudo-random functions; State management unit: used to initialize counters, state values, and the root node of CAT, and store public keys in the blockchain; Cloud server configuration unit: used to create a database and store initial hash values and transaction information.
9. The maintainable and verifiable data flow system based on editable blockchain according to claim 1, characterized in that: The data adding module comprises: Counter parsing unit: used to parse the counter from the state value and calculate the virtual value; Authentication path generation unit: used to calculate the authentication path and hash value according to the virtual value, and update the state value; Data storage unit: used to store the generated authentication path and data items in the database of the cloud server.
10. The maintainable and verifiable data flow system based on editable blockchain according to claim 1, characterized in that: The data updating module comprises: Certification path update unit: used to generate new certification paths and root nodes, and package update information; Cloud server synchronization unit: used to verify the integrity of new data and update database content; Blockchain synchronization unit: used to call the Chameleon hash algorithm to verify and update the public key and hash value on the blockchain.