Safe and efficient image data integrity verification method

By using the YOLOv8-MCA algorithm and Logistic chaotic encryption algorithm for privacy protection in image data integrity verification, and combining homomorphic hash function and blockchain technology, the problems of low privacy protection efficiency and large computing overhead in the existing technology are solved, and efficient and secure image data integrity verification is achieved.

CN119720296AActive Publication Date: 2025-03-28BEIJING INST OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510221149.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-03-28
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

Existing image data integrity verification technologies cannot achieve efficient privacy protection, and integrity verification is inefficient and computational overhead.

Method used

A safe and efficient image data integrity verification method is adopted, and the private content in the image is identified and encrypted through YOLOv8-MCA algorithm detection and Logistic chaotic encryption algorithm blurring processing is used to extract feature information, and challenge and response verification is achieved through smart contracts, cloud service providers and distributed oracles.

Benefits of technology

It realizes efficient privacy protection for image data, improves the efficiency and reliability of integrity verification, reduces computing overhead, and enhances the transparency and credibility of the system through the transparency and immutability of blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720296A_ABST
    Figure CN119720296A_ABST
Patent Text Reader

Abstract

The invention discloses a safe and efficient image data integrity verification method, relates to the technical field of information security, and provides a distributed oracle (BO) verification scheme based on a BLS threshold signature, the integrity verification results of all oracle nodes are considered, the integrity verification can be passed only when more than half of the nodes are accepted, and the verification efficiency is improved. And the reliability of the integrity verification result is greatly improved. For the privacy protection requirement brought by the value characteristics of the image data, a two-stage privacy protection scheme is provided, only the image area containing the privacy information instead of the whole image is processed, the privacy protection efficiency is effectively improved, and the privacy security of the image data in the storage process is ensured. In order to solve the efficiency problem caused by massive data partitioning and integration in an existing scheme, a scheme for extracting features of the whole image instead of partitioning the image is provided, and the overall efficiency of the scheme is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a safe and efficient image data integrity verification method. Background Art

[0002] In recent years, with the widespread popularity of smartphones and other mobile terminals, more and more people are able to capture and share the beautiful moments of life at any time through mobile terminals. This phenomenon has led to an explosive growth in the number of images, especially on social media platforms, where the number of image uploads is growing exponentially at an alarming rate each year. By 2023, the number of images stored on mobile terminals is expected to exceed 9.9 trillion. Behind this series of data is a real challenge: with the massive amount of images generated every day, the local storage pressure of mobile devices has risen sharply. In the face of this challenge, more and more companies have launched cloud storage services, and the cloud service industry has shown a good development trend. These services can not only alleviate the pressure of limited local storage space, but also enable data access anytime and anywhere, thus promoting the booming development of cloud storage services. However, storing data on cloud servers also brings many challenges.

[0003] Due to the huge amount of stored data, cloud service providers (CSPs) may delete data that has not been used for a long time for their own benefit to reduce storage costs; in addition, cloud servers may cause data loss or damage due to unexpected circumstances, and CSPs may try to cover up their own mistakes by providing other data for their own benefit. Therefore, in order to effectively deal with the risks brought by dishonest CSPs, adopting a series of integrity verification technologies has become the key to ensuring the security of cloud storage data.

[0004] Existing image data integrity verification technology has two defects: it cannot achieve efficient privacy protection of image data; integrity verification is inefficient and has high computational overhead. Privacy protection of image data means that after users upload personal images to CSP storage, CSP may use advanced data analysis algorithms to analyze the images uploaded by users to mine personal information, infer user behavior patterns and preferences, and provide users with personalized services and accurate advertising recommendations to increase corporate profits. This behavior will cause the private information in the image to be unauthorizedly accessed or maliciously used by third parties, thereby causing the risk of image leakage, illegal intrusion, and abuse of personal information. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a safe and efficient image data integrity verification method, which ensures that the user's image data is securely stored in the cloud without leaking privacy, while also ensuring the efficiency of the integrity verification method.

[0006] To achieve the above object, the present invention provides a safe and efficient method for verifying the integrity of image data, which specifically includes the following steps: Step S1: System initialization includes determining parameters, deploying smart contracts and generating keys. The generated keys include the master key and user key for threshold signature. The smart contract is used to publicly challenge and verify the process on the blockchain. Step S2: In the privacy protection stage, the private content in the image is identified and encrypted through detection based on the YOLOv8-MCA algorithm and fuzzification processing based on the Logistic chaotic encryption algorithm. The YOLOv8-MCA algorithm detects the location coordinates of the private content in the image, and the Logistic chaotic encryption algorithm fuzzifies the area containing the private content, making the private information unrecognizable. Step S3: In the feature processing stage, feature information is extracted from the privacy-preserving image in step S2 through a homomorphic hash function, and the feature information is uploaded to the blockchain storage as the metadata of the image; Step S4: The challenge and response verification phase is implemented through the smart contract SC, the cloud service provider CSP and the distributed oracle BO, where BO periodically triggers SC to generate random challenges, CSP calculates and generates evidence based on the challenges, and BO verifies the integrity of the image data based on the evidence.

