IPFS-based editable blockchain design method and device, and storage medium

By designing an editable blockchain based on IPFS, and utilizing the Chameleon hash function and IPFS storage scheme, the problems of complex blockchain editing operations and inconvenient historical version management are solved, enabling efficient querying and verification of historical blockchain versions.

CN118519980BActive Publication Date: 2026-11-27FUDAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410363992.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2026-11-27
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing editable blockchain technology suffers from problems such as complex blockchain editing operations, inconvenient historical version management, insufficient records of fine-grained editing operations, and untimely node updates.

Method used

An editable blockchain design based on IPFS is adopted, which uses the chameleon hash function to realize arbitrary granularity editing operations and stores each edit record in IPFS. The content addressing feature of IPFS enables efficient querying and verification.

Benefits of technology

It achieves the findability and verifiability of historical versions of the blockchain, enabling nodes to update to the latest blockchain in a timely manner and supporting efficient verification of fine-grained editing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519980B_ABST
    Figure CN118519980B_ABST
Patent Text Reader

Abstract

The application provides an IPFS-based editable blockchain design method, device and storage medium, and the method comprises the following steps: editable blockchain system design; blockchain data editing process design; IPFS storage scheme design; and editing operation history version query verification process design. The application can realize editing operations of any granularity in the blockchain, and stores each editing record in the IPFS, so as to achieve the purpose that the history version of the blockchain can be searched and verified. Meanwhile, based on the characteristics of the IPFS content addressing, a unique identifier is generated for the record of each editing operation, so that the function of efficient and verifiable editing operation on the basis of decentralization is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain design technology, and more specifically, to an editable blockchain design method, apparatus, and storage medium based on IPFS. Background Technology

[0002] The most important characteristics of blockchain are decentralization and immutability. Decentralization means that blockchain services do not rely on a centralized, trusted third party, and immutability is achieved through the underlying design of the blockchain to provide sufficient security. However, with the development of blockchain technology and its practical application, immutability has generated many negative effects. Currently, many editable blockchain solutions have been proposed. Editable blockchains are a type of blockchain that retains the structural characteristics of blockchain while allowing for editing operations on existing data, including insertion, deletion, and modification.

[0003] Existing solutions primarily implement editability through chameleon hashing, a trapdoor one-way hash function that allows trapdoor holders to find collisions for any given input. While blockchains use cryptographic hash functions to ensure data immutability, chameleon hashing allows data modification while maintaining the hash value. For the verifiability of editable blockchains, a state field is typically added to the block header to verify historical edits. Editable blockchains can be categorized into block-level and transaction-level based on the granularity of the edited object, achieving different levels of granularity by applying chameleon hashing to hash pointers or Merkle trees. However, current editable blockchain technology suffers from the following problems: 1. Blockchain edits modify the state field in the block header, requiring the entire blockchain to be traversed for verification of a specific historical edit, making the process complex; 2. When performing deletion or other edits, it cannot be guaranteed that nodes are updated to the latest blockchain in real time. Furthermore, editable blockchains have multiple historical versions, lacking a convenient method for verifying all versions; 3. While block-level historical version recording methods have been extensively researched, there is a lack of historical version recording for fine-grained edits. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide an editable blockchain design method, device, and storage medium based on IPFS, enabling editing operations of arbitrary granularity in the blockchain and storing each editing record in IPFS, thereby achieving the goal of making the historical versions of the blockchain traceable and verifiable.

[0005] To solve the above problems, the technical solution of the present invention is as follows:

[0006] An IPFS-based method for designing an editable blockchain includes the following steps:

[0007] Editable blockchain system design;

[0008] Blockchain data editing workflow design;

[0009] IPFS storage solution design;

[0010] Design of the historical version query and verification process for editing operations.

[0011] Preferably, the steps of designing the editable blockchain system specifically include: system initialization, obtaining the chameleon hash algorithm public parameter pp through an asymmetric bilinear pair PPT generation algorithm ABGen based on the security parameter λ, and broadcasting the CID of the chief editor record file and the unique IPNS hash value of the query file table:

[0012]

