A blockchain-based cloud-edge collaborative IoT data sharing method
By adopting blockchain and cloud-edge collaboration technology in the IoT data sharing system and combining ring signature technology, the problems of identity privacy leakage, inefficiency and single point of failure in IoT data sharing are solved, and efficient, secure and reliable data sharing is achieved.
Patent Information
- Application Number
- CN202410318558.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-03-20
AI Technical Summary
There are problems of identity privacy leakage, inefficiency and single point of failure in IoT data sharing.
The blockchain-based cloud-edge collaborative IoT data sharing method is adopted to work together through the collaborative work of key generation center, blockchain, edge server and cloud server, and ring signature technology is used to protect the identity privacy of data owners, and improve the security and reliability of the system through distributed storage and aggregation verification.
It effectively protects the identity privacy of the data owner, improves the efficiency and security of data sharing, and avoids the risk of a single point of failure.
Smart Images

Figure CN118174875B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data sharing, and in particular to a cloud-edge collaborative Internet of Things data sharing method based on blockchain. Background Art
[0002] IoT devices generate massive amounts of data every day. Transmitting private data to specific IoT devices can be combined with intelligent platforms to help in areas such as scientific research and business decision-making. However, the existing IoT data sharing mechanism is underdeveloped and fraught with various privacy and security issues. For example, traditional cloud-based centralized data sharing methods not only exhibit high latency and lack of trust, but also often lead to privacy leaks. In addition, current methods often lack measures to protect the identity privacy of data owners, which in turn makes it easy for attackers to link more privacy through identity information after data owners share data, exacerbating their concerns about sensitive data leaks.
[0003] Blockchain, with its decentralized, tamper-proof, and auditable characteristics, offers a promising solution for promoting trust in IoT systems and enhancing the security of data sharing. First, blockchain uses distributed technology, with data maintained by multiple nodes and no central trust authority. This decentralized nature can build trust between different entities and eliminate the need for intermediaries, thereby promoting more direct and efficient data sharing and avoiding single point failure issues. Second, as a natural transaction settlement ledger, all data transaction information is recorded on the blockchain, which can be effectively monitored and audited. Third, most blockchain technologies support smart contracts, which are code snippets that automatically trigger actions under certain conditions. This feature helps simplify the processing of IoT data sharing.
[0004] However, it is undeniable that the storage capacity of blockchain itself is limited. For example, each block can only contain 1mb of data at most. This constraint makes blockchain only suitable for storing concise data, such as information related to data sharing requests, system parameters, and public keys. For encrypted private data, it is more appropriate to store it off-chain. In addition, due to its open and transparent nature, blockchain cannot provide reliable identity privacy protection for data owners.
[0005] The scalability problem of blockchain can be effectively solved by utilizing the low latency of edge servers and the huge storage capacity of cloud servers. Therefore, the cloud-edge collaboration model based on blockchain has become a feasible solution for IoT data sharing. Blockchain can establish trust in the distributed system of cloud-edge collaboration, thereby enhancing the overall security and credibility of the system. At the same time, the cloud-edge collaboration system can overcome the scalability challenges often encountered in blockchain technology. Cloud-edge collaboration based on blockchain can complement and restrict each other to jointly build a more secure, reliable, efficient and scalable IoT data sharing method; while ring signature is an unconditionally anonymous identity authentication algorithm that can effectively protect the identity privacy of users in distributed systems, but traditional ring signature schemes often have too high computational and communication costs, and require an authoritative certificate authority to generate certificates for public keys, which brings greater computational and storage overheads, and is not suitable for IoT devices with limited computing and storage resources.
[0006] Identity privacy leakage, inefficiency and single point failure in IoT data sharing are technical issues that need to be solved. Summary of the invention
[0007] The technical task of the present invention is to address the above shortcomings and provide a cloud-edge collaborative IoT data sharing method based on blockchain to solve the technical problems of identity privacy leakage, inefficiency and single point failure in IoT data sharing.
[0008] The present invention provides a cloud-edge collaborative IoT data sharing method based on blockchain, which is applied between a key generation center, a blockchain, an edge server, a cloud server, a data owner, and a data requester. The method comprises the following steps:
[0009] System initialization: The key generation center generates system public parameters and its own private key and public key, and stores the system public parameters and public key in the blockchain;
[0010] User registration: Data owners and data request groups submit registration requests to the key generation center as users. Based on the user's registration information in the registration request, the key generation center allocates and returns public and private keys to the verified users, where the registration information includes the user ID that uniquely represents the user.
[0011] Data upload: The data owner encrypts its private data based on the symmetric key to generate ciphertext, builds a public key set and a user ID set based on its own and other data owners' public keys and user IDs, calculates a ring signature based on the public key set, user ID set and ciphertext to generate a ciphertext ring signature that can be linked without a certificate, sends the ciphertext, ciphertext-for-signature and data label to the edge server, and the edge server performs aggregate verification on the ciphertext ring signature. For the verified ciphertext ring signature, the ring signature and data label are stored in the blockchain, the corresponding ciphertext and data label are sent to the cloud server, and the corresponding symmetric key is divided into multiple key fragments. The ring signature is calculated based on the public key set, user ID set and key fragment to generate a key ring signature that can be linked without a certificate, and the key fragment, key ring signature and data label are sent to the edge server. The edge server performs aggregate verification on the key ring signature. For the verified key ring signature, the key fragment and data label are stored in multiple edge servers, and the data label is linked to the ciphertext stored in the cloud server;
[0012] Data request: For the data request submitted by the data requester, if the corresponding data tag exists in the blockchain, the data request is recorded through the blockchain. After the cloud server and the edge server monitor the data request from the blockchain, the cloud server searches for the corresponding ciphertext and returns it to the data requester, and the edge server searches for the corresponding key fragment and returns it to the data requester. After receiving a predetermined number of key fragments, the data requester forms a symmetric key and decrypts the ciphertext based on the symmetric key.
[0013] Preferably, data uploading includes the following steps:
[0014] Ciphertext generation: The data owner encrypts its private data using a symmetric encryption algorithm based on a symmetric key to generate ciphertext;
[0015] Ciphertext ring signature: The data owner selects multiple other data owners, builds a set of public key sets and user ID sets based on its own and other owners' public keys and user IDs, calculates the ring signature based on the public key set, user ID set and ciphertext, and generates a ring signature that cannot be linked to a certificate as a ciphertext ring signature;
[0016] Ciphertext upload: The data owner sends the ciphertext, ciphertext ring signature, and data label to the edge server;
[0017] Ciphertext ring signature aggregation verification: After receiving the ciphertext, ciphertext ring signature and data label of multiple data owners, the edge service server aggregates the ciphertext ring signature of the data owner to obtain the aggregated ciphertext signature, and performs signature verification based on the ciphertext, public key set and user ID set of the data owner. For the ciphertext ring signature that passes the verification, the ciphertext ring signature and data label are stored in the blockchain, and the corresponding ciphertext and data label are sent to the cloud server;
[0018] Key fragment distribution: After the data owner monitors its ciphertext ring signature and data label from the blockchain, the corresponding symmetric key is divided into multiple key fragments, and a ring signature is performed based on the key fragment and the public key set and user ID set selected when signing its ciphertext ring signature. A certificate-free linkable ring signature is generated as a key ring signature, and the key fragment, key ring signature and data label are sent to the edge server;
[0019] Key ring signature aggregation verification: After the edge service server receives the key fragments, key ring signatures and data tags of multiple data owners, it aggregates the signatures of the data owners' key ring signatures to obtain the aggregated key signatures, and performs signature verification based on the data owners' key fragments, public key sets and user ID sets. For the verified key ring signatures, the key fragments and data tags are stored in multiple edge servers, and a link is established with the ciphertext stored in the cloud server based on the data tags.
[0020] Preferably, user registration includes the following steps:
[0021] Define User U i The user ID is ID i ∈{0,1} * ;
[0022] UserU i Random Selection And perform the following calculation:
[0023] Q i =H1(ID i ),
[0024] X i =x i Q i ,
[0025] Y i =x i P;
[0026] UserU i (ID i ,Q i ,X i ) is sent to the key generation center as registration information;
[0027] The key generation center is based on (ID i ,Q i ,X i ) authenticates the user and verifies whether the user has been registered. If the user has been registered, the key generation center rejects the user U i If the registration application is not registered, the key generation center randomly selects R i ∈G1, and perform the following calculation:
[0028]
[0029]
[0030] The key generation center will Package and send to user U i ;
[0031] For User U i , public key PK i =X i , private key
[0032] in, is a finite field of integers, P is a generator of the G1 group, and G1 is an additive cyclic group.
[0033] Preferably, the ring signature calculation based on the public key set, the user ID set and the ciphertext generates a ciphertext ring signature linkable without a certificate, including the following steps:
[0034] Data Owner π Random Selection And perform the following calculation:
[0035] T π =H4(Q π ),
[0036] I π =x π T π ,
[0037]
[0038] D π =h 1π (d π +h 2π )I π Q π ;
[0039] Data Owner π Randomly select D i∈G1,i={1,2,π-1,π+1,.....n}, and perform the following calculation to obtain the ring signature as the ciphertext ring signature σ:
[0040]
[0041] h 3π =H3(c||L ID ||L PK ||h Dπ ),
[0042]
[0043]
[0044] Among them, k represents the symmetric key, c represents the ciphertext, and the public key set L PK ={PK1,PK2,…,PK n}, user ID set L ID ={ID1,ID2,…,ID n}.
[0045] Preferably, the edge server performs aggregate verification on the ciphertext ring signature, including the following steps:
[0046] After receiving the ciphertext, ciphertext ring signature, and data label from the data owner, the edge server performs the following calculations:
[0047]
[0048] Aggregate the ciphertext ring signature into And perform the following calculation:
[0049]
[0050] The validity of the ciphertext ring signature is verified based on the following equation:
[0051]
[0052] P0=sP,
[0053] If the equations are equal, the verification is successful and all ciphertext ring signatures are valid. If the equations are not equal, the validity of each ciphertext ring signature is verified according to the following equation:
[0054] e(V j ,P)=e(h' 3j D j ,P0),
[0055] For the verified ciphertext ring signature, the edge server stores the ciphertext ring signature and data label in the blockchain, and sends the corresponding ciphertext and data label to the cloud server. For the ciphertext ring signature that fails to pass the verification, it is deleted;
[0056] Among them, P0 is the public key of the key generation center, s is the private key of the key generation center,
[0057] Preferably, dividing the symmetric key into a plurality of key fragments comprises the following steps:
[0058] Data Owner π After monitoring its own signature and data tag on the blockchain, select a set of random prime numbers that satisfy r0 <r1<r2<…<r w , r0>k, and the following conditions are met:
[0059]
[0060]
[0061] f=k+Ar0,
[0062] Among them, A is a prime number and satisfies 0≤f≤R;
[0063] Data Owner π Calculate f b =modr b ,b∈(1,2,…,w),(b,f b ) as a key fragment;
[0064] Correspondingly, the ring signature calculation based on the public key set, user ID set and key fragment generates a key ring signature without certificate linkability, including the following steps:
[0065] Data Owner π Select the public key set L constructed when uploading the data PK ={PK1,PK2,…,PK n} and ID set L ID ={ID1,ID2,…,ID n}, and randomly select Perform the following calculations:
[0066]
[0067]
[0068]
[0069]
[0070] Data Owner π Random Selection Perform the following calculation to generate a ring signature as the key ring signature σ:
[0071]
[0072]
[0073]
[0074]
[0075] Data Owner π Randomly select w edge servers to send the key fragment (b, f b ), data tags and ring signatures Distribute to w edge servers.
[0076] Preferably, the edge server performs aggregate verification on the key ring signature, including the following steps:
[0077] The edge server receives the key fragment (b,f b ), data tags and key ring signatures Then, perform the following calculation:
[0078]
[0079] Aggregate the keyring signature into And perform the following calculation:
[0080]
[0081] The validity of the keyring signature is verified based on the following equation:
[0082]
[0083] If the equations are equal, the verification is successful and all keyring signatures are valid. If the equations are not equal, the validity of each keyring signature is verified according to the following equation:
[0084]
[0085] For a verified ring signature, the edge server executes the linking algorithm to verify Is it true? If so, the link is successful, and the key fragment stored in the edge server is linked to the ciphertext stored in the cloud server;
[0086] The edge server sends the key fragment (b,f b) and data tags are stored together, and the key ring signatures that fail verification are deleted.
[0087] Preferably, the data request comprises the following steps:
[0088] The data requester initiates a data request to the blockchain. The blockchain retrieves the data tag specified in the data request based on the smart contract. If it exists, the data request is stored in the blockchain.
[0089] After the cloud server monitors the data request in the blockchain, it searches for the corresponding ciphertext based on the data tag specified in the data request and sends the ciphertext to the data requester;
[0090] After the edge server monitors the data request in the blockchain, it searches for the corresponding key fragment based on the data tag specified in the data request and sends the key fragment to the data requester;
[0091] After receiving the ciphertext and at least t key fragments, the data requester solves the following congruence equations:
[0092] f≡f1modr1,
[0093] f≡f2modr2, ...
[0094] f≡f t mod r t ;
[0095] The data requester solves f from the equations and enters the following calculation to obtain the symmetric key:
[0096] k1 = f mod r0;
[0097] Decrypt the ciphertext using the obtained symmetric k1 to obtain the plaintext.
[0098] The cloud-edge collaborative IoT data sharing method based on blockchain of the present invention has the following advantages:
[0099] 1. Identity privacy protection: The data owner encrypts its private data based on the symmetric key to generate ciphertext, builds a set of public key sets and user ID sets, generates a certificate-free linkable ring signature based on the public key set and user ID set, and sends the ciphertext, ring signature, and data label corresponding to the private data to the edge server. After the edge server aggregates and verifies the ring signature of the data owner, the data owner fragments its symmetric key and generates a certificate-free linkable ring signature based on the selected public key set, ID set, and key fragments, and sends the key fragments, ring signature, and data label to the edge server. The edge server links the key fragments and the ciphertext stored in the cloud server. Based on the ring signature, the identity privacy of the data owner is protected during the data sharing process. The real identity of the data owner is hidden in the ring and cannot be identified by attackers, thereby preventing attackers from inferring more of the data owner's privacy through identity linking attacks.
[0100] 2. Efficient anonymous identity authentication: Compared with traditional ring signature schemes, ring signatures without certificates have lower computing and communication costs, making them easier to deploy on resource-constrained IoT devices. In addition, verifiers can aggregate multiple signatures together for batch verification, greatly improving verification efficiency.
[0101] 3. Decentralized data sharing: It does not rely on additional trusted third parties. Data sharing requests are recorded on the blockchain. Blockchain nodes are deployed on edge servers. Even if some edge servers are paralyzed, the system can still operate normally, which can effectively avoid single point failure attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0103] The present invention is further described below in conjunction with the accompanying drawings.
[0104] Figure 1 This is a flowchart of a cloud-edge collaborative IoT data sharing method based on blockchain in Example 1;
[0105] Figure 2 This is a structural block diagram of the system model in a cloud-edge collaborative IoT data sharing method based on blockchain in Example 1. DETAILED DESCRIPTION
[0106] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0107] The embodiment of the present invention provides a cloud-edge collaborative IoT data sharing method based on blockchain, which is used to solve the technical problems of identity privacy leakage, low efficiency and single point failure in IoT data sharing.
[0108] Embodiment 1:
[0109] The present invention discloses a cloud-edge collaborative IoT data sharing method based on blockchain, which is applied between a key generation center, a blockchain, an edge server, a cloud server, a data owner and a data requester. The method includes four steps: system initialization, user registration, data upload and data request.
[0110] Step S100 System initialization: The key generation center generates system public parameters and its own private key and public key, and stores the system public parameters and public key in the blockchain.
[0111] In this embodiment, the key generation center generates the system public parameter PP, which is expressed as follows:
[0112] PP={q,G1,G2,e,P,H1,H2,H3,H4},
[0113] Where q is a large prime number, G1 is a q-order additive cyclic group, P is the generator of the G1 group, G2 is a multiplicative cyclic group, e is a bilinear pairing: e: G1×G2→G2, H1, H2, H3, H4 are four collision-resistant hash functions, specifically:
[0114] H1:{0,1} * →G1
[0115] H2:
[0116] H3:
[0117] H4:
[0118] Key generation center is randomly selected As its private key, P0=sP is calculated as its public key. The key generation center stores the system public parameters and its public key on the blockchain and keeps its private key secret.
[0119] Step S200 user registration: the data owner and the data request group submit a registration request to the key generation center as a user. Based on the user's registration information in the registration request, the key generation center allocates and returns a public key and a private key to the verified user, where the registration information includes a user ID that uniquely represents the user.
[0120] As a specific implementation of user registration, user registration includes the following steps:
[0121] (1) Define user U i The user ID is ID i ∈{0,1} * ;
[0122] (2) User U i Random Selection And perform the following calculation:
[0123] Q i =H1(ID i ),
[0124] X i =x i Q i ,
[0125] Y i =x i P;
[0126] (3) User U i (ID i ,Q i ,X i ) is sent to the key generation center as registration information;
[0127] (4) The key generation center is based on (ID i ,Q i ,X i ) authenticates the user and verifies whether the user has been registered. If the user has been registered, the key generation center rejects the user U i If the registration application is not registered, the key generation center randomly selects R i ∈G1, and perform the following calculation:
[0128]
[0129]
[0130] (5) The key generation center will Package and send to user U i ;
[0131] (6) For user U i , public key PKi =X i , private key
[0132] in, is a finite field of integers, P is a generator of the G1 group, and G1 is an additive cyclic group.
[0133] Step S300 data upload: the data owner encrypts its private data based on the symmetric key to generate a ciphertext, builds a public key set and a user ID set based on its own public key and user ID of other data owners, performs ring signature calculation based on the public key set, user ID set and ciphertext to generate a ciphertext ring signature that is linkable without a certificate, sends the ciphertext, the ciphertext signature and the data tag to the edge server, the edge server performs aggregate verification on the ciphertext ring signature, stores the ring signature and the data tag in the blockchain for the verified ciphertext ring signature, sends the corresponding ciphertext and data tag to the cloud server, and divides the corresponding symmetric key into multiple key fragments, performs ring signature calculation based on the public key set, user ID set and key fragment to generate a key ring signature that is linkable without a certificate, sends the key fragment, the key ring signature and the data tag to the edge server, the edge server performs aggregate verification on the key ring signature, stores the key fragment and the data tag in multiple edge servers for the verified key ring signature, and links the key to the ciphertext stored in the cloud server based on the data tag.
[0134] In this embodiment, data uploading includes six steps: ciphertext generation, ciphertext ring signature, ciphertext uploading, ciphertext ring signature aggregate verification, key fragment distribution and key ring signature aggregate verification.
[0135] Ciphertext generation: The data owner encrypts his private data based on the symmetric key and the symmetric encryption algorithm to generate ciphertext.
[0136] As a specific implementation of ciphertext generation, the data owner U π Based on the symmetric key k, the private data is encrypted using the symmetric key algorithm to obtain the ciphertext c.
[0137] Ciphertext ring signature: The data owner selects multiple other data owners, builds a set of public key sets and user ID sets based on his or her own and other owners' public keys and user IDs, calculates the ring signature based on the public key set, user ID set and ciphertext, and generates a ring signature that cannot be linked to a certificate as the ciphertext ring signature.
[0138] As a specific implementation, the ciphertext ring signature includes the following steps:
[0139] (1) Data Owner U π Choose a set of public keys L PK ={PK1,PK2,…,PKn} and identity ID set L ID ={ID1,ID2,…,ID n};
[0140] (2) Data Owner U π Random Selection And perform the following calculation:
[0141]
[0142] I π =x π T π ,
[0143]
[0144] D π =h 1π (d π +h 2π )I π Q π ;
[0145] (3) Data Owner U π Randomly select D i ∈G1,i={1,2,π-1,π+1,…n}, and perform the following calculation to obtain the ring signature as the ciphertext ring signature σ:
[0146]
[0147] h 3π =H3(c||L ID ||L PK ||h Dπ ),
[0148]
[0149]
[0150] Ciphertext upload: The data owner sends the ciphertext, ciphertext ring signature, and data label to the edge server.
[0151] As a specific implementation, the data owner U π Generate a ciphertext ring signature without a certificate link The ciphertext, ciphertext ring signature and data label are sent to the edge server, where the data label is a unique identifier assigned by the data owner to his private data.
[0152] Ciphertext ring signature aggregation verification: After the edge service server receives the ciphertext, ciphertext ring signature and data label of multiple data owners, it aggregates the ciphertext ring signature of the data owner to obtain the aggregated ciphertext signature, and performs signature verification based on the data owner's ciphertext, public key set and user ID set. For the ciphertext ring signature that passes the verification, the ciphertext ring signature and data label are stored in the blockchain, and the corresponding ciphertext and data label are sent to the cloud server.
[0153] As a specific implementation, the ciphertext ring signature aggregate verification includes the following steps:
[0154] (1) After receiving the ciphertext, ciphertext ring signature, and data label from the data owner, the edge server performs the following calculation:
[0155]
[0156] (2) Aggregate the ciphertext ring signature into And perform the following calculation:
[0157]
[0158] (3) Verify the validity of the ciphertext ring signature based on the following equation:
[0159]
[0160] P0=sP,
[0161] If the equations are equal, the verification is successful and all ciphertext ring signatures are valid. If the equations are not equal, the validity of each ciphertext ring signature is verified according to the following equation:
[0162] e(V j ,P)=e(h' 3j D j ,P0),
[0163] (4) For the ciphertext ring signature that has passed verification, the edge server stores the ciphertext ring signature and data label in the blockchain, and sends the corresponding ciphertext and data label to the cloud server. For the ciphertext ring signature that has not passed verification, it is deleted.
[0164] Key fragment distribution: After the data owner monitors its ciphertext ring signature and data label from the blockchain, the corresponding symmetric key is divided into multiple key fragments, and a ring signature is performed based on the key fragment and the public key set and user ID set selected when signing its ciphertext ring. A certificate-free linkable ring signature is generated as a key ring signature, and the key fragment, key ring signature and data label are sent to the edge server.
[0165] As a specific implementation, key fragment distribution includes the following steps:
[0166] (1) Data Owner U π After monitoring its own signature and data tag on the blockchain, select a set of random prime numbers that satisfy r0 <r1<r2<…<r w , r0>k, and the following conditions are met:
[0167]
[0168]
[0169] f=k+Ar0,
[0170] Among them, A is a prime number and satisfies 0≤f≤R;
[0171] (2) Data Owner U π Calculate f b =modr b ,b∈(1,2,…,w),(b,f b ) as a key fragment;
[0172] (3) Data Owner U π Select the public key set L constructed when uploading the data PK ={PK1,PK2,…,PK n} and ID set L ID ={ID1,ID2,…,ID n}, and randomly select Perform the following calculations:
[0173]
[0174]
[0175]
[0176]
[0177] (4) Data Owner U π Random Selection Perform the following calculation to generate a ring signature as the key ring signature σ:
[0178]
[0179]
[0180]
[0181]
[0182] (5) Data Owner U π Randomly select w edge servers to send the key fragment (b, f b ), data tags and ring signatures Distribute to w edge servers.
[0183] Key ring signature aggregation verification: After the edge service server receives the key fragments, key ring signatures and data tags of multiple data owners, it aggregates the signatures of the data owners' key ring signatures to obtain the aggregated key signatures, and performs signature verification based on the data owners' key fragments, public key sets and user ID sets. For the verified key ring signatures, the key fragments and data tags are stored in multiple edge servers, and a link is established with the ciphertext stored in the cloud server based on the data tags.
[0184] As a specific implementation, key ring signature aggregation verification includes the following steps:
[0185] (1) The edge server receives the key fragment (b, f b ), data tags and key ring signatures Then, perform the following calculation:
[0186]
[0187] (2) Aggregate the key ring signature into And perform the following calculation:
[0188]
[0189] (3) Verify the validity of the key ring signature based on the following equation:
[0190]
[0191] If the equations are equal, the verification is successful and all keyring signatures are valid. If the equations are not equal, the validity of each keyring signature is verified according to the following equation:
[0192]
[0193] (4) For the verified ring signature, the edge server executes the linking algorithm to verify Is it true? If so, the link is successful, and the key fragment stored in the edge server is linked to the ciphertext stored in the cloud server;
[0194] (5) The edge server sends the key fragment (b, f b ) and data tags are stored together, and the key ring signatures that fail verification are deleted.
[0195] Step S400 data request: For the data request submitted by the data requester, if there is a corresponding data tag in the blockchain, the data request is recorded through the blockchain. After the cloud server and the edge server monitor the data request from the blockchain, the cloud server searches for the corresponding ciphertext and returns it to the data requester, and the edge server searches for the corresponding key fragment and returns it to the data requester. After receiving a predetermined number of key fragments, the data requester forms a symmetric key and decrypts the ciphertext based on the symmetric key.
[0196] The data request includes the following steps:
[0197] (1) The data requester initiates a data request to the blockchain. The blockchain retrieves the data tag specified in the data request based on the smart contract. If it exists, the data request is stored in the blockchain.
[0198] (2) After the cloud server monitors the data request in the blockchain, it searches for the corresponding ciphertext based on the data tag specified in the data request and sends the ciphertext to the data requester;
[0199] (3) After the edge server monitors the data request in the blockchain, it searches for the corresponding key fragment based on the data tag specified in the data request and sends the key fragment to the data requester;
[0200] (4) After receiving the ciphertext and at least t key fragments, the data requester solves the following congruence equations:
[0201] f≡f1modr1,
[0202] f≡f2modr2, ...
[0203] f≡f t mod r t ;
[0204] (5) The data requester solves f from the equations and performs the following calculation to obtain the symmetric key:
[0205] k1 = f mod r0;
[0206] Decrypt the ciphertext using the obtained symmetric k1 to obtain the plaintext.
[0207] In this embodiment, the data requester accesses a nearby edge server and uses a smart contract to retrieve IoT data resources based on data tags. After retrieving the data of interest, the data requester records the data sharing request on the block.
[0208] The cloud server monitors the blockchain in real time. When a new data sharing request is found, the cloud server sends the corresponding ciphertext to the data requester. When the edge server notices a new data sharing request on the blockchain, it first searches whether it has the corresponding key fragment. If not, it does not perform any operation. If it does, it sends the key fragment to the data requester through a secure channel. The cloud and edge work together to provide efficient and reliable data sharing. After the data requester receives the ciphertext and at least t key fragments, it solves the above congruence equations. The data requester solves f from the equations and calculates the symmetric key. The ciphertext is decrypted using the solved symmetric key to obtain the plaintext data.
[0209] The method of this embodiment involves a key generation center, a blockchain, an edge server, a cloud server, a data owner, and a data requester as a system model. The model is divided into three layers: a user layer, a service layer, and a storage layer. Figure 2 shown.
[0210] User layer: The user layer is mainly composed of data owners and data requesters. Data owners are IoT devices that provide data, such as sensors, smart bracelets, etc. Their computing and storage resources are limited and they cannot store a large amount of private data. Data owners encrypt private data using a symmetric encryption algorithm and upload it to the cloud server for storage through the edge server. Data requesters access the edge server and use the smart contract deployed on the blockchain to retrieve the data they are interested in. When they find the data they are interested in, they record the data sharing request on the blockchain. The data sharing request recorded on the blockchain cannot be tampered with and can be used for auditing and supervision.
[0211] Service layer: The service layer is mainly composed of edge servers, key generation centers, and blockchains. The key generation center is only responsible for generating keys for users, helping users register, and ensuring the security and effectiveness of the password system. It does not participate in the data sharing process. As a distributed ledger, blockchain brings trust to distributed systems. Blockchain nodes are deployed on edge servers. Edge servers are close to IoT devices and can provide low-latency data processing and response, enabling real-time applications and services to access data and other information faster. Edge servers are mainly responsible for identity authentication, forwarding ciphertext and key fragments, and even if some edge servers are paralyzed, it will not affect the operation of the system.
[0212] Storage layer: The storage layer mainly deploys cloud servers, which store encrypted IoT private data and monitor the blockchain in real time. When a new data sharing request is detected on the blockchain, the corresponding ciphertext is sent to the requester.
[0213] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A cloud-edge collaborative IoT data sharing method based on blockchain, characterized in that: Applied between a key generation center, a blockchain, an edge server, a cloud server, a data owner, and a data requester, the method comprises the following steps: System initialization: The key generation center generates system public parameters and its own private key and public key, and stores the system public parameters and public key in the blockchain; User registration: Data owners and data requesters submit registration requests to the key generation center as users. Based on the user's registration information in the registration request, the key generation center allocates and returns public and private keys to the verified users, where the registration information includes the user ID that uniquely identifies the user; Data upload: The data owner encrypts its private data based on the symmetric key to generate ciphertext, builds a public key set and a user ID set based on its own and other data owners' public keys and user IDs, performs ring signature calculation based on the public key set, user ID set and ciphertext to generate a ciphertext ring signature that can be linked without a certificate, sends the ciphertext, ciphertext ring signature and data label to the edge server, and the edge server performs aggregate verification on the ciphertext ring signature. For the ciphertext ring signature that passes the verification, the ciphertext ring signature and data label are stored in the blockchain, the corresponding ciphertext and data label are sent to the cloud server, and the corresponding symmetric key is divided into multiple key fragments. A ring signature calculation is performed based on the public key set, user ID set and key fragment to generate a key ring signature that can be linked without a certificate, and the key fragment, key ring signature and data label are sent to the edge server. The edge server performs aggregate verification on the key ring signature. For the key ring signature that passes the verification, the key fragment and data label are stored in multiple edge servers, and the data label is linked to the ciphertext stored in the cloud server; Data request: For the data request submitted by the data requester, if the corresponding data tag exists in the blockchain, the data request is recorded through the blockchain. After the cloud server and the edge server monitor the data request from the blockchain, the cloud server searches for the corresponding ciphertext and returns it to the data requester, and the edge server searches for the corresponding key fragment and returns it to the data requester. After receiving a predetermined number of key fragments, the data requester forms a symmetric key and decrypts the ciphertext based on the symmetric key.
2. The cloud-edge collaborative IoT data sharing method based on blockchain according to claim 1 is characterized in that: Data upload includes the following steps: Ciphertext generation: The data owner encrypts its private data using a symmetric encryption algorithm based on a symmetric key to generate ciphertext; Ciphertext ring signature: The data owner selects multiple other data owners, builds a set of public key sets and user ID sets based on its own and other owners' public keys and user IDs, calculates the ring signature based on the public key set, user ID set and ciphertext, and generates a ring signature that cannot be linked to a certificate as a ciphertext ring signature; Ciphertext upload: The data owner sends the ciphertext, ciphertext ring signature, and data label to the edge server; Ciphertext ring signature aggregation verification: After receiving the ciphertext, ciphertext ring signatures and data tags of multiple data owners, the edge server aggregates the ciphertext ring signatures of the data owners to obtain the aggregated ciphertext ring signature, and performs signature verification based on the ciphertext, public key set and user ID set of the data owner. For the ciphertext ring signature that passes the verification, the ciphertext ring signature and data tag are stored in the blockchain, and the corresponding ciphertext and data tag are sent to the cloud server; Key fragment distribution: After the data owner monitors its ciphertext ring signature and data label from the blockchain, the corresponding symmetric key is divided into multiple key fragments, and a ring signature is performed based on the key fragment and the public key set and user ID set selected when signing its ciphertext ring signature. A certificate-free linkable ring signature is generated as a key ring signature, and the key fragment, key ring signature and data label are sent to the edge server; Key ring signature aggregation verification: After the edge server receives the key fragments, key ring signatures and data tags of multiple data owners, it aggregates the key ring signatures of the data owners to obtain the aggregated key ring signature, and performs signature verification based on the key fragments, public key set and user ID set of the data owner. For the verified key ring signatures, the key fragments and data tags are stored in multiple edge servers, and a link is established with the ciphertext stored in the cloud server based on the data tag.
Citation Information
Patent Citations
Intelligent Internet of Things equipment authentication method and system based on blockchain
CN113162768A
Internet of things block chain authentication method and system based on ring signature consensus mechanism
CN115811406A