[0007] Preferably, in step S1, public parameters of bilinear mapping and elliptic curve are used to ensure the security and effectiveness of the key generation process; Determine the public parameters required for parameter initialization threshold signature. The parameters include two orders: The multiplicative cyclic group of ,in They are The generator of is a bilinear map: , It is a secure one-way hash function; Deploy the contract, deploy the smart contract SC that generates random challenges, and the code of the smart contract is fully public on the blockchain BC; Generate a key for threshold signature, including the following steps: S11: Pick a random number As a master private key And calculate the master public key ; S12: Random selection Polynomial ,satisfy ,in , is the number of BOs; S13: Oracle Apply for threshold key from the system, Private key for threshold signature , public key ; Generating a user key specifically includes the following steps: S1-1: Select an elliptic curve , select the base point ,satisfy The order is ; S1-2: Select a pseudo-random number generation function and a homomorphic hash function ; S1-3: Select As The private key of .

[0008] Preferably, in step S2, the YOLOv8-MCA algorithm in the privacy protection stage improves the detection accuracy of objects of different sizes and shapes by introducing a multi-scale axial attention mechanism. The training process steps of YOLOv8-MCA include data preprocessing, model initialization, forward propagation, loss calculation, back propagation, iterative training, model evaluation and parameter optimization. The privacy protection stage includes the following steps: S21: The user uploads the image to the CSP through the mobile terminal MT before storing it in the CSP. Privacy processing is obtained ; S22: The processed image Upload to CSP for storage.

[0009] Preferably, in step S21, privacy protection includes two sub-stages. The first sub-stage determines whether the image contains privacy content based on the YOLOv8-MCA algorithm: If the image contains private content, the location coordinates of the private content area are output and initiate the second sub-phase; If there is no privacy content, the current stage ends directly; In the second stage, the Logistic chaos encryption algorithm is used to The image area within is blurred, and the correct key is used to remove the blurring effect and restore the original image. The specific formula is as follows: ; in is the current state, is the next state, is the system parameter. The selection of the system parameter determines the behavior pattern of the mapping output. The system parameter between 3.57 and 4.0 ensures the chaotic behavior of the system. In image blurring applications, pixel blocks are rearranged or their properties are changed by iterating this mapping and applying the result to hide information.

[0010] Preferably, in step S2, the image blurring process specifically includes the following steps: S2-1: Determine the location information of the privacy area in the image After that, the area is divided into multiple color block units with a color of 32*32; S2-2: A new chaotic mapping sequence is independently generated for the color block unit system. The generated sequence is highly unpredictable and is uniquely determined under given initial conditions. S2-3: The color channels of the pixels inside the color block are linearized into a one-dimensional array. Based on the chaotic sequences generated by each, the system performs a pixel reordering operation on the one-dimensional array to hide sensitive information in the image. The reordered pixel values ​​are represented by the following mapping relationship: ; in represents the pixel value in the original image, represents the pixel value after blurring. It is a permutation function defined based on chaotic sequence; S2-4: After pixel reordering is completed, all color blocks are reassembled according to their original positions to complete the blurring of the privacy area of ​​the entire image.

[0011] Preferably, in step S3, the following steps are specifically included: S31: MT uses homomorphic hash functions For privacy-protected images Perform feature extraction to obtain feature information ; The homomorphic hash function is of the form ; in represents the numerical representation of the image data, is the selected base, is a large prime number; For any two images and , whose hash value satisfies the properties shown in the following formula: ; ; ; S32: Feature Information After the extraction is complete, Upload to CSP storage.

[0012] Preferably, in step S4, the challenge and response verification phase is divided into a challenge generation phase , Proof Generation Phase , Verification phase and recording phase Four sub-stages, implemented by SC, CSP and BO: During the challenge generation phase, the aggregated BO periodically triggers the SC to generate challenges. , aggregate BO to obtain , after which each BO will Forward to CSP for inquiry; Attestation generation phase, CSP receives challenge , CSP Respond and compute evidence based on stored image data ,in For the challenged image, is a random number, CSP will Send to all BOs; During the verification phase, each BO middle Individually verify the evidence sent by the CSP ,The integrity verification result is negotiated by all BOs and is decided according to the principle of the minority obeys the majority; During the recording phase, BC records the final integrity verification results in the following format: ,in is the set of image indexes to be verified, The result of integrity verification.