[0013] ABGen is an asymmetric bilinear pair PPT generation algorithm. G is a cyclic group of order p with prime numbers, and g is... They are and generator, e: It is an asymmetric bilinear mapping, with common parameters The hash key and trapdoor key of the Chameleon hash algorithm are obtained by generating the Chameleon hash key. The hash key can be used to calculate the hash value of data under Chameleon hash and verify the current hash value and the verification random value. The trapdoor key can be used to modify the data in the block and update the verification random value.

[0014] Preferably, the chameleon hash algorithm includes CH=<KGen,Hash,Verify,Adapt> The details are as follows:

[0015] Chameleon hash key generation function (hk,tk) ← CH.KGen(pp);

[0016] The chameleon hash generation function (h,R) ← CH.Hash(m,hk);

[0017] The chameleon hash verification function {0,1}←CH.Verify(m,hk,R);

[0018] The chameleon hash modification function is R′←CH.Adapt(tk,m,m′).

[0019] Preferably, the steps of the blockchain data editing process design specifically include: In the current editable blockchain system, the editing granularity can be divided into block level and transaction level. When editing a block, the current editing operation is recorded as a block level, an edit record file and its identifier cid are generated in IPFS, linked to the master edit record file in IPFS, the newly generated CID in the master record file is obtained, the current block CID is modified, and the latest CID is used in subsequent block generation; When editing a transaction, the current editing operation is recorded as a transaction level, an edit record file and its identifier cid are generated in IPFS, the cid is recorded in the current transaction, linked to the edit record file in IPFS, the new CID generated by IPFS is obtained, and the CID of the block in which the transaction is located is modified.

[0020] Preferably, the blockchain editing operation specifically includes:

[0021] Block modification operation: After modifying the original data, use the Chameleon hash modification function to obtain the modified verification random value, and update the data, verification random value and CID in the block;

[0022] Block insertion operation: This involves inserting a new block into the blockchain. First, extract and modify the data in the header of the block following the insertion position, including the hash value of the previous block and the verification random value. Then, set the hash value of the previous block in the header of the first block of the inserted block to the extracted hash value, and use the Chameleon hash generation function to calculate the hash value of the header of the last block of the inserted block. Finally, update the hash value of the previous block and the verification random value in the header of the block following the insertion position.

[0023] Block deletion operation: Extract the data of the block to be deleted, record the hash value of the previous block, and then update the hash value of the previous block and the verification random value of the block after the deletion position;

[0024] Transaction modification operation: After modifying the original data, use the Chameleon Hash modification function to obtain the modified verification random value, and update the data and verification random value in the transaction block;

[0025] Transaction deletion operation: Modify the data items of the transaction to be deleted to all 0s, use the Chameleon Hash Modification Function to obtain the verification random value in the modified transaction, and update the data and verification random value in the transaction block.

[0026] Preferably, cid refers to the identifier of a single edit record file, i.e., the hash value of the single edit record file, and CID refers to the total edit record file in IPFS, i.e., the hash value of the total edit record file.

[0027] Preferably, the steps of the IPFS storage scheme design specifically include: each edit operation of the IPFS storage blockchain, including the edit granularity, edit operation type, current timestamp, editor address, editing location, and storage content of the block / transaction before editing; each edit operation record is merged into a master edit record file that records all edits of the blockchain; and the CID is updated each time a new edit record is added.

[0028] Preferably, the steps of the historical version query and verification process for the edit operation specifically include: IPFS stores records of each edit operation; nodes perform query and verification operations using the latest CID; the query operation includes: nodes can search in IPFS based on the edit granularity, edit operation type, current timestamp, editor address, hash value of the edit location, or hash value of the storage content of the block / transaction being queried; if no such hash value is found, the IPFS master edit record file can be traversed for querying; the verification operation includes: nodes search for the identifier of the edit operation to be verified in IPFS; if it exists, the edit operation is verified successfully; otherwise, it fails.

[0029] Furthermore, the present invention also provides an IPFS-based editable blockchain design apparatus, including a processor and a memory for storing executable instructions of the processor, the processor being configured to execute the IPFS-based editable blockchain design method as described above by executing the executable instructions.

[0030] Furthermore, the present invention also provides a computer-readable storage medium for storing program code for executing the IPFS-based editable blockchain design method as described above.

