A secure sharing method of plateau data based on blockchain
By adopting blockchain and smart contract technology in plateau data sharing, combining cryptography agent re-encryption and Shamir secret sharing, using a trusted execution environment (TEE) to isolate the external environment, solving data leakage, tampering and access in plateau data sharing The control problem achieves efficient privacy and integrity protection of data.
Patent Information
- Application Number
- CN202311233180.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2043-09-19
AI Technical Summary
Plateau data sharing faces problems such as data leakage, tampering, forgery and access control, especially in data transmission and storage, it is difficult to ensure the privacy, integrity and controllability of data, and the cost is high.
Adopt a blockchain-based high-altitude data security sharing method, combine cryptography proxy re-encryption and Shamir secret sharing technology to ensure data confidentiality, use blockchain and smart contracts to ensure data integrity and controllability, and execute it through trustworthy Environment (TEE) isolates external environment and implements private operations of data.
It realizes efficient sharing of plateau data while protecting privacy, reduces the computing and communication burden of data owners, ensures data integrity and privacy, and meets the controllability and data authenticity of plateau data sharing.
Smart Images

Figure CN117240452B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of cryptographic protocols and network security, and in particular to a plateau data security sharing method based on blockchain. Background Art
[0002] Plateau areas cover multiple fields such as climate, environment, and geology. The data resources generated by them are of great significance for scientific research, environmental protection, resource management, and disaster warning. With the rapid development of information technology, plateau data sharing has become a key factor in improving scientific research, decision-making, and sustainable development. However, current plateau data sharing faces many challenges. The first is data privacy and security issues. Plateau data usually contain sensitive information, such as geographic location, meteorological and geological survey results, etc. If these data are leaked or abused, they may have a serious impact on scientific research and the ecological environment in the plateau area. The second is data integrity and credibility issues. During the data sharing process, plateau data may be subject to the risk of tampering, forgery, or damage, affecting subsequent analysis and application. Therefore, appropriate technical means need to be taken to verify the authenticity and integrity of the data. Then there is the issue of data access control. Plateau data sharing involves data access and control issues between multiple data providers and data users. It is a complex task to ensure that only authorized users can access and use data and to be able to perform appropriate permission management and access control on plateau data. Finally, there is the cost issue. The technical infrastructure and communication networks in plateau areas may not be well developed, so data transmission and storage must consider their overhead.
[0003] In order to solve the above challenges, this patent proposes a plateau data privacy protection and sharing solution based on blockchain technology. In order to prevent the plateau data from being leaked or abused, the present invention adopts cryptographic proxy re-encryption and Shamir secret sharing technology to ensure the confidentiality of plateau data. In addition, the present invention also adopts blockchain and smart contract technology to ensure the integrity and controllability of data. Specifically, blockchain is a distributed ledger with a chain structure, which guarantees the authenticity and integrity of data through a consensus mechanism and realizes the anonymity of users by using a pseudonym mechanism. Smart contract technology accelerates the application of blockchain, which defines the protocol of the two communicating parties and automatically executes transactions in the form of executable code according to the protocol. Therefore, smart contracts can be used to automatically control data access authorization. In view of the fact that the existing blockchain system is transparent in the input and output data of smart contracts, which is easy to cause data or key leakage problems, the present invention also introduces a trusted execution environment (TEE) to isolate the external environment and help blockchain nodes perform private operations on smart contracts, thereby ensuring the integrity and privacy of data on smart contracts. By adopting the method of the present invention, plateau data can be effectively shared under the premise of protecting privacy, promoting scientific research, decision-making and sustainable development. Summary of the invention
[0004] The purpose of the present invention is to solve the problems of data leakage, data tampering and forgery, and data abuse in the process of plateau data sharing, including how to safely transmit sensitive data; how to verify the authenticity and integrity of data; how to safely manage and control data access rights; and how to achieve these goals efficiently.
[0005] In order to achieve the above object, the present invention adopts the following technical means:
[0006] The present invention provides a method for securely sharing plateau data based on blockchain, comprising the following steps:
[0007] Step A. System initialization: Generate system parameters based on security parameter λ and select a private key for each blockchain node Generate the corresponding public key pk through the private key i ,in Represents any integer group Z of order q q A random element is selected from the , where * indicates that the randomly selected element does not include the identity element;
[0008] Step B. Data publishing and smart contract creation: Store the encrypted plateau data offline, broadcast the relevant meta tag information to the blockchain network, and create a smart contract to control data access;
[0009] Step C. Identity authentication and data authorization: The user retrieves relevant meta information on the blockchain, verifies his or her identity through the smart contract, and obtains a data license certificate;
[0010] Step D. Data acquisition: The user obtains the ciphertext of the plateau data from the cloud server, decrypts the ciphertext locally, and obtains the plateau data.
[0011] In the above technical solution, step A includes:
[0012] Step A1. According to the system parameter λ, three prime order groups G1, G2, G T , through the bilinear mapping function e, the elements in groups G1 and G2 are mapped to group G T An element of, that is, e: G1×G2→G T ;
[0013] Step A2. Select three hash functions: H0: {0, 1} * →{0, 1} l , H1: {0, 1} * →Z q , H2:G T →{0, 1}l , where → represents mapping, and the hash function H0 represents mapping a string of any length composed of 0 or 1 to a string of length l {0, 1}, {} * Indicates that the string is of any length, l includes 128bit, 192bit, 256bit, 384bit, 512bit; the hash function H1 represents mapping a string of any length composed of 0 or 1 to an integer group Z of order p composed of (0, 1, ..., p-1) elements q The hash function H2 represents mapping a string of any length composed of 0 or 1 into a group G. T An element in
[0014] Step A3. Select a symmetric encryption algorithm, denoted as SEnc / SDnc and an asymmetric encryption algorithm, denoted as AEnc / ADnc, where SEnc and AEnc represent encryption, and SDnc and ADnc represent the corresponding decryption;
[0015] Step A4. Set the public parameter pp= <G1,G2,G T ,P,q,e,H0,H1,H2,(SEnc,SDnc),(AEnc,ADnc)>, write the system parameter pp into the blockchain, where P represents a generator of the prime order group G1;
[0016] Step A5. For each entity joining the blockchain, select a random value As the private key corresponding to the entity, and then calculate the corresponding public key pk i =sk i ·P.
[0017] In the above technical solution, step B comprises:
[0018] Step B1. For plateau data m, the data owner selects a random value according to the system parameter λ And calculate a value ek i =dk i P, then the data owner calculates the value s=H0(m), where H0() is a hash function;
[0019] Next, the data owner selects a random value Calculate the ciphertext CF = (C0, C1, C2), where SEnc s (m) indicates that the plateau data m is symmetrically encrypted with the key s. Finally, the data owner calculates the commitment value comit=H1(s||C0||C2), where s||C0||C2 indicates linking the values s, C0, and C2;
[0020] Step B2. The data owner stores the ciphertext CF = (C0, C1, C2) in the cloud server. If C0 does not overlap with other ciphertexts, it means that m is different from other data. The data owner will receive the index number DI and timestamp TS of the data m sent from the cloud server, where and Indicates the private key sk of the cloud server c The hash value of CF and TS is used to sign the data;
[0021] Step B3. The data owner creates a smart contract, which is written in the form of program code and includes the steps of identity authentication and data access authorization. The data owner publishes the smart contract to the blockchain. The contract also contains relevant information meta={comit, A, W, DI, TS}, where A is the access attribute, W is the keyword set, DI is the index number of the data storage, and TS is the timestamp;
[0022] Step B4. The data owner converts the random value dk in step B1 into i The data owner uses secret sharing to decompose it into n parts, and then broadcasts a write-ready request to the blockchain. After receiving the request, BNS will respond. BNS is a blockchain node with a trusted execution environment TEE. The trusted execution environment TEE provides a physical isolation environment for program execution and a secure storage environment for data. When receiving responses from n BNSs, the data owner performs remote attestation on their TEE to ensure the integrity and correctness of the TEE. If the TEE has been integrated and runs correctly, a secure channel is established with these TEEs and the n copies of dk are sent using the secure channel. i Decomposition value The data are transmitted to the n BNSs respectively and stored in the TEEs of these BNSs.
[0023] In the above technical solution, step C comprises:
[0024] Step C1. The data requester retrieves the relevant information meta on the blockchain based on the keyword;
[0025] Step C2. The data requester sends a data access ready request to the blockchain, which receives the request and stores the decomposition value of the user's random value. The BNS will respond;
[0026] Step C3. When receiving responses from more than t BNSs, the data requester performs remote authentication on the TEEs of these BNSs and establishes a secure channel to transmit their attribute certificates and contract codes;
[0027] Step C4. The authenticated BNS runs the calling contract in the TEE security environment;
[0028] Step C5. The smart contract checks the attributes of the data requester and issues an authorization certificate Lice = {seq t ,CR}, where seq l The unique credential serial number for this data request. The CR contains the requester's data access entry and its expiration time. Based on the user's current request and attribute certificate, the Lice generated by the smart contract in each BNS is the same.
[0029] Step C6. The smart contract running in BNS’s TEE calculates h=H0(Lice) respectively, H0() is a hash function, and then CL j Sent to the data requester, where Indicates the dk stored in BNS i The decomposition value of Indicates the use of public key pk j To Lice and Rk j Perform asymmetric encryption, Lice||rk j Indicates that Lice and rk j Link up;
[0030] Step C7. After TEE is running, BNS sends a transaction containing the following: the behavior of the data requester, his own behavior on the blockchain, and the value h. After the blockchain nodes reach a consensus, a new block containing this transaction will be appended to the blockchain ledger;
[0031] Step C8. The data requester uses his own account private key sk j Decrypt at least t CLs j To obtain the voucher Lice and t share decomposition value Generated proxy key fragments The data requester assembles t fragments using secret sharing to recover a proxy re-encryption key rk j =(-dk i )·pk j .
[0032] In the above technical solution, step D comprises:
[0033] Step D1. The data requester sends {Lice, rk j , DI} is sent to the cloud server;
[0034] Step D2. The cloud server checks the Lice and DI. If both are legal, the cloud service retrieves the DI and performs proxy re-encryption on the data items within the requester's authority according to the authority in the Lice;
[0035] Step D3. For the encrypted data within the authority, the cloud server j and C1 in the ciphertext, calculate C′1=e(c1,rk j );
[0036] Step D4. The cloud server sends CF'=(C0, C'1, C2) to the data requester;
[0037] Step D5. The data requester calculates based on CF' Then calculate m = SDnc s (C0) to restore the required plateau data m, where SDnc s (C0) is the symmetric decryption of the ciphertext C0 using the key s;
[0038] Step D5. The data requester calculates H0(m) and checks whether it is equal to s to determine its integrity.
[0039] The beneficial effects of the present invention include:
[0040] (1) Smart contracts are used to control access to plateau data and automatically authorize decryption keys. Data owners do not need to be online all the time, which greatly reduces the computing and communication burden on data owners and makes data sharing more convenient and concise.
[0041] (2) The present invention utilizes the anti-tampering and distributed consensus characteristics of blockchain to record the transmission logs of data requests and accesses in a distributed ledger, thus meeting the controllability of plateau data sharing and data integrity.
[0042] (3) The present invention can protect the private operations of data and keys under the open and transparent characteristics of blockchain, thereby ensuring the privacy of data during the entire data sharing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a framework diagram of the present invention.
[0044] Figure 2 This is a data sharing flow chart of the present invention. DETAILED DESCRIPTION
[0045] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.
[0046] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.
[0047] System initialization:
[0048] A1. According to the system parameter λ, select three q-order prime groups G1, G2, G T Through the bilinear mapping function e: G1×G2→G T , the elements in groups G1 and G2 can be mapped to group G T Function e is a mapping function commonly used in the design of various cryptographic schemes, which satisfies the bilinear, non-degenerate and computable properties.
[0049] A2. Choose three hash functions: H0: {0, 1} * →{0, 1} l , H1: {0, 1} * →Z q , H1:G T →{0, 1} l The hash function H0 maps a string of any length consisting of 0 or 1 to a string of length l {0, 1}. * Indicates that the string is of any length, l can be 128bit, 192bit, 258bit, 256bit, 384bit, 512bit, etc.; the hash function H1 represents a string of any length composed of 0 or 1 {0, 1} * Mapped to the integer group Z of order p consisting of (0, 1, ..., p-1) elements q The hash function H2 represents mapping a string of any length composed of 0 or 1 into a group G. T An element in
[0050] A3. Select a symmetric encryption algorithm (expressed as SEnc / SDnc) and an asymmetric encryption algorithm (expressed as AEnc / ADnc), where SEnc and AEnc represent encryption, and SDnc and ADnc represent the corresponding decryption.
[0051] A4. Set the public parameter pp= <G1,G2,G T ,P,q,e,H0,H1,H2,(SEnc,SDnc),(AEnc,ADnc)>, write the system parameter pp into the blockchain, where P represents a generator of the prime number group G1;
[0052] A5. For each entity that joins the blockchain, Figure 1The cloud server, data owner, data requester, and blockchain node in the As the private key corresponding to the entity, and then calculate the corresponding public key pk i =sk l ·P.
[0053] Data publishing and smart contract creation:
[0054] B1. Figure 2 As shown in the data release phase, for each type of data entry m, the data owner selects a random value based on the system parameter λ Calculate ek i =dk i P. Then, the data owner picks a random value Calculate the value s = H0 (m). Then, the data owner calculates the ciphertext CF = (C0, C1, C2), where C0 = SEnc s (m), C1=r·ek i , SEnc s (m) indicates that the plateau data m is symmetrically encrypted with the key s. Finally, the data owner calculates the commitment value comit = H1(s||C0||C2), where s||C0||C2 indicates linking the values s, C0, and C2.
[0055] B2. Figure 1 As shown, the data owner stores the ciphertext CF = (C0, C1, C2) in the cloud server. If C0 is not repeated with other ciphertexts (which means m is different from other data), the data owner receives the retrieval index DI and timestamp TS about his own data. and Indicates the private key sk of the cloud server c Perform digital signature on h(CF)||TS.
[0056] B3. The data owner creates a smart contract, which is written in the form of program code and includes the steps of identity authentication and data access authorization. The data owner publishes the smart contract on the blockchain. The contract also contains relevant information meta = {comit, A, W, DI, TS}, where A is the access attribute, W is the keyword set, Dl is the offline index of the data storage, and TS is the timestamp.
[0057] B4. The data owner converts the random value dk in step B1 j Decompose it into n parts using secret sharing. The specific method is: choose an n-order function f(x) = dk i +a1·x+a1·x 2 +…+an ·x n mod q, and then calculate the decomposition value Here i is a number from 1 to n. Next, the data owner broadcasts a write-ready request to the blockchain network. Figure 1 In the architecture shown, blockchain nodes are classified into two categories. One is the BNS node, which means a blockchain node with TEE, responsible for some confidential computing and ledger maintenance. The other is an ordinary BN node, which is only responsible for normal ledger maintenance. When the data owner's request is received, the blockchain BNS node that receives the request will respond. When n responses are received, the data owner performs remote attestation on the TEEs of these n BNS nodes to ensure the integrity and correctness of the TEE. If the TEE is integrated and running correctly, a secure channel is established with the TEEs of these nodes, and the decomposed value is sent using the established secure channel. The index DI is transmitted to the i-th BNS node and stored in the TEE of that BNS.
[0058] Identity authentication and data authorization:
[0059] C1. Figure 2 As shown in the data acquisition phase, the data requester retrieves relevant information on the blockchain based on keywords.
[0060] C2. The data requester generates a data access authorization request and broadcasts the request to the blockchain network nodes. The request content includes the data index and smart contract address. The BNS node will respond.
[0061] C3. When receiving responses from more than t BNS nodes, the data requester performs remote authentication on the TEEs of these BNSs and establishes a secure channel to transmit its attribute certificates.
[0062] C4. The authenticated BNS runs the calling contract in the TEE security environment.
[0063] C5. The smart contract checks the data requester's certificate and issues an authorization certificate Lice = {seq i ,CR}. Among them, seq l The CR is the unique credential serial number for this data request. The CR contains the requester's data access entry and its expiration time. It is worth noting that the smart contract generates a sequence number in the TEE of each BNS node based on the data requester's current request, its public key and attribute certificate. l And the access entry and expiration time are the same.
[0064] C6. The smart contract calculates h = H0 (Lice) respectively, Then CL j Sent to the data requester. Indicates the dk stored in the BNS node i The decomposition value of Indicates the use of public key pk j To Lice and Rk j Perform asymmetric encryption, Lice||rk j Indicates that Lice and rk j Link up.
[0065] C7. After the smart contract is run in the TEE of the BNS node, the BNS node sends a transaction containing the following: the behavior of the data requester, as well as his own behavior and value h on the blockchain. After the blockchain nodes reach a consensus, a new block containing this transaction will be appended to the blockchain ledger.
[0066] C8. The data requester uses his own account private key sk j Decrypt at least t CLs j To obtain the certificate Lice and t copies of the generated by decomposing the fragments The data requester then assembles the t fragments using secret sharing to recover a proxy re-encryption key rk j The specific approach is: the data requester calculates Among them l j is the Lagrange interpolation coefficient of the j-th user.
[0067] Data acquisition:
[0068] D1. The data requester will {Lice, rk j , DI} is sent to the cloud server.
[0069] D2. The cloud server verifies DI, checks the format of the certificate Lice, and performs hash operations on it to compare with the contract output value h on the blockchain. If all verifications pass, the cloud service retrieves DI and performs proxy re-encryption on the data items within the requester's authority according to the permissions in the Lice.
[0070] D3. For the encrypted data within the authority, the cloud server j and C1 in the ciphertext, calculate C′1=e(C1,rk j ).
[0071] D4. The cloud server sends CF'=(C0, C'1, C2) to the data requester.
[0072] D5. The data requester uses CF' and his own private key skj ,calculate m=SDnc s (C0) to restore the desired plateau data. s (C0) is the symmetric decryption of the ciphertext C0 using the key s.
[0073] D5. The data requester calculates H0(m) and checks whether it is equal to s to determine its completeness.
Claims
1. A method for secure sharing of plateau data based on blockchain, characterized in that: The following steps are involved: Step A. System initialization: Based on safety parameters , generate system parameters and select a private key for each blockchain node , the corresponding public key is generated through the private key ,in Indicates from q Any integer group of order Z q A random element is selected from the , where * indicates that the randomly selected element does not include the identity element; Step B. Data publishing and smart contract creation: Store the encrypted plateau data offline, broadcast the relevant information meta to the blockchain network, and create a smart contract to control data access; Step C. Identity authentication and data authorization: The user retrieves the relevant information meta on the blockchain, verifies his or her identity through the smart contract, and obtains the data license certificate; Step D. Data acquisition: The user obtains the ciphertext of the plateau data from the cloud server, decrypts the ciphertext locally, and obtains the plateau data; Step A includes: Step A1. According to system parameters , select three Prime-order group , , , through the bilinear mapping function , will group , The elements in are mapped to the group G T On an element of ; Step A2. Select three hash functions: , , ,in, Represents mapping, hash function H 0 Indicates mapping a string of any length consisting of 0 or 1 to a length of On the {0,1} string, Indicates that the string is of any length. Including 128bit, 192bit, 256bit, 384bit, 512bit; hash function H 1 Indicates mapping a string of any length consisting of 0 or 1 to a string consisting of (0,1,…, p -1) Elements p Integer groups of order Z q Above: Hash function H 2 Indicates mapping a string of any length composed of 0 or 1 into a group An element in Step A3. Select a symmetric encryption algorithm, expressed as And an asymmetric encryption algorithm ,in, and stands for encryption, and and Represents the corresponding decryption; Step A4. Set common parameters >, the system parameters Written into the blockchain, where P Represents a prime order group A generator of ; Step A5. For each entity joining the blockchain, select a random value As the private key corresponding to the entity, and then calculate the corresponding public key ; Step B includes: Step B1. Plateau data , the data owner according to the system parameters , choose a random value , and calculate a value , then the data owner calculates the value , for Hash functions; Next, the data owner selects a random value , calculate the ciphertext = , Indicates the key For plateau data Perform symmetric encryption. Finally, the data owner calculates the commitment value. ,in Indicates that the value Link up; Step B2. The data owner converts the ciphertext CF = ( , , ) is stored in the cloud server. If There is no duplication with other ciphertexts, which means that m is different from other data. The data owner will receive the data sent from the cloud server. The index number DI and the time stamp TS, where DI = Si ( (CF)||TS), and Si ( (CF)||TS) indicates using the private key of the cloud server The hash value of CF and TS is used to sign the data; Step B3. The data owner creates a smart contract, which is written in the form of program code and includes the steps of identity authentication and data access authorization. The data owner publishes the smart contract to the blockchain, and the contract also contains relevant information meta = { , TS}, where A is the access attribute, W is the keyword set, is the index number of the data storage, and TS is the timestamp; Step B4. The data owner converts the random value in step B1 into Decomposed into The data owner then broadcasts a write-ready request to the blockchain. BNS responds to the request. BNS is a blockchain node with a trusted execution environment (TEE). The trusted execution environment (TEE) provides a physical isolation environment for program execution and a secure storage environment for data. When a BNS responds, the data owner performs remote attestation on their TEE to ensure the integrity and correctness of the TEE. If the TEE is integrated and running correctly, a secure channel is established with these TEEs and used to send share Decomposition value Transmit to this BNSs and stored in the TEEs of these BNSs.
2. A method for securely sharing plateau data based on blockchain as claimed in claim 1, characterized in that: Step C includes: Step C1. The data requester retrieves the relevant information meta on the blockchain based on the keyword; Step C2. The data requester sends a data access readiness request to the blockchain, which receives the request and stores the decomposition value of the user's random value. The BNS will respond; Step C3. When receiving responses from more than t BNSs, the data requester performs remote authentication on the TEEs of these BNSs and establishes a secure channel to transmit their attribute certificates and contract codes; Step C4. The authenticated BNS runs the calling contract in the TEE security environment; Step C5. The smart contract checks the attributes of the data requester and issues an authorization certificate Lice= to the user. ,in, The unique credential serial number for this data request. The CR contains the requester's data access entry and its expiration time. Based on the user's current request and attribute certificate, the Lice generated by the smart contract in each BNS is the same. Step C6. The smart contracts running in BNS’s TEE calculate (Lice), , = , for The hash function is then Sent to the data requester, where Indicates the data stored in BNS The decomposition value of Indicates that the public key right Perform asymmetric encryption. Indicates that Link up; Step C7. After TEE is running, BNS sends a transaction containing the following: the data requester’s behavior, his own behavior on the blockchain, and the value ,After the blockchain nodes reach a consensus, a new block containing this transaction will be appended to the blockchain ledger; Step C8. The data requester uses his own account private key Decrypt at least t To obtain the voucher Lice and t share decomposition value Generated proxy key fragments , the data requester assembles t fragments using secret sharing to recover a proxy re-encryption key .
3. A method for securely sharing plateau data based on blockchain as claimed in claim 2, characterized in that: Step D include: Step D1. The data requester sends {Lice, , }Send to cloud server; Step D2. The cloud server checks the Lice and DI. If both are legal, the cloud service retrieves the DI and performs proxy re-encryption on the data items within the requester's authority according to the authority in the Lice; Step D3. For the encrypted data within the authority, the cloud server and the ciphertext calculate ; Step D4. The cloud server sends CF = ( , , ) is sent to the data requester; Step D5. The data requester receives the data according to CF ,calculate , then calculate To restore the desired plateau data ,in, For use key Ciphertext Perform symmetric decryption; Step D5. Data requester calculates Check if it is equal to , to determine its completeness.