[0013] Preferably, the specific steps of the challenge generation phase are as follows: S41: BO scheduled tasks are performed by timers control, Indicates the start time of the triggered task. Indicates the number of Trigger, The specific time point of the trigger Expressed as , at each time point , BO executes the timing function Send a message to SC , this process is expressed as ; S42: SC receives the message , select the number of challenged images For BC The maximum index value of the data, , according to the latest BC block Value calculation , , forming a challenge set ,in is the index set of challenged images, is a set of random numbers; S43: Yes , query feature information BC will challenge and Recorded in the log in the form of ; S44: BO monitors BC to obtain log information , respectively, will challenge Forwarded to CSP.

[0014] Preferably, the verification phase is implemented based on BLS threshold signature, and the specific steps are as follows: S4-1: BO receives evidence sent by CSP , first calculate ; S4-2: BO based on the query in the blockchain ,calculate ; S4-3: Homomorphic properties , BO verification and Are they equal? If the equation holds, output the result for , indicating that the image data is completely stored in the CSP and has not been tampered with; If the equation does not hold, the verification fails and the result is output. for , indicating that the image data has been damaged in the CSP; S4-4: If CSP passes BO verification, BO uses its own threshold signature private key right Calculate the signature And through the secure channel Return to the main BO, and temporarily stored by the BO ; S4-5: The main BO receives BO returned After that, the complete signature is aggregated , The calculation method is shown in the formula: ; S4-6: The main BO is aggregated Later Sent to BC, BC verifies whether the following formula is true Correctness: ; If the verification is successful, this round of integrity verification is successful.

[0015] Preferably, a UMHT index structure is used to improve data retrieval efficiency. UMHT has a double-layer index structure. The first layer is instantiated as a User array, and the second layer structure points to a Merkle tree MHT established for each User. MHT is a tree data structure that constructs a binary tree structure by recursively performing hash calculations on the original data blocks. exist After insertion When inserting a node, it is implemented through the following steps: Step 1: Calculation Building a new node ; Step 2: Find it in MHT , build a new node and will replace location, With new node becomes The child nodes of Step 3: New Node After insertion, update the hash values ​​of all parent nodes on the node path in the MHT; Step 4: MHT root node update completed, new data block Successfully inserted into MHT; Deleting a Node , do the following: (1) Found in MHT and its sibling nodes ; (2) Use replace and The parent node of and delete ; (3) From Start recursively updating the hash values ​​of all parent nodes until the root node of the MHT.

[0016] Therefore, the present invention adopts the above-mentioned safe and efficient image data integrity verification method, which has the following beneficial effects: (1) The present invention proposes a distributed oracle (BO) verification scheme based on BLS threshold signature, which takes into account the integrity verification results of all oracle nodes. Only when it is recognized by more than half of the nodes can it pass the integrity verification, which greatly improves the reliability of the integrity verification results.

[0017] (2) In view of the privacy protection needs brought about by the value characteristics of image data itself, the present invention proposes a two-stage privacy protection scheme, which only processes the image area containing privacy information rather than the entire image, effectively improving the efficiency of privacy protection and ensuring the privacy security of image data during the storage process.

[0018] (3) In order to solve the efficiency problems caused by the large-scale segmentation and integration of data in the existing solutions, the present invention proposes a solution to extract features from the entire image instead of segmenting the image, thereby effectively improving the overall efficiency of the solution.

[0019] (4) To address the problem of slow data query speed in integrity verification schemes, the present invention proposes a data structure based on secondary index, namely User Merkel Hash Tree (UMHT). The primary index of UMHT is initialized as a user array, where each user's array element points to a Merkel tree established for the user, thereby improving data retrieval efficiency while supporting efficient dynamic operations on data.

[0020] (5) The present invention utilizes the transparency, immutability and decentralization characteristics of blockchain to provide a public and permanent audit trail for each verification, thereby enhancing the transparency and credibility of the system as a whole.

[0021] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A system model diagram of a safe and efficient image data integrity verification method of the present invention; Figure 2 It is a flow chart of the safe and traceable data transmission method of the present invention; Figure 3 It is a training flow chart of YOLOv8-MCA in the present invention; Figure 4 It is a flow chart of the image blurring and restoration process in the present invention; Figure 5This is a comparison chart of the time expenditure in the Channel stage of the comparative example of the present invention; Figure 6 This is a time cost comparison chart of the comparative example in the present invention in the Genproof stage; Figure 7 It is an overall flow chart of a safe and efficient image data integrity verification method of the present invention. DETAILED DESCRIPTION