[0031] Compared to existing technologies, the method of this invention utilizes a highly efficient chameleon hash function to enable edit operations of arbitrary granularity in the blockchain, and stores each edit record in IPFS to achieve the goal of making historical versions of the blockchain traceable and verifiable. Furthermore, based on the content addressing characteristics of IPFS, each edit operation record generates a unique identifier, enabling efficient and verifiable edit operations on a decentralized basis. In addition, the unique content identifiers in IPFS ensure that nodes update to the latest blockchain in a timely manner, preserving historical versions of each edit record. Attached Figure Description

[0032] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0033] Figure 1 This is a flowchart illustrating the IPFS-based editable blockchain design method of the present invention.

[0034] Figure 2 This is a schematic diagram of the block header structure design of the present invention;

[0035] Figure 3 This is a flowchart illustrating the blockchain editing operation of the present invention;

[0036] Figure 4 This is a schematic diagram of the storage structure for editing operations within IPFS of the present invention;

[0037] Figure 5 This is a schematic diagram of the blockchain query, verification, and editing operation process of the present invention. Detailed Implementation

[0038] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0039] The InterPlanetary File System (IPFS) is a peer-to-peer network of protocols, hypermedia, and file sharing used for storing and sharing data in a distributed file system. IPFS utilizes content addressing; when data is uploaded to IPFS, a unique Content Identifier (CID) is generated. The CID is a hash value representing the IPFS file content, used to identify and locate files or content on the IPFS network. Combining IPFS with blockchain technology can alleviate the storage pressure on blockchains in a decentralized environment.

[0040] Specifically, this invention provides an editable blockchain design method based on IPFS, designing a novel editable blockchain system, a blockchain data editing process, an IPFS storage scheme, and an edit history version query and verification process, to achieve an editable blockchain that allows for fine-grained editing and verification under decentralized conditions, such as... Figure 1 As shown, the method includes the following steps:

[0041] S1: Editable blockchain system design;

[0042] Specifically, during system initialization, based on the security parameter λ, the common parameter pp of the Chameleon hash algorithm is obtained through an asymmetric bilinear pair PPT generation algorithm ABGen. The CID of the editor-in-chief record file is then broadcast, along with the unique IPNS hash value from the query file table, as shown below:

[0043]

[0044] ABGen is an asymmetric bilinear pair probabilistic polynomial time (PPT) generation algorithm. G is a cyclic group of order p with prime numbers, and g is... They are and generator, e: It is an asymmetric bilinear mapping. Let the common parameters be... Next, the hash key and trapdoor key of the Chameleon hash algorithm are obtained using the Chameleon hash key generation function CH.KGen, in the p-order integer group. A uniformly random selection of x in a cyclic group of order p Select h2 uniformly and randomly, and calculate h1 = g x , Obtain the hash key The trapdoor key tk = x.

[0045] When calculating hash values ​​in the blockchain, the Chameleon Hash generation function CH.Hash is used, where the hash value corresponding to data m is h = h1. r h2 m Simultaneously, a random verification value R = g is generated. r r is The random value is given by the input hash key hk. The chameleon hash verification function CH.Verify verifies whether the data m and the random value R are valid based on the input hash key hk. If the verification fails, output 1; otherwise, output 0. When data in the blockchain needs to be modified, the Chameleon Hash modification function CH.Adapt is used. Before modification, CH.Verify is used to verify whether the original data is correct. Then, based on the input trapdoor key tk, the original data m, and the modified data m', the updated verification random value is calculated.

[0046] like Figure 2 As shown, the block header of the blockchain of this invention includes: the hash value p of the previous block header, the random number ctr of the block proof-of-work, the verification random value R, the unique content identifier CID of the editor-in-chief record file in IPFS, the Merkle root m, and the timestamp t. The verification random value is calculated using the chameleon hash function CH.Hash when generating the content of the current block.

[0047] The current block being valid can be represented as: validblock D(B) := H(ctr, CH.Hash(cont, hk)) < D, where B is the current block, B :=<p,ctr,R,t,m,CID> D is the proof-of-work difficulty value, cont = p||m||t||CID, H(ctr,CH.Hash(cont,hk)) is the hash value of the current block header, H:{0,1} * →{0,1} λ It is a collision-resistant cryptographic hash function that maps any number of bits of data to a fixed number of bits. If the hash value of the current block header is less than the proof-of-work difficulty value, the block passes the proof-of-work test.

