Data integrity auditing method based on smart contract in edge environment

By using smart contracts for data integrity auditing in an edge computing environment, the problem of data integrity not being guaranteed is solved, and efficient and accurate data integrity verification and damaged data block location are achieved, improving audit efficiency and decentralization.

CN118487787BActive Publication Date: 2026-03-17CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In highly distributed edge computing environments, data integrity cannot be effectively guaranteed. Existing technologies cannot efficiently verify data integrity or accurately locate damaged data blocks.

Method used

Data integrity auditing is performed using smart contracts. Verification tags are generated by randomly selecting private keys from cloud servers. The edge server with the lowest resource utilization is selected as the auditor. A continuous doubling algorithm is used to reduce the amount of signature computation, and an improved binary search algorithm is used to locate damaged data blocks.

Benefits of technology

It achieves highly accurate and efficient data integrity auditing, can accurately locate damaged data blocks, reduce the computational burden on servers, and improve the degree of decentralization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118487787B_ABST
    Figure CN118487787B_ABST
Patent Text Reader

Abstract

The application claims a data integrity auditing strategy based on smart contract in an edge environment, comprising the following steps: S1: uniformly block the original data, calculate the hash value of each data block, and upload the data to the edge server; S2: generate a key pair, calculate the verification label of each data block, and upload the verification label to the verification label storage smart contract; S3: select the edge server with the lowest current resource utilization as the auditor of this work, and the cloud server initiates a data integrity auditing challenge to the auditor; S4: generate a random number k, and generate a signature for each data block, and send the signature of the data block and the random number k to the auditor; S5: the integrity auditing smart contract detects the integrity of the edge data, and determines whether the integrity of the edge data is damaged; S6: if the audit is passed, the auditor directly returns the audit result to the cloud server; otherwise, execute the data block positioning smart contract to find out the damaged data block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing data storage, and in particular to edge data integrity detection methods and methods for locating damaged data blocks. Background Technology

[0002] Mobile edge computing allows data to be cached on edge servers closer to users, thus providing effective low-latency guarantees for latency-sensitive applications. While meeting users' low-latency needs, high-quality data is also fundamental to ensuring the quality of edge computing services; data integrity is one of the core indicators of high-quality data.

[0003] However, in highly distributed edge computing environments, the integrity of data cached in edge servers is often compromised, whether intentionally or unintentionally, making it impossible to guarantee data integrity and affecting user experience.

[0004] Therefore, how to effectively and efficiently verify data integrity in edge environments is a critical and challenging issue.

[0005] CN115208629B discloses a data integrity verification method based on smart contracts, relating to the field of information security technology. It addresses issues such as data loss during storage by the CSP and inadequate auditing by the TPA, as well as the inability to achieve fair payment during integrity verification. The method involves users uploading encrypted data blocks to the CSP and a set of data block tags to the TPA. During auditing, the TPA and CSP synchronize a set of random sequences using a chaotic system. The CSP selects data blocks for verification based on the random sequence and generates integrity evidence. The TPA calculates verification tags based on the random sequence and compares them with the integrity evidence to generate an audit result. The TPA sends the audit result, data block verification tags, and random sequence to the blockchain. The CSP sends the integrity evidence and random sequence to the blockchain, triggering a smart contract. The smart contract compares the sent tagged blocks and determines whether the user should pay fees to the CSP and TPA based on the comparison result. Furthermore, it requires the CSP and TPA to pay fees to the user if the CSP or TPA falsifies data or audit results.

[0006] Although this patent uses smart contracts, the data integrity verification process is completed by a third-party certification authority (TPA), and the smart contract ultimately reviews the verification results. This invention directly uses smart contracts to audit data integrity without the involvement of a TPA. Compared to patent CN115208629B, this invention achieves higher decentralization and a less cumbersome audit process while ensuring high credibility and accuracy of the audit results. Secondly, this patent uses a continuous doubling algorithm to reduce the computational load of the underlying doubling operation in the signature algorithm, thus achieving higher audit efficiency than patent CN115208629B. Finally, patent CN115208629B only verifies data integrity and does not locate damaged data blocks when data integrity fails, while this invention can accurately locate damaged data blocks when data integrity audit fails, thus making the invention more comprehensive. Summary of the Invention

[0007] This invention aims to solve the problems of the prior art mentioned above. It proposes a data integrity auditing method based on smart contracts in edge environments. The technical solution of this invention is as follows:

[0008] A data integrity auditing method based on smart contracts in an edge environment includes the following steps:

[0009] S1: The cloud server divides the original data F into uniform blocks F = {m1, m2, m3…m}. n}, where m represents a data block. Here, it is assumed that the data F is divided into n data blocks. The hash value of each data block is calculated, h(F) = {h(m1), h(m2), h(m3) ... h(mn2)}. n )}, and upload the data F to the edge server;

[0010] S2: The cloud server randomly selects a private key d, calculates the corresponding public key PK, and performs corresponding operations on the hash value of the data block using the private key d to obtain the verification tag of each data block. The verification tag is then uploaded to the verification tag storage smart contract.

[0011] S3: Select the edge server with the lowest current resource utilization as the auditor for this task. The cloud server initiates a data integrity audit challenge to the auditor. After receiving the challenge, the auditor forwards the challenge information to the edge server to be audited.

[0012] S4: The edge server that receives the challenge generates a random number k and a signature for each data block, and sends the signature and random number k of the data block to the auditor;

[0013] S5: Integrity Audit The smart contract audits the integrity of edge data to determine whether the integrity of edge data has been compromised.

[0014] S6: If the audit passes, the auditor will directly return the audit results to the cloud server; if the audit fails, the data block location smart contract will be executed to find the damaged data block.

[0015] Furthermore, in step S2, the step of calculating the data block verification label specifically includes:

[0016] S21. The cloud server randomly selects a private key d, d∈[1,n1-1], and calculates the corresponding public key PK=d·G, where n1 is the order of the curve Ed25519 and G is the base point of the curve Ed25519;

[0017] S22. Assuming the data is divided into n blocks, the hash value of the j-th data block is h(m j );

[0018] S23. Generate a new intermediate value using the public key and the hash value of the data block. The intermediate value is calculated using the sha256 algorithm, and the calculation formula is as follows:

[0019] e j =sha256(PK,h(m) j ))modn1#(1)

[0020] S24. Perform calculations using the private key and the intermediate value to obtain the verification tag for this data block. The formula for calculating the verification tag is:

[0021] t j =e j ·d#(2).

[0022] Furthermore, in step S3, the step of selecting the auditor for this audit is specifically as follows:

[0023] S31. Calculate the CPU utilization of consensus nodes in a blockchain network using the following formula:

[0024]

[0025] S32. Calculate the memory usage rate of consensus nodes in a blockchain network using the following formula:

[0026]

[0027] S33. Calculate the resource utilization rate of consensus nodes in the blockchain network. The formula for calculating the resource utilization rate is:

[0028] Resource utilization rate = CPU utilization rate × 50% + Memory utilization rate × 50% #(5)

[0029] S34. Select the node with the lowest resource utilization rate as the auditor for this audit.

[0030] Furthermore, in step S4, the generation of the data block signature includes the following steps:

[0031] S41. The edge server generates a random number k, k∈[1,n1-1], where n1 is the order of the curve ed25519;

[0032] S42. The edge server performs a doubling operation on the base point G on the curve using a random number k to obtain the commitment R;

[0033] S43. Suppose that the signature s of the j-th data block of edge server i is required. ij The formula for calculating the signature is:

[0034] s ij =R+e ij ·PK#(6)

[0035] Where e ij =sha256(PK,h(m) j ))mod n1.

[0036] Furthermore, in step S5, the step of determining whether the integrity of the edge data is compromised specifically involves:

[0037] S51. The integrity audit smart contract takes a random number k and the verification label of the original data as input, and uses the EdDSA (Edwards Curve Signature Algorithm) signature algorithm to generate a signature for the original data.

[0038] S52. The integrity audit smart contract performs calculations on the signature and the base point G on the curve;

[0039] S53. Assume a signature is generated for data block j: s j =t j +k=e j ·d+k;

[0040] S54. If the edge data integrity verification passes, then the following equation holds:

[0041] s j ·G=(t j +k)·G=(e j ·d+k)·G=s ij =R+e ij ·PK (7)

[0042] S55. Convert the equality check here to a value 0 check: that is, if the integrity verification passes, the following formula must be true:

[0043] (e j ·d+k)·GRe ij·PK=0#(8)

[0044] S56. Extending the validation of one data block to the validation of all data blocks results in:

[0045] [(e1+e2+···+e n )·d+nk]·G-nR-(e i1 +e i2 +···+e in )·PK=0#(9)