[0023] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0024] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0025] The words "include" or "comprises" and the like used in the present invention mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of also including other elements. The orientation or position relationship indicated by the terms "inside", "outside", "upper", "lower", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation of the present invention. When the absolute position of the described object changes, the relative position relationship may also change accordingly. In the present invention, unless otherwise clearly specified and limited, the terms "attachment" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral body; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] like Figure 1 As shown, a safe and efficient method for verifying the integrity of image data includes the following steps: Step S1: System initialization includes determining parameters, deploying smart contracts and generating keys. The generated keys include the master key and user key for threshold signature. The smart contract is used to publicly challenge and verify the process on the blockchain. In step S1, the public parameters of bilinear mapping and elliptic curve are used to ensure the security and effectiveness of the key generation process; Determine the public parameters required for parameter initialization threshold signature. The parameters include two orders: The multiplicative cyclic group of ,in They are The generator of is a bilinear map: , It is a secure one-way hash function; Deploy the contract, deploy the smart contract SC that generates random challenges, and the code of the smart contract is fully public on the blockchain BC; Generate a key for threshold signature, including the following steps: S11: Pick a random number As a master private key And calculate the master public key ; S12: Random selection Polynomial ,satisfy ,in , is the number of BOs; S13: Oracle Apply for threshold key from the system, Private key for threshold signature , public key ; Generating a user key specifically includes the following steps: S1-1: Select an elliptic curve , select the base point ,satisfy The order is ; S1-2: Select a pseudo-random number generation function and a homomorphic hash function ; S1-3: Select As The private key of .

[0027] Step S2: In the privacy protection stage, the private content in the image is identified and encrypted through detection based on the YOLOv8-MCA algorithm and fuzzification processing based on the Logistic chaotic encryption algorithm. The YOLOv8-MCA algorithm detects the location coordinates of the private content in the image, and the Logistic chaotic encryption algorithm fuzzifies the area containing the private content, making the private information unrecognizable. In step S2, the YOLOv8-MCA algorithm in the privacy protection stage improves the detection accuracy of objects of different sizes and shapes by introducing a multi-scale axial attention mechanism. The training process of YOLOv8-MCA includes data preprocessing, model initialization, forward propagation, loss calculation, back propagation, iterative training, model evaluation and parameter optimization. The privacy protection stage includes the following steps: S21: The user uploads the image to the CSP through the mobile terminal MT before storing it in the CSP. Privacy processing is obtained ; S22: The processed image Upload to CSP for storage.

[0028] In step S21, privacy protection includes two sub-stages. The first sub-stage determines whether the image contains privacy content based on the YOLOv8-MCA algorithm: If the image contains private content, the location coordinates of the private content area are output and initiate the second sub-phase; If there is no privacy content, the current stage ends directly; In the second stage, the Logistic chaos encryption algorithm is used to The image area within is blurred, and the correct key is used to remove the blurring effect and restore the original image. The specific formula is as follows: ; in is the current state, , is the next state, is the system parameter. The selection of the system parameter determines the behavior pattern of the mapping output. The system parameter between 3.57 and 4.0 ensures the chaotic behavior of the system. In image blurring applications, pixel blocks are rearranged or their properties are changed by iterating this mapping and applying the result to hide information.

[0029] In step S2, the image blurring process specifically includes the following steps: S2-1: Determine the location information of the privacy area in the image After that, the area is divided into multiple color block units with a color of 32*32; S2-2: A new chaotic mapping sequence is independently generated for the color block unit system. The generated sequence is highly unpredictable and is uniquely determined under given initial conditions. S2-3: The color channels of the pixels inside the color block are linearized into a one-dimensional array. Based on the chaotic sequences generated by each, the system performs a pixel reordering operation on the one-dimensional array to hide sensitive information in the image. The reordered pixel values ​​are represented by the following mapping relationship: ; in represents the pixel value in the original image, represents the pixel value after blurring. It is a permutation function defined based on chaotic sequence; S2-4: After pixel reordering is completed, all color blocks are reassembled according to their original positions to complete the blurring of the privacy area of ​​the entire image.

[0030] Step S3: In the feature processing stage, feature information is extracted from the privacy-preserving image in step S2 through a homomorphic hash function, and the feature information is uploaded to the blockchain storage as the metadata of the image; In step S3, the following steps are specifically included: S31: MT uses homomorphic hash functions For privacy-protected images Perform feature extraction to obtain feature information ; The homomorphic hash function is of the form ; in represents the numerical representation of the image data, is the selected base, is a large prime number; For any two images and , whose hash value satisfies the properties shown in the following formula: ; ; ; S32: Feature Information After the extraction is complete, Upload to CSP storage.

[0031] Step S4: The challenge and response verification phase is implemented through the smart contract SC, the cloud service provider CSP and the distributed oracle BO, where BO periodically triggers SC to generate random challenges, CSP calculates and generates evidence based on the challenges, and BO verifies the integrity of the image data based on the evidence.