[0048] In a blockchain system, the chameleon hash function is used for inter-block hash pointers and transaction generation, while the Merkle tree uses a general hash function except for transaction items. Each transaction item generates a corresponding chameleon hash value and a verification random value.

[0049] The chameleon hash algorithm described in step S1 includes CH=<KGen,Hash,Verify,Adapt> The details are as follows:

[0050] Chameleon hash key generation function (hk, tk) ← CH.KGen(pp);

[0051] The chameleon hash generation function (h, R) ← CH.Hash(m, hk);

[0052] The chameleon hash verification function {0, 1} ← CH.Verify(m, hk, R);

[0053] The chameleon hash modification function is R′←CH.Adapt(tk, m, m′).

[0054] This invention adds a verification random value and a unique content identifier (CID) to the block header of the blockchain. The verification random value is the random value corresponding to the chameleon hash value generated for the current block, used to ensure that the hash value of the block remains unchanged when data is edited. The unique content identifier is generated during IPFS storage of edit operations, and the CID stored in the current block header corresponds to the unique content identifier of the edit record stored in IPFS for the entire blockchain up to the current block.

[0055] S2: Blockchain data editing workflow design;

[0056] Specifically, when a node in a blockchain requests an edit operation, it needs to send an edit request. This request must include the editor's address, the granularity of the edit, the operation type, the object to be edited, and the content to be edited. In current editable blockchain systems, the granularity of editing can be divided into block-level and transaction-level. When editing a block, the edit operation is recorded at the block level, an edit record file and its identifier `cid` are generated in IPFS, linked to the master edit record file in IPFS, and a newly generated CID is obtained. Then, the current block's CID is modified, and the latest CID is used in subsequent block generation. When editing a transaction, the edit operation is recorded at the transaction level, an edit record file and its identifier `cid` are generated in IPFS, the `cid` is recorded in the current transaction, linked to the edit record file in IPFS, and a new CID generated by IPFS is obtained. Then, the CID of the block containing the transaction is modified. Specifically, when the edit type is deletion, only the CID needs to be updated in the new block generated after the edit.

[0057] like Figure 3 As shown, based on the editing granularity and operation type, the editing workflow can be divided into the following 5 types:

[0058] 1. Block modification operation: Based on the input editing information, the modified data in the block is recorded as m′, and the original data is recorded as m. First, the various information of this edit and the original data in the block are recorded in IPFS to obtain the CID′ of the master edit record file. Then, the random checksum R′ of the modified block is obtained using R′←CH.Adapt(tk, cont, cont′), where cont=p||m||t||CID, and cont′=p||m′||t||CID′. Finally, the data, random checksum, and CID in the block are updated.

[0059] 2. Block insertion operation: Based on the input editing information, the block inserted before the original i-th block is denoted as the inserted block B. i Let the original i-th block be denoted as B. i+1 First, extract B. i+1 In the data, record the hash value p of the previous block. i+1 Record all information about this edit and the original data within the block in IPFS, obtain the CID of the master edit record file, and generate the inserted block B. i :=<p,ctr,R,t,,m,CID> , where p = p i+1 Then, calculate B. i+1 The previous hash value p that needs to be updated i+1 =H(ctr, CH.Hash(cont, hk)), cont = p||m||t||CID. Finally, update B. i+1The previous hash value p in i+1 With verification of random value R i+1 .

[0060] 3. Block deletion operation: Based on the input editing information, the i-th block to be deleted is denoted as B. i B i :=<p,ctr,R,t,m,CID> Let the (i+1)th block be denoted as B. i+1 First, record all information about this edit and the original data within the block in IPFS to obtain the CID of the master edit record file. Then, modify B. i+1 The previous hash value p in i+1 =p.

[0061] 4. Transaction Modification Operation: Based on the input editing information, the original transaction data is denoted as m, and the modified data as m′. First, the verification random value R′ in the modified transaction is obtained using R′←CH.Adapt(tk, m, m′), and the data and verification random value in the transaction block are updated. Then, the editing operation information and the original data within the transaction are recorded in IPFS to obtain the CID of the master edit record file. Finally, the CID and verification random value of the transaction block are modified.