[0046] Here, e is generated from the original data block, e = {e1, e2, e3…e} n};e i Generated from all data blocks on edge server i, e i ={e i1 ,e i2 ,e i3 …e in};

[0047] S57. The integrity audit smart contract subtracts the calculation result from the verification evidence. If the value is 0, the integrity verification passes; otherwise, it fails.

[0048] Furthermore, in step S6, if the integrity audit fails, the specific steps for locating the damaged data block are as follows:

[0049] S61. If the data integrity audit fails, then (e·d+k)·GRe i The value of PK is definitely not 0; let's assume the result of the equation is Q.

[0050] S62. If the data integrity audit fails, the integrity audit smart contract will send the signature of the original data and the signature of the edge data to the data block positioning smart contract;

[0051] S63. Assuming the batch verification value N of all data blocks is the parent node, divide all data blocks into two equal parts with the same number of blocks, using the middle position as the split point. The batch audit result of the left half is the left child node N. - The audit result for the right half is the right child node N. + ;

[0052] S64. Re-verify the signatures of the left half of the data blocks in batches to see if they pass the data integrity verification;

[0053] S65. If the verification result of the left half of the data block is Q, then all the damaged data blocks are in the left half, because the batch audit result of the right half must be N. + =NN _=QQ=0; If the verification result of the left half of the data block is 0, then all the damaged data blocks are in the right half, for the same reason; If the verification result of the left half of the data block is Q1, then the batch audit result of the right half must be Q-Q1; Repeat the above steps until all damaged data blocks are found.

[0054] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements a smart contract-based data integrity auditing method in an edge environment as described in any one of the claims.

[0055] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a data integrity auditing method based on smart contracts in an edge environment as described in any one of the claims.

[0056] A computer program product includes a computer program that, when executed by a processor, implements a smart contract-based data integrity auditing method in an edge environment as described in any one of the claims.

[0057] The advantages and beneficial effects of this invention are as follows:

[0058] This invention can accurately detect whether the data stored on the edge server is complete, and can effectively avoid third-party replay attacks and forgery attacks, ensuring the accuracy of the detection results. It can also accurately locate the damaged data block when the integrity test fails.

[0059] This invention designs three smart contracts, which serve as executors for verifying tag storage, data integrity auditing, and locating damaged data blocks, respectively, thereby improving the decentralization of the auditing process. Furthermore, because the smart contracts are all deployed on a blockchain network, which is characterized by immutability, irreversibility, and high efficiency, this invention uses smart contracts to improve the accuracy and reliability of the audit results.

[0060] Step S4 of this invention uses a continuous doubling algorithm, which reduces the computational load of the underlying doubling operation of the EdDSA signature algorithm, alleviates the computational burden on the server, and improves the auditing efficiency of data integrity.

[0061] Step S6 of this invention employs an improved binary search algorithm, which transforms the equality judgment of the digital signature verification formula into a zero-value judgment. Without affecting the accuracy of the audit results, this reduces the batch verification in the process of locating damaged data blocks by nearly half, thereby improving the efficiency of the damaged data block location process. Attached Figure Description

[0062] Figure 1 This is a flowchart illustrating a preferred embodiment of the present invention;

[0063] Figure 2 This is a network architecture diagram of the present invention;

[0064] Figure 3 This is a flowchart illustrating the processing of edge data integrity auditing strategies. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.

[0066] The technical solution of the present invention to solve the above-mentioned technical problems is:

[0067] like Figure 1 As shown, this invention provides a data integrity auditing strategy based on smart contracts in an edge environment, including the following steps:

[0068] S1, The cloud server divides the original data F into uniform blocks F = {m1, m2, m3…m…} n}, where m represents a data block. Here, it is assumed that the data F is divided into n data blocks. The hash value of each data block is calculated, h(F) = {h(m1), h(m2), h(m3) ... h(mn2)}. n )}, and upload the data F to the edge server;

[0069] S2: The cloud server randomly selects a private key d and calculates the corresponding public key PK. Then, it uses the private key d to perform corresponding calculations on the hash value of the data block to obtain the verification tag for each data block, and uploads the verification tag to the verification tag storage smart contract.

[0070] S3: Select the edge server with the lowest current resource utilization (CPU utilization and memory utilization) as the auditor for this task. The cloud server initiates a data integrity audit challenge to the auditor. After receiving the challenge, the auditor forwards the challenge information to the edge server to be audited.

[0071] S4: The edge server that receives the challenge generates a random number k and a signature for each data block, and sends the signature and random number k of the data block to the auditor;