[0032] In step S4, the challenge and response verification phase is divided into the challenge generation phase , Proof Generation Phase , Verification phase and recording phase Four sub-stages, implemented by SC, CSP and BO: During the challenge generation phase, the aggregated BO periodically triggers the SC to generate challenges. , aggregate BO to obtain , after which each BO will Forward to CSP for inquiry; Attestation generation phase, CSP receives challenge , CSP Respond and compute evidence based on stored image data ,in For the challenged image, is a random number, CSP will Send to all BOs; During the verification phase, each BO middle Individually verify the evidence sent by the CSP ,The integrity verification result is negotiated by all BOs and is decided according to the principle of the minority obeys the majority; During the recording phase, BC records the final integrity verification results in the following format: ,in is the set of image indexes to be verified, The result of integrity verification.

[0033] The specific steps of the challenge generation phase are as follows: S41: BO scheduled tasks are performed by timers control, Indicates the start time of the triggered task. Indicates the number of Trigger, The specific time point of the trigger Expressed as , at each time point , BO executes the timing function Send a message to SC , this process is expressed as ; S42: SC receives the message , select the number of challenged images For BC The maximum index value of the data, , according to the latest BC block Value calculation , , forming a challenge set ,in is the index set of challenged images, is a set of random numbers; S43: Yes , query feature information BC will challenge and Recorded in the log in the form of ; S44: BO monitors BC to obtain log information , respectively, will challenge Forwarded to CSP.

[0034] The verification phase is implemented based on BLS threshold signature. The specific steps are as follows: S4-1: BO receives evidence sent by CSP , first calculate ; S4-2: BO based on the query in the blockchain ,calculate ; S4-3: Homomorphic properties , BO verification and Are they equal? If the equation holds, output the result for , indicating that the image data is completely stored in the CSP and has not been tampered with; If the equation does not hold, the verification fails and the result is output. for , indicating that the image data has been damaged in the CSP; S4-4: If CSP passes BO verification, BO uses its own threshold signature private key right Calculate the signature And through the secure channel Return to the main BO, and temporarily stored by the BO ; S4-5: The main BO receives BO returned After that, the complete signature is aggregated , The calculation method is shown in the formula: ; S4-6: The main BO is aggregated Later Sent to BC, BC verifies whether the following formula is true Correctness: ; If the verification is successful, this round of integrity verification is successful.

[0035] The UMHT index structure is used to improve data retrieval efficiency. UMHT has a two-layer index structure. The first layer is instantiated as a User array, and the second layer structure points to a Merkle tree MHT established for each User. MHT is a tree data structure that constructs a binary tree structure by recursively hashing the original data block. exist After insertion When inserting a node, it is implemented through the following steps: Step 1: Calculation Building a new node ; Step 2: Find it in MHT , build a new node and will replace location, With new node becomes The child nodes of Step 3: New Node After insertion, update the hash values ​​of all parent nodes on the node path in the MHT; Step 4: MHT root node update completed, new data block Successfully inserted into MHT; Deleting a Node , do the following: (1) Found in MHT and its sibling nodes ; (2) Use replace and The parent node of and delete ; (3) From Start recursively updating the hash values ​​of all parent nodes until the root node of the MHT.

[0036] Example This embodiment is used to detect whether the image data cloud server is complete, including four entities: Mobile Terminal (MT): As the source of image upload, it includes devices such as smartphones and tablets. Given the relatively small storage capacity of these devices, users usually need to upload images to CSP to free up local storage space. During the upload process, the mobile terminal performs a series of preprocessing tasks, such as privacy protection and image feature extraction, to optimize storage efficiency while protecting the privacy of user data.

[0037] Cloud service provider (CSP): CSP is a cloud computing platform with powerful storage and computing resources, mainly responsible for providing data storage services. As a semi-honest entity, CSP will respond to the query request from the blockchain smart contract, calculate the evidence required for integrity verification and return the evidence to BO. On the other hand, for its own interests, CSP may spy on and mine user privacy information, and conceal the loss and damage of data from users. The responsibilities of CSP in the system mainly consist of two aspects: on the one hand, it serves as a data storage party, and on the other hand, it needs to calculate evidence to respond to integrity verification queries.

[0038] Blockchain Oracle (BO): BO is the key bridge between BC and CSP. Aggregate Oracle regularly triggers blockchain smart contracts through scheduled tasks to generate integrity verification challenges for image data stored in CSP. Aggregate Oracle is regularly elected and replaced through the Oracle network. Each oracle node receives evidence independently from CSP and compares it with the image feature information stored in the blockchain. All oracle nodes collectively decide the final integrity verification result through a decentralized consensus mechanism based on BLS threshold signatures. Once a consensus is reached, the verification result will be uploaded to the blockchain for public display. This distributed verification method not only improves the transparency and credibility of the verification process, but also enhances the system's resistance to single point failures and malicious attacks.