[0062] 5. For the transaction deletion operation, based on the input editing information, the original data is denoted as m, and the modified transaction data is set to all zeros, denoted as m′. The checksum random value R′ in the modified transaction is obtained using R′←CH.Adapt(tk, m, m′), and the data and checksum random value in the transaction block are updated. Then, the editing operation information and the original data within the transaction are recorded in IPFS to obtain the CID of the master edit record file. Finally, the CID and checksum random value of the transaction block are modified.

[0063] In this embodiment, in step S2, cid refers to the identifier of the single edit record file, that is, the hash value of the single edit record file, and CID refers to the total edit record file in IPFS, that is, the hash value of the total edit record file.

[0064] S3: IPFS storage solution design;

[0065] IPFS stores every edit operation on the blockchain, including the edit granularity, edit operation type, current timestamp, editor address, edit location, and the stored content of the block / transaction before the edit. The edit granularity can be set to block level or transaction level; when editing a specific data item, it is assigned to the appropriate granularity level. Edit operation types include block modification, block insertion, block deletion, transaction modification, and transaction deletion. The timestamp records the time the edit operation occurred to help track the chronological order of edits. The editor address is the account address of the user performing the current edit operation. The edit location specifies the position of the edit operation in the blockchain; for block edits, it is the block header hash value of the current block; for transaction edits, it is the block header hash value of the block to which the transaction belongs. The stored content before the edit copies and stores the data originally stored in the block / transaction to ensure historical versions are traceable. Each edit operation record, composed of the above information, is merged into a master edit record file that records all edits on the blockchain. Its CID is updated each time a new edit record is added.

[0066] Specifically, such as Figure 4 As shown, taking the k-th edit operation as an example, the data is divided into two parts: one part stores the edit granularity, edit operation type, current timestamp, editor address, and editing location of this edit, with its unique content identifier named cid0; the other part stores the stored data before this edit, with its unique identifier named cid1. These two parts are used for node querying and verification. The overall identifier for both parts is cid. k The CID is the unique content identifier for the k-th edit operation. After the k-th edit operation is stored in IPFS, its content is linked to the record of the (k-1)-th edit operation, and the CID of the master edit record file is updated. The master edit record file records each edit operation and saves the historical version of the data edited each time.

[0067] IPFS also stores a query file table, which includes the cid for each edit, as well as the corresponding cid0 and cid1 for each edit, so that nodes can easily find each other's stored content by using cid0 or cid1.

[0068] S4: Design of the historical version query and verification process for editing operations.

[0069] IPFS stores records of each edit operation, and nodes can query and verify these operations using the latest CID. For querying, nodes can search IPFS based on the edit granularity, operation type, current timestamp, editor address, hash value of the edit location, or hash value of the stored content of the block / transaction. If no such hash value is found, the node can iterate through the IPFS master edit record file. For verification, nodes search IPFS for the identifier of the edit operation to be verified. If it exists, the edit operation is verified successfully; otherwise, it fails.

[0070] Specifically, such as Figure 5 As shown, IPFS contains a master edit record file. When a node uses the CID, it can find all edit operations and can query and verify the operations using the latest CID.

[0071] Query operation: Taking the k-th edit operation as an example, determine whether the node possesses the edit granularity, edit operation type, current timestamp, editor address, and hash value of the edit location for the queried edit operation. Figure 4 cid0 in k If you have it, you can find the query file table in IPFS and use cid0. k Search for cid1 k and cid k Otherwise, determine whether the node possesses the original stored data from the historical version. Figure 4 cid1 in k If you have it, you can find the query file table in IPFS and use cid1. k Search for cid0 k and cid k Otherwise, query the edit operations saved in IPFS by traversing through the data.

[0072] Verification operation: When performing a verification operation, the node possesses the edit granularity, edit operation type, current timestamp, editor address, and hash value of the edit location, i.e. Figure 4 cid0 in k Therefore, it can be directly obtained through cid0. k If the query in the file table does not yield corresponding information, then this editing operation will not be performed.