[0072] S5: Integrity Audit The smart contract audits the integrity of edge data to determine whether the integrity of edge data has been compromised.

[0073] S6: If the audit passes, the auditor directly returns the test results to the cloud server; if the audit fails, the data block location smart contract is executed to find the damaged data block. By using smart contracts in the blockchain network to execute the data integrity audit process, the audit process is contractualized and decentralized, improving the credibility of the audit results. Furthermore, the continuous doubling algorithm reduces the computational load of generating digital signatures, improving audit efficiency and alleviating the server's computational burden. The equivalence judgment in the digital signature verification formula is transformed into a zero-value judgment, further improving the efficiency of the damaged data block location process.

[0074] In this embodiment, in step S2, the verification tag of the original data block is calculated using the following method:

[0075] S21. The cloud server randomly selects a private key d, d∈[1,n1-1], and calculates the corresponding public key PK=d·G. Where n1 is the order of curve Ed25519, and G is the base point of curve Ed25519;

[0076] S22. Assuming the data is divided into n blocks, the hash value of the j-th data block is h(m j );

[0077] S23. Generate a new intermediate value using the public key and the hash value of the data block. The intermediate value is calculated using the sha256 algorithm, and the calculation formula is as follows:

[0078] e j =sha256(PK,h(m) j ))mod n1#(1)

[0079] S24. Perform calculations using the private key and the intermediate value to obtain the verification tag for this data block. The formula for calculating the verification tag is:

[0080] t j =e j ·d#(2)

[0081] S25. Upload the verification tag to the storage smart contract.

[0082] The storage smart contract functions as follows: It primarily receives and stores verification tags issued by the cloud server. If this server is selected as the auditor, it forwards the verification tag to the local integrity audit smart contract upon receiving an integrity audit challenge.

[0083] In this embodiment, in step S3, the auditor for this audit is selected using the following method:

[0084] S31. Calculate the CPU utilization of consensus nodes in a blockchain network using the following formula:

[0085]

[0086] S32. Calculate the memory usage rate of consensus nodes in a blockchain network using the following formula:

[0087]

[0088] S33. Calculate the resource utilization rate of consensus nodes in the blockchain network. The formula for calculating the resource utilization rate is:

[0089] Resource utilization rate = CPU utilization rate × 50% + Memory utilization rate × 50% #(5)

[0090] S34. Select the node with the lowest resource utilization rate as the auditor for this audit.

[0091] In this embodiment, the data block signature generation process in step S4 is as follows:

[0092] S41. The edge server generates a random number k, k∈[1,n1-1], where n1 is the order of the curve ed25519;

[0093] S42. The edge server performs a doubling operation on the base point G on the curve using a random number k to obtain the commitment R. The generation process of this signature will use a large number of doubling operations. Here, a continuous doubling algorithm is used to reduce the computational cost of doubling operations:

[0094] Suppose two points P1 and P2 lie on the curve ed25519, P1 = (x1, y1), P2 = (-x2, y2), and P1 + P2 = (x3, y3). The point addition formula is:

[0095]

[0096] When P1 = P2, the above formula still holds. In this case, simply replace the sums x2 and y2 with the sums x1 and y1 respectively, and you get the doubling formula:

[0097]

[0098] From the curve equation x 2 +y 2 =1+dx 2 y 2 and 2-(x 2 +y 2 )=1-dx 2 y 2 By replacing 'd' in the formula, we get the following formula:

[0099]

[0100] Calculate 2 based on P = (x1, y1). m P=2 m (x1, y1) requires m doubling operations. Each of these m doubling operations involves two time-consuming inverse operations. To reduce computation, the continuous doubling algorithm (CDA) is used. This algorithm unifies the doubling formula, requiring only two inverse operations to calculate 2. m P.

[0101] Algorithm principle: Assume that 2 is known m-1 P = (A m-1 / B m-1 C m-1 / D m-1 Then calculate the consecutive multiples of 2. m P and 2 m+1 The formulas for P are as follows:

[0102]

[0103]

[0104] The following connections can be derived from the above:

[0105] A m =2A m-1 B m-1 C m-1 D m-1 #(11)

[0106] B m =(A m-1 D m-1 ) 2 +(B m-1 C m-1 ) 2 #(12)

[0107] C m = (B m-1 C m-1 ) 2 -(A m-1 D m-1 ) 2 #(13)

[0108] D m =2(B m-1 D m-1 ) 2 -B m #(14)

[0109] In a single doubling operation loop, only four multiplication operations and three exponentiation operations are required, with two inversion operations performed only in the final doubling operation.

[0110] S43. Suppose that the signature s of the j-th data block of edge server i is required. ij The formula for calculating the signature is:

[0111] s ij =R+e ij ·PK#(15)

[0112] Where e ij =sha256(PK,h(m) j ))modn1.