[0039] Blockchain (BC): BC plays a vital role in the system. First, BC is responsible for storing the feature information extracted before the image is uploaded, providing basic data for integrity verification. When the BO scheduled task is triggered, the blockchain smart contract will generate an integrity verification challenge and forward the challenge to the CSP through BO. During the integrity verification process, each BO compares and verifies the evidence provided by the CSP with the image feature information on the blockchain. The verification results are then recorded and saved on the blockchain, providing an open, transparent and unchangeable verification result record for the entire system, thereby ensuring the integrity and transparency of the system.

[0040] Define two orders as The multiplicative cyclic group of ,in They are The generator of Take 256 bits, and p takes a 256-bit random prime number). and are all secure, collision-resistant one-way hash functions, where (Elliptic curve hash function required in BLS signature), h uses SHA-256 secure hash function. Select a random number As a master private key And calculate the master public key The number of BOs N is 100. =51. Then Private key for threshold signature , public key .

[0041] Assume that there is an MT in the system, and MT performs privacy protection on the uploaded image set I. Assume that there are 100 data blocks in set I. MT first uses the YOLOv8-MCA algorithm to detect whether the image contains private content. If the image contains private content, it outputs the location coordinates of the private content area. The second sub-stage is started, and MT uses the Logistic chaos encryption algorithm to further process the identified target area to achieve a blurring effect. After the privacy protection process, 100 new blocks can be obtained, which are recorded as .

[0042] MT uses homomorphic hash functions For privacy-protected images Perform feature extraction to obtain feature information After feature information extraction is completed, Upload to CSP storage. , used to extract feature information from privacy-protected images, where Represents the numerical representation of image data, here we take is 1024 bits, and the base Also take 1024 bits.

[0043] BO triggers the smart contract at a certain time point t, and the smart contract generates the result After receiving the message, SC selects 460 challenge images. , according to the latest BC block Value calculation , , which ultimately constitutes the challenge set After BO obtains Chal, it sends it to CSP. CSP Respond and compute evidence based on stored image data , then BO performs the integrity verification algorithm to output the result.

[0044] The simulation test is carried out in go language, and some cryptographic operations are implemented with the help of crypto library. The elliptic curve function is constructed by BIST P256, and HMAC-SHA256 is selected to implement HMAC(). They are all 256 bits. Correspondingly, the RSA cryptographic system is 3072 bits. The operating system for the simulation test is Ubuntu 16.04.12 64bit, the CPU is Inteli7-8750H (2.5GHz), and the memory is 24GB.

[0045] Comparative Example In order to verify the effectiveness of the secure and efficient image data auditing scheme proposed in this invention, the computational overhead of this scheme and the computational overhead of two similar schemes, PATHAT and BCM, are simulated and compared. Figure 5 Figure 6 shown.

[0046] exist Figure 5 In the example, the challenge data blocks are increased from 50 to 500. The time cost of the challenge phase of the present invention and the other two schemes is compared. In the steps, this scheme has obvious computational advantages. Compared with the BCM scheme, the time overhead of this scheme increases linearly with the increase of the number of challenge blocks, and the growth rate is significantly lower than that of the BCM scheme. Compared with the PATHAT scheme, although the growth rate of this scheme is basically the same, the time overhead under different numbers of challenge blocks is significantly lower than that of the PATHAT scheme. It can be concluded that it has excellent performance.

[0047] exist Figure 6 In the comparison, the settings are Figure 5 The experimental results show that In the steps, this scheme has obvious computational advantages over PATHAT and BCM. At the same time, the time overhead of this scheme increases linearly with the increase of the number of challenge blocks, and the growth rate is significantly lower than that of PATHAT and BCM. When the number of challenge blocks reaches 500, the time overhead of this scheme is about 100ms lower than that of PATHAT, which proves that this scheme still has high performance when facing large-scale integrity challenges.

[0048] in conclusion When the adversary attempts to launch a replacement attack, due to the anti-collision property of the hash function and the negligible probability of cracking the random function, this scheme can resist the replacement attack.

[0049] When the adversary attempts to launch a forgery attack, since the probability of cracking the random function can be ignored and the probability of solving the CDH difficulty problem can be ignored, this scheme can resist the forgery attack.

[0050] When the adversary attempts to launch a substitution attack, the adversary does not know the data block, nor the private key of the user's signature. When the probability of the signature algorithm being cracked is negligible, the adversary cannot pass the verification. Therefore, this scheme can resist substitution attacks.