[0073] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A method for designing an editable blockchain based on IPFS, characterized in that, The method includes the following steps: Editable blockchain system design; The blockchain data editing process design specifically includes: In the current editable blockchain system, the editing granularity is divided into block level and transaction level. When editing a block, the editing operation is recorded as a block-level operation, an edit record file and its identifier cid are generated in IPFS, linked to the master edit record file in IPFS, and the newly generated CID in the master record file is obtained. Then, the CID of the current block is modified, and the latest CID is used in the generation of subsequent blocks. When editing a transaction, the editing operation is recorded as a transaction-level operation, an edit record file and its identifier cid are generated in IPFS, the cid is recorded in the current transaction, linked to the edit record file in IPFS, and the newly generated CID in IPFS is obtained. Then, the CID of the block in which the transaction is located is modified. The cid refers to the identifier of the single edit record file, that is, the hash value of the single edit record file, and the CID refers to the master edit record file in IPFS, that is, the hash value of the master edit record file. The specific editing operations of the blockchain include: Block modification operation: After modifying the original data, use the Chameleon hash modification function to obtain the modified verification random value, and update the data, verification random value and CID in the block; Block insertion operation: This involves inserting a new block into the blockchain. First, extract and modify the data in the header of the block following the insertion position, including the hash value of the previous block and the verification random value. Then, set the hash value of the previous block in the header of the first block of the inserted block to the extracted hash value, and use the Chameleon hash generation function to calculate the hash value of the header of the last block of the inserted block. Finally, update the hash value of the previous block and the verification random value in the header of the block following the insertion position. Block deletion operation: Extract the data of the block to be deleted, record the hash value of the previous block, and then update the hash value of the previous block and the verification random value of the block after the deletion position; Transaction modification operation: After modifying the original data, use the Chameleon Hash modification function to obtain the modified verification random value, and update the data and verification random value in the transaction block; Transaction deletion operation: Modify the data items of the transaction to be deleted to all 0s, use the Chameleon hash modification function to obtain the verification random value in the modified transaction, and update the data and verification random value in the transaction block; The IPFS storage solution design specifically includes: each edit operation of the IPFS storage blockchain, including the edit granularity, edit operation type, current timestamp, editor address, editing location, and the storage content of the block / transaction before the edit. Each edit operation record is merged into a master edit record file that records all edits on the blockchain. Each time a new edit record is added, its CID will be updated. The design of the historical version query and verification process for edit operations includes: IPFS stores records of each edit operation. Nodes perform query and verification operations using the latest CID. The query operation includes: nodes can search in IPFS based on the edit granularity, edit operation type, current timestamp, editor address, hash value of the edit location, or hash value of the storage content of the block / transaction being queried. If no such hash value is found, the node can traverse the IPFS master edit record file for a query. The verification operation includes: nodes search for the identifier of the edit operation to be verified in IPFS. If it exists, the edit operation is verified successfully; otherwise, it fails.

2. The IPFS-based editable blockchain design method according to claim 1, characterized in that, The steps for designing the editable blockchain system specifically include: system initialization, based on security parameters... A PPT generation algorithm based on an asymmetric bilinear pair Obtain the common parameters of the Chameleon Hash Algorithm The CID of the broadcast editor-in-chief's log file and the unique IPNS hash value of the query file table: , in, It is an asymmetric bilinear pair PPT generation algorithm. prime number Cyclic group of order 1 and They are and generator, It is an asymmetric bilinear mapping, with common parameters The hash key and trapdoor key of the Chameleon hash algorithm are obtained through the Chameleon hash key generation function. The hash key can be used to calculate the hash value of data under Chameleon hash and verify the current hash value and the verification random value. The trapdoor key can be used to modify the data in the block and update the verification random value.

3. The IPFS-based editable blockchain design method according to claim 2, characterized in that, The chameleon hash algorithm includes The details are as follows: Chameleon hash key generation function ; Chameleon hash generation function ; Chameleon hash verification function ; Chameleon hash modification function .

4. An editable blockchain design device based on IPFS, characterized in that, The apparatus includes a processor and a memory for storing executable instructions of the processor, the processor being configured to execute the IPFS-based editable blockchain design method as described in any one of claims 1 to 3 by executing the executable instructions.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the IPFS-based editable blockchain design method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Block chain editing method and block chain node

    CN115134069A

  • Lightweight block chain storage method

    CN117556464A