[0113] In this embodiment, in step S5, it is determined whether the integrity of the edge data is compromised according to the following method:

[0114] S51. The integrity audit smart contract takes a random number k and a verification label of the original data as input and uses EdDSA (Edwards Curve Signature Algorithm) to generate a signature for the original data.

[0115] The functions of the integrity audit smart contract are as follows: After receiving the random number k and the verification tag, the integrity audit smart contract is responsible for generating a signature for the original data and comparing the signature of the original data with the signature of the edge data to determine whether the integrity of the edge data is compromised. If so, the signature of the original data and the signature of the edge data are forwarded to the local data block positioning smart contract.

[0116] S52. The integrity audit smart contract performs calculations on the signature and the base point G on the curve;

[0117] S53. Assume a signature is generated for data block j: s j =t j +k=e j ·d+k;

[0118] S54. If the edge data integrity audit passes, the following equation should hold:

[0119] s j ·G=(t j +k)·G=(e j ·d+k)·G=s ij =R+e ij ·PK (16)

[0120] S55. Convert the equivalence judgment here to a value 0 judgment: that is, if the integrity audit passes, the following formula must be true:

[0121] (e j·d+k)·GRe ij ·PK=0#(17)

[0122] S56. Extending the validation of one data block to the validation of all data blocks results in:

[0123] [(e1+e2+···+e n )·d+nk]·G-nR-(e i1 +e i2 +···+e in )·PK=0#(18)

[0124] Here, e is generated from the original data block, e = {e1, e2, e3…e} n};e i Generated from all data blocks on edge server i, e i ={e i1 ,e i2 ,e i3 …e in};

[0125] S57. The integrity audit smart contract subtracts the signature of the original data from the signature of the edge data. If the value is 0, the integrity audit passes; otherwise, it fails.

[0126] In this embodiment, in step S6, if the integrity audit fails, the damaged data block is located according to the following method:

[0127] S61. If the data integrity audit fails, then [(e1+e2+···+e n )·d+nk]·G-nR-(e i1 +e i2 +···+e in The value of PK is definitely not 0. Let's assume the result of the equation is Q.

[0128] S62. If the data integrity audit fails, the integrity audit smart contract will send the signature of the original data and the signature of the edge data to the data block positioning smart contract.

[0129] The data block location smart contract has the following function: The contract uses an improved binary search algorithm to generate a binary search tree from top to bottom, starting from the root node, until all the damaged data blocks are located. The specific steps of the improved binary search algorithm are shown in the following steps.

[0130] S63. Assuming the batch verification value N of all data blocks is the parent node, divide all data blocks into two equal parts with the same number of blocks, using the middle position as the split point. The batch audit result of the left half is the left child node N. -The audit result for the right half is the right child node N. + ;

[0131] S64. Re-verify the signatures of the left half of the data blocks in batches to see if they pass the data integrity verification;

[0132] S65. If the verification result of the left half of the data block is Q, then all the damaged data blocks are in the left half, because the batch audit result of the right half must be N. + =NN - =QQ=0; If the verification result of the left half of the data block is 0, then all the damaged data blocks are in the right half, for the same reason. If the verification result of the left half of the data block is Q1, then the batch audit result of the right half must be Q-Q1. Repeat the above steps until all damaged data blocks are found.

[0133] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0134] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0136] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A method for data integrity auditing based on smart contract in edge environment, characterized in that, The method comprises the following steps: S1: the cloud server uniformly divides the original data F into blocks , m represents the data block, it is assumed that the data F is divided into n data blocks, the hash value of each data block is calculated, , and the data F is uploaded to the edge server; S2: the cloud server randomly selects a private key d, calculates a corresponding public key PK, and performs a corresponding operation on the hash value of the data block by using the private key d to obtain a verification tag of each data block, and uploads the verification tag to a verification tag storage smart contract; S3: selecting an edge server with the lowest current resource usage as an auditor of this work, and the cloud server initiates a data integrity audit challenge to the auditor, and the auditor forwards the challenge information to the edge server to be audited after receiving the challenge; S4: the edge server receiving the challenge generates a random number k and generates a signature for each data block, and sends the signature of the data block and the random number k to the auditor; S5: the integrity audit smart contract audits the integrity of the edge data, and determines whether the integrity of the edge data is damaged; S6: if the audit passes, the auditor directly returns the audit result to the cloud server; if the audit fails, a data block positioning smart contract is executed to find out the damaged data block; In the step S2, the step of calculating the data block verification tag is specifically: S21. The cloud server randomly selects a private key d, and obtains the corresponding public key where n1 is the order of the curve Ed25519, and G is the base point of the curve Ed25519. S22. Assuming the data is divided into n blocks, the hash value of the jth data block is ; S23. generating a new intermediate value by using the public key and the hash value of the data block, the intermediate value being calculated by a sha256 algorithm, and the calculation formula being: ; S24. performing an operation on the intermediate value by using the private key to obtain the verification tag of the data block, and the calculation formula of the verification tag being: ; In the step S4, the generation of the data block signature comprises the following steps: S41. The edge server generates a random number k, n1is the order of the curve ed25519; S42. performing a point multiplication operation on the base point G on the curve by using the random number k to obtain a commitment R; S43. Assume that the signature s of the jth data block of the edge server i is required ij The calculation formula of the signature is: ; wherein ; In the step S5, the step of determining whether the integrity of the edge data is damaged is specifically: S51. the integrity audit smart contract generates a signature for the original data by using EdDSA as the input of the random number k and the verification tag of the original data; S52. the integrity audit smart contract performs an operation on the signature and the base point G on the curve; S53. Generate a signature for the data block j, assuming: ; S54. if the integrity verification of the edge data passes, the following equation is established: = ; S55. converting the equal value judgment in this place into a value 0 judgment: if the integrity verification passes, the following formula must be established: ; S56. deriving the verification of one data block to the verification of all data blocks, and then: ; where e is generated from the original data block, ; generated from all data blocks on edge server i, ; S57. the integrity audit smart contract subtracts the operation result from the verification evidence, and if the value is 0, the integrity verification passes, otherwise, it does not pass. 2.The method of claim 1, wherein, In the step S3, the step of selecting the auditor of this audit work is specifically: S31. calculating the CPU usage rate of the consensus node in the blockchain network, and the formula is: ; S32. calculating the memory usage rate of the consensus node in the blockchain network, and the formula is: ; S33. calculating the resource usage rate of the consensus node in the blockchain network, and the calculation formula of the resource usage rate is: ; S34. selecting the node with the lowest resource usage rate as the auditor of this audit work. 3.The method of claim 1, wherein, In the step S6, if the integrity audit fails, the step of locating the damaged data block is specifically: S61. If the data integrity audit fails, then the value of Q must not be 0, assuming the result of this equation is Q; S62. if the data integrity audit fails, the integrity audit smart contract sends the signature of the original data and the signature of the edge data to the data block positioning smart contract; S63. Assuming the batch verification value N of all data blocks is the parent node, all data blocks are divided into two parts with equal number of blocks by the middle position as the split point, and the batch audit result of the left half part is the left child node , and the audit result of the right half part is the right child node ; S64. Re-bulk verify the signature of the left half data block, see if it passes data integrity verification; S65. If the verification result of the left half data block is Q, then the damaged data block is all in the left half, because the batch audit result of the right half must be ; If the verification result of the left half data block is 0, the damaged data block is all in the right half, and the reason is the same; if the verification result of the left half data block is , the batch audit result of the right half must be ; repeat the above steps until all damaged data blocks are found.

4. An electronic device, comprising: A computer program product comprising a memory, a processor, and a computer program stored on the memory and loadable on the processor, the processor implementing the method for smart contract based data integrity auditing in edge environment according to any one of claims 1 to 3 when executing the program.

5. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program product is executed by the processor to implement the method for smart contract based data integrity auditing in edge environment according to any one of claims 1 to 3.

6. A computer program product comprising a computer program, characterized in that, The computer program product is executed by the processor to implement the method for smart contract based data integrity auditing in edge environment according to any one of claims 1 to 3. The computer program product is executed by the processor to implement the method for smart contract based data integrity auditing in edge environment according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data integrity verification method based on smart contracts

    CN115208629B

  • Data integrity detection method based on green computing consensus mechanism block chain in edge computing

    CN112738090A

  • Data integrity verification method based on smart contract

    CN115208629A