[0051] Therefore, the present invention adopts the above-mentioned safe and efficient image data integrity verification method, introduces a distributed oracle verification scheme based on BLS threshold signature, improves the reliability of the verification result, and through a two-stage privacy protection strategy, only processes the image area containing privacy information, thereby effectively improving the privacy protection efficiency and ensuring the privacy security of image data stored in the cloud; proposes a solution for extracting the overall features of the image without blocking, optimizes the processing efficiency, and accelerates the data query speed through the user Merkle hash tree structure to support efficient dynamic operations.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A safe and efficient method for verifying the integrity of image data, characterized in that: The specific steps include: Step S1: System initialization includes determining parameters, deploying smart contracts and generating keys. The generated keys include the master key and user key for threshold signature. The smart contract is used to publicly challenge and verify the process on the blockchain. Step S2: In the privacy protection stage, the private content in the image is identified and encrypted through detection based on the YOLOv8-MCA algorithm and fuzzification processing based on the Logistic chaotic encryption algorithm. The YOLOv8-MCA algorithm detects the location coordinates of the private content in the image, and the Logistic chaotic encryption algorithm fuzzifies the area containing the private content, making the private information unrecognizable. Step S3: In the feature processing stage, feature information is extracted from the privacy-preserving image in step S2 through a homomorphic hash function, and the feature information is uploaded to the blockchain storage as the metadata of the image; Step S4: The challenge and response verification phase is implemented through the smart contract SC, the cloud service provider CSP and the distributed oracle BO, where BO periodically triggers SC to generate random challenges, CSP calculates and generates evidence based on the challenges, and BO verifies the integrity of the image data based on the evidence.

2. A safe and efficient method for verifying the integrity of image data according to claim 1, characterized in that: In step S1, the public parameters of bilinear mapping and elliptic curve are used to ensure the security and effectiveness of the key generation process; Determine the public parameters required for parameter initialization threshold signature. The parameters include two orders: The multiplicative cyclic group of ,in They are The generator of is a bilinear map: , It is a secure one-way hash function; Deploy the contract, deploy the smart contract SC that generates random challenges, and the code of the smart contract is fully public on the blockchain BC; Generate a key for threshold signature, including the following steps: S11: Pick a random number As a master private key And calculate the master public key ; S12: Random selection Polynomial ,satisfy ,in , is the number of BOs; S13: Oracle Apply for threshold key from the system, Private key for threshold signature , public key ; Generating a user key specifically includes the following steps: S1-1: Select an elliptic curve , select the base point ,satisfy The order is ; S1-2: Select a pseudo-random number generation function and a homomorphic hash function ; S1-3: Select As The private key of .

3. A safe and efficient method for verifying the integrity of image data according to claim 1, characterized in that: In step S2, the YOLOv8-MCA algorithm in the privacy protection stage improves the detection accuracy of objects of different sizes and shapes by introducing a multi-scale axial attention mechanism. The training process of YOLOv8-MCA includes data preprocessing, model initialization, forward propagation, loss calculation, back propagation, iterative training, model evaluation and parameter optimization. The privacy protection stage includes the following steps: S21: The user uploads the image to the CSP through the mobile terminal MT before storing it in the CSP. Privacy processing is obtained ; S22: The processed image Upload to CSP for storage.

4. A safe and efficient method for verifying the integrity of image data according to claim 3, characterized in that: In step S21, privacy protection includes two sub-stages. The first sub-stage determines whether the image contains privacy content based on the YOLOv8-MCA algorithm: If the image contains private content, the location coordinates of the private content area are output and initiate the second sub-phase; If there is no privacy content, the current stage ends directly; In the second stage, the Logistic chaos encryption algorithm is used to The image area within is blurred, and the correct key is used to remove the blurring effect and restore the original image. The specific formula is as follows: ; in is the current state, is the next state, is the system parameter. The selection of the system parameter determines the behavior pattern of the mapping output. The system parameter between 3.57 and 4.0 ensures the chaotic behavior of the system. In image blurring applications, pixel blocks are rearranged or their properties are changed by iterating this mapping and applying the result to hide information.

5. A safe and efficient method for verifying the integrity of image data according to claim 4, characterized in that: In step S2, the image blurring process specifically includes the following steps: S2-1: Determine the location information of the privacy area in the image After that, the area is divided into multiple color block units with a color of 32*32; S2-2: A new chaotic mapping sequence is independently generated for the color block unit system. The generated sequence is highly unpredictable and is uniquely determined under given initial conditions. S2-3: The color channels of the pixels inside the color block are linearized into a one-dimensional array. Based on the chaotic sequences generated by each, the system performs a pixel reordering operation on the one-dimensional array to hide sensitive information in the image. The reordered pixel values ​​are represented by the following mapping relationship: ; in represents the pixel value in the original image, represents the pixel value after blurring. It is a permutation function defined based on chaotic sequence; S2-4: After pixel reordering is completed, all color blocks are reassembled according to their original positions to complete the blurring of the privacy area of ​​the entire image.

6. A safe and efficient method for verifying the integrity of image data according to claim 5, characterized in that: In step S3, the following steps are specifically included: S31: MT uses homomorphic hash functions For privacy-protected images Perform feature extraction to obtain feature information ; The homomorphic hash function is of the form ; in represents the numerical representation of the image data, is the selected base, is a large prime number; For any two images and , whose hash value satisfies the properties shown in the following formula: ; ; ; S32: Feature Information After the extraction is complete, Upload to CSP storage.

7. A safe and efficient method for verifying the integrity of image data according to claim 6, characterized in that: In step S4, the challenge and response verification phase is divided into the challenge generation phase , Proof Generation Phase , Verification phase and recording phase Four sub-stages, implemented by SC, CSP and BO: During the challenge generation phase, the aggregated BO periodically triggers the SC to generate challenges. , aggregate BO to obtain , after which each BO will Forward to CSP for inquiry; Attestation generation phase, CSP receives challenge , CSP Respond and compute evidence based on stored image data ,in For the challenged image, is a random number, CSP will Send to all BOs; During the verification phase, each BO middle Individually verify the evidence sent by the CSP ,The integrity verification result is negotiated by all BOs and is decided according to the principle of the minority obeys the majority; During the recording phase, BC records the final integrity verification results in the following format: ,in is the set of image indexes to be verified, The result of integrity verification.

8. A safe and efficient method for verifying image data integrity according to claim 7, characterized in that: The specific steps of the challenge generation phase are as follows: S41: BO scheduled tasks are performed by timers control, Indicates the start time of the triggered task. Indicates the number of Trigger, The specific time point of the trigger Expressed as , at each time point , BO executes the timing function Send a message to SC , this process is expressed as ; S42: SC receives the message , select the number of challenge images For BC The maximum index value of the data, , according to the latest BC block Value calculation , , forming a challenge set ,in is the index set of challenged images, is a set of random numbers; S43: Yes , query feature information BC will challenge and Recorded in the log in the form of ; S44: BO monitors BC to obtain log information , respectively, will challenge Forwarded to CSP.

9. A safe and efficient method for verifying image data integrity according to claim 7, characterized in that: The verification phase is implemented based on BLS threshold signature. The specific steps are as follows: S4-1: BO receives evidence sent by CSP , first calculate ; S4-2: BO based on the query in the blockchain ,calculate ; S4-3: Homomorphic properties , BO verification and Are they equal? If the equation holds, output the result for , indicating that the image data is completely stored in the CSP and has not been tampered with; If the equation does not hold, the verification fails and the result is output. for , indicating that the image data has been damaged in the CSP; S4-4: If CSP passes BO verification, BO uses its own threshold signature private key right Calculate the signature And through the secure channel Return to the main BO, and temporarily stored by the BO ; S4-5: The main BO receives BO returned After that, the complete signature is aggregated , The calculation method is shown in the formula: ; S4-6: The main BO is aggregated Later Sent to BC, BC verifies whether the following formula is true Correctness: ; If the verification passes, this round of integrity verification is successful.

10. A safe and efficient method for verifying image data integrity according to claim 7, characterized in that: The UMHT index structure is used to improve data retrieval efficiency. UMHT has a two-layer index structure. The first layer is instantiated as a User array, and the second layer structure points to a Merkle tree MHT established for each User. MHT is a tree data structure that constructs a binary tree structure by recursively hashing the original data block. exist After insertion When inserting a node, it is implemented through the following steps: Step 1: Calculation Building a new node ; Step 2: Find it in MHT , build a new node and will replace location, With new node becomes The child nodes of Step 3: New Node After insertion, update the hash values ​​of all parent nodes on the node path in the MHT; Step 4: MHT root node update completed, new data block Successfully inserted into MHT; Deleting a Node , do the following: (1) Found in MHT and its sibling nodes ; (2) Use replace and The parent node of and delete ; (3) From Start recursively updating the hash values ​​of all parent nodes until the root node of the MHT.

Citation Information

Patent Citations

  • Social picture privacy protection method and device for a YOLO detector

    CN111144274A

  • Cloud data integrity verification method and system, terminal equipment and storage medium

    CN111339572A

  • Privacy protection method for carrying out encrypted image retrieval in block chain

    CN111651779A

  • Image integrity recognition method and device, computer equipment and storage medium

    CN114328990A

  • Block chain assisted privacy protection image retrieval method

    CN114579787A