Multi-user data multi-backup searchable encryption method based on blockchain
By designing a multi-user data multi-backup searchable encryption method on the blockchain, the problems of data single point failure and fund fraud in traditional cloud searchable encryption solutions are solved, multi-backup of data and user rights management are realized, ensuring Data security and integrity.
Patent Information
- Application Number
- CN202410804711.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-21
AI Technical Summary
There is a risk of data single point failure in traditional searchable encryption solutions on the cloud. Users and cloud servers may have financial fraud and data integrity concerns during the search process, and it is difficult to achieve dynamic updates and multi-user rights management.
Adopt a multi-user data multi-backup searchable encryption method based on the blockchain, through public parameters and key distribution in the initialization stage, encrypted data upload in the data update stage, search token generation in the trapdoor generation stage, and intelligence in the search matching stage. Contract execution, result certification in the equality determination test phase and deposit management in the accountability phase ensure data security and integrity.
It achieves multiple backups of data, avoids single points of failure, ensures fair flow of funds and data integrity for both parties to the transaction, ensures dynamic management of user search permissions and fine-grained update and deletion of data, and prevents malicious cloud server behavior.
Smart Images

Figure CN118381606B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of searchable encryption technology, and in particular to a multi-user data multi-backup searchable encryption method based on blockchain. Background Art
[0002] In today's information age, the explosive growth of user data and the continuous increase in data storage demand have driven the booming development of cloud computing. In a cloud environment, users outsource sensitive data to cloud servers for storage and computing without having to worry about the details of the underlying infrastructure, which undoubtedly raises users' concerns about data confidentiality and integrity. In order to protect users' sensitive information, relevant researchers have introduced searchable encryption technology, which allows users to encrypt data before outsourcing storage, and also allows users to search encrypted data without decrypting the entire database.
[0003] However, in traditional cloud-based searchable encryption schemes, data is often stored on a single cloud server. Once the cloud server fails, user data will face the risk of loss or damage. In order to improve the robustness of data and avoid the risk of single point failure of data, relevant researchers have proposed data multi-backup technology, which improves data availability by saving the same data copies in different storage locations.
[0004] At the same time, in traditional cloud searchable encryption schemes, users are often considered to be honest users, and cloud servers are often considered to be semi-honest entities, and they always perform fair transactions. However, in actual production environments, users and cloud servers may commit financial fraud during the search process. In response to this problem, some researchers have turned their attention to blockchain technology. Blockchain is a distributed shared ledger with the characteristics of decentralization, immutability, traceability, and data transparency. At the same time, the internal fairness of smart contracts on blockchain ensures that participants can always perform transactions honestly. Therefore, it is of great significance to use blockchain technology to implement searchable encryption schemes to ensure the fair flow of funds between the two parties to the transaction and the immutability and traceability of transaction information.
[0005] In addition, in traditional cloud searchable encryption schemes, cloud servers that are considered semi-honest always honestly execute user search operations and return search results. However, in actual production and living environments, cloud servers may be malicious and may return partial or erroneous search results for user search requests, which also causes users to worry about data integrity. Based on this problem, the scheme introduces an equality determination test mechanism under multiple cloud servers and uses homomorphic XOR encryption functions to implement equality determination. The equality determination test allows a third party to check different forms of ciphertext without knowing the plaintext to determine whether it is the encryption of the same keyword. Homomorphic XOR encryption function is a special type of partially homomorphic encryption that can perform calculations on encrypted data without exposing the original data.
[0006] In actual production environments, data owners hope to grant different file access rights to users based on their identities. At the same time, data owners also hope to be able to conveniently perform data addition and deletion operations. Therefore, it is very important to design a multi-user data multi-backup searchable encryption method on the blockchain with dynamic update function under the premise of solving the above problems. Summary of the invention
[0007] The present invention provides a multi-user data multi-backup searchable encryption method based on blockchain, which can solve the above problems.
[0008] In order to solve the above problems, the technical solution adopted by the present invention is as follows:
[0009] The present invention provides a multi-user data multi-backup searchable encryption method based on blockchain, comprising:
[0010] Initialization phase: The system administrator generates public parameters for the target system. , deploy the equality judgment contract on the blockchain and use a secure channel to distribute the judgment key to the equality judgment contract ; is the system safety parameter, f is a safe homomorphic XOR function, h and H are two standard hash functions, G is a standard pseudo-random function. is a string selected by the system administrator from the {0,1} string space Random number of bits;
[0011] Key distribution phase: The key distribution center generates cloud server identity identifiers for data owners, multiple cloud servers in outsourced service providers, and users with different search permissions. , Cloud server search key , Cloud server determines the key , user identifier , User Search Key , data owner updates the key , User search parameters and cloud server search parameters , and distribute the key to the corresponding entity through a secure channel, while the rest (identifiers and search parameters) are publicly recorded through the blockchain. In addition, the key distribution center will also deploy a search distribution contract for the data owner;
[0012] Data update phase: Data owners use their own update keys , User search parameters , Cloud Server Search Parameters Generate encrypted data and upload it to multiple cloud servers of the outsourcing service provider;
[0013] Trapdoor generation phase: The user selects a search keyword, generates a search token using his or her authorized search key, and and search token Sent to the search distribution contract on the blockchain; the search distribution contract on the blockchain freezes the user's search deposit and processes the user's search token to form an authorized search token , sent to multiple cloud servers in the outsourcing service provider.
[0014] Search and match phase: Multiple cloud servers in the outsourcing service provider receive the authorization search token of the smart contract and send their own identity identifiers and cloud server prepayment deposit The search and distribution contract on the blockchain freezes the prepaid deposit of the cloud server. Subsequently, multiple cloud servers in the outsourcing service provider use the authorized search token and the stored encrypted data to search and match to obtain the result set. R ;
[0015] Equality determination test phase: Multiple cloud servers in the outsourcing service provider process their own result sets separately R Get the set of equal judgment results , sent to the equality judgment contract on the blockchain; the equality judgment contract on the blockchain executes the equality judgment algorithm to identify the authentic and reliable search results, honest cloud servers and malicious cloud servers, and notifies the cloud server corresponding to the authentic and reliable search results, which returns the corresponding result set to the search user As a search result;
[0016] Accountability stage: The equality determination contract calls the search distribution contract to execute the payment, return or deduction of the deposit. At the same time, the equality determination contract reports the identity information of the malicious server to the system administrator, who then performs the accountability operation.
[0017] In a preferred embodiment of the present invention, the blockchain deployed by the system administrator is a consortium chain;
[0018] Homomorphic XOR function f is defined as:
[0019] ,
[0020] The pseudo-random function G is defined as:
[0021] ,
[0022] in, , are generated by a standard key generator A binary random key string of bits;
[0023] Homomorphic XOR function f The properties are:
[0024] ,
[0025] in, is a homomorphic XOR function f The key of is a homomorphic XOR function f The basic form of their input is A binary random permutation string of bits;
[0026] The hash function h is defined as: ;The hash function H is defined as: ;in, Refers to a 01 string space of any length, refers to 01 string space of length.
[0027] In a preferred embodiment of the present invention, the key distribution phase specifically includes the following steps:
[0028] 1) The key distribution center Select four characters from the character space Random number , calculate the key ;
[0029] 2) In response to the registration request sent by the data owner, the key distribution center generates the data owner update key , Self-identifier , and uses a secure channel to send the update key to the data owner , making the data owner’s identity identifier public on the blockchain At the same time, the key distribution center deploys the data owner's smart contract on the blockchain and stores the key in the smart contract. ; where the data owner's identifier is publicly recorded on the blockchain;
[0030] 3) For multiple cloud servers in the system outsourcing service provider, the key distribution center generates different identity identifiers for multiple cloud servers in the outsourcing service provider , select two for each registered cloud server Random number of bits ,calculate , let the cloud server search for the key , determine the key ; Calculate cloud server search parameters , using a secure channel to send search keys to the cloud server and equality determination key , public cloud server identifier and user search parameters ; Among them, the identity identifiers of each cloud server in the outsourcing service provider and search parameters Recorded on the blockchain by the smart contract on the blockchain;
[0031] 4) For registration requests sent by different users in the system, the key distribution center generates a different identity identifier for each registered user , for each registered user , select two Random number of bits ,calculate , user search parameters , allowing the user to authorize the search key ; Use a secure channel to send the authorized search key to the user , expose the user's search parameters ; where, the identifier of each user and search parameters It is publicly recorded on the blockchain by the smart contract on the blockchain.
[0032] In a preferred embodiment of the present invention, the data owner will perform data update operations on all outsourced cloud servers of the outsourced service provider. The data update stage specifically includes the following steps:
[0033] 1) The data owner initializes two empty lists ;
[0034] 2) Data owner preprocesses the database , forming a reverse index database , where the structure of the reverse index database is (keyword ,File Index );
[0035] 3) Data owner through the reverse index database get The number of file indexes under ,from Select 3 from the string space Random number of bits , and use your own update key Calculate and update auxiliary label information
[0036] ;
[0037] ;
[0038] 4) Data owner is in the list L Medium Storage ;
[0039] 5) For each (keyword ,File Index ) Yes, the data owner Select 3 from the string space Random number of bits ;
[0040] 6) The data owner uses his / her own update key , User search parameters , Cloud Server Search Parameters and keywords Calculate the reverse search key
[0041] ;
[0042] 7) Data owner calculates reverse search tag ;in, In step 3), the data owner is the keyword The random number selected; It means that after sorting in dictionary order, The document index ind sort position under the , its value range is 0 to ;
[0043] 8) The data owner uses his / her own update key ko and the user identifier with the document index search permission. , Cloud Server Search Parameters Calculate the reverse forward update key
[0044] ;
[0045] 9) Data owner calculates the positive update label ;
[0046] 10) The data owner uses his / her own update key ko and the search parameters of the user with the search permission Calculate document index encryption key
[0047] ;
[0048] 11) The data owner uses the document index ind and the encryption key hAST to calculate the encrypted data ;
[0049] 12) The data owner is stored in list L ;
[0050] 13) Data owner sends a request to the cloud server Send lists Lw and L.
[0051] In a preferred embodiment of the present invention, the trapdoor generation stage specifically includes the following steps:
[0052] 1) User from Select 2 from the string space Random number of bits ;
[0053] 2) The user uses his own authorized search key and keyword w to calculate the user search token , The calculation process is as follows
[0054]
[0055] 3) The user sends a search token to the search distribution contract on the blockchain and search for prepaid deposit ,in Refers to the prepaid fee that users pay for each cloud server on the outsourced service provider to honestly perform search operations;
[0056] 4) The search distribution contract on the blockchain receives the search token sent by the user , calculate the authorization search token , where the authorization search token
[0057] ;
[0058] 5) Smart contracts on the blockchain will authorize search tokens Distribute to each cloud server on the outsourcing service provider and freeze the user search deposit in the deposit pool .
[0059] In a preferred embodiment of the present invention, the search and matching stage specifically includes the following steps:
[0060] 1) The cloud server goes through the locally stored list LW, and for each entry in the list LW , use itself to search for the key and authorization search token AST, calculate search auxiliary information
[0061] ;
[0062] 2) Cloud server uses search auxiliary information calculate and use and in the entry In comparison, if and If they are equal, then take out the ;
[0063] 3) The cloud server traverses the locally stored list L, and for each entry in the list L , the cloud server uses its own search key , own identity identifier 、User authorization search token AST calculation reverse search key
[0064] ;
[0065] 4) Cloud server uses reverse search key and step 2) Calculate search tags , i ranges from 0 to ;
[0066] 5) The cloud server traverses the list L, if the document and If they are equal, then take out the document entry , calculate the user encryption key , using the user encryption key Decrypting an encrypted index Get the encrypted index , where the calculated ;
[0067] 6) The cloud server indexes the documents that match the search results. Add the result set R.
[0068] In a preferred embodiment of the present invention, the equality determination test phase specifically includes the following steps:
[0069] 1) For each document index in the result set R , the cloud server from Select 1 from the string space Random number of bits , using its own identifier , equality test key Calculate the equality judgment data ;
[0070] 2) The cloud server will equalize the judgment data Add to the equality judgment data set In the example, the equal judgment data set Sort by lexicographic order and send to all decision nodes on the blockchain;
[0071] 3) The decision node on the blockchain initializes an empty set ;
[0072] 4) Equality determination nodes on the blockchain traverse the determination data set , for the judgment data set Each entry in , the equality test node uses the equality test key and cloud server search parameters Recalculate the judgment result
[0073] ,
[0074] And the judgment results are collected Add to the reprocessed judgment result set , the equal judgment nodes on the blockchain will collect the judgment results Send to the equality judgment contract on the blockchain;
[0075] 5) The equality judgment contract on the blockchain combines the list elements in pairs and distributes them to the equality judgment nodes on the blockchain for equality judgment. If the two encrypted data are equal, it is determined that the data returned by the two cloud servers are encryptions of the same keyword, and the algorithm outputs the identity identifiers of the two servers. and 1, and in the result list The output of the algorithm is recorded in ; if the two encrypted data are not equal, it is considered that the data returned by the two cloud servers are encryptions of different keywords, and the algorithm outputs the identity identifiers of the two servers and 0, and in the result list The output of the algorithm is recorded in The record format is , b is an identifier and The equal judgment result of is in the range of ;
[0076] 6) The equal determination node on the blockchain lists the results Return to the equality judgment contract on the blockchain, the equality judgment contract on the blockchain lists the results The decision result in the voting is selected, and the decision node with the highest vote is selected and then processed by the cloud server. Judgment result As a true and valid judgment result, it is recorded on the blockchain and notified to the server, which returns the search result R as a true and valid search result to the search user;
[0077] 7) Equality determination contract on the blockchain to determine the result As a basis, select the result list The encryption result of the server with a judgment result of 0 is used as a reference, and is combined and distributed to the judgment node for secondary equality judgment, and the result is written into the result list middle;
[0078] 8) Equality determination contract reading result list on blockchain In the content, the result list The servers with a judgment result of 0 are considered dishonest servers, and the rest of the servers are considered honest cloud servers.
[0079] In a preferred embodiment of the present invention, the accountability stage specifically includes the following steps:
[0080] 1) If the server If a cloud server is identified as honest, the deposit of the server It will be unfrozen from the deposit pool and returned to the contract account of the server, and the fees prepaid by the search user will be of Payment to the cloud server , where N is the number of cloud servers;
[0081] 2) If the server If a cloud server is identified as malicious, the deposit of the server will be It will be unfrozen from the deposit pool and sent to the contract account of the search distribution contract to pay the verification fee of the verification node; the fee prepaid by the search user of It will be returned to the contract account of the search user; at the same time, the search distribution contract will report the relevant identity information of the malicious cloud server to the system administrator.
[0082] Compared with the prior art, the present invention has the following beneficial effects:
[0083] Use multiple servers to achieve multiple data backups to avoid data loss caused by a single cloud server failure;
[0084] The internal fairness of blockchain and smart contracts, as well as the non-repudiation of blockchain, ensure the openness and transparency of information between the two parties to the transaction, and the fair flow of funds between the two parties is guaranteed through the deposit transaction mechanism of both parties;
[0085] Use homomorphic XOR functions and a series of random values to construct cloud server search parameters and user search parameters to implement multiple data backup operations on different cloud servers and ensure that users with different identities have different data search permissions.
[0086] Use blockchain and smart contract credibility to authorize user search tokens, and ensure the legitimacy and reliability of the user-authorized search tokens received by the cloud server;
[0087] The reverse search tag associated with the keyword is used to update the data, and the forward delete tag associated with the document index is used to delete the data, thus providing the document fine-grained deletion and update operation function;
[0088] The verification nodes on the blockchain are used to perform equality tests on the equality judgment search results processed by multiple cloud servers, and node verification and node voting are used to provide data integrity verification. The verification results are stored on the blockchain. The immutability of the blockchain is used to prevent malicious servers from denying the returned search results. By holding malicious cloud servers accountable, the malicious behavior of outsourced cloud servers is effectively curbed, ensuring the fairness of the user search process and the effectiveness of the search results.
[0089] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the embodiments of the present invention are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0091] Figure 1 Flow chart of the solution in the embodiment of the present invention
[0092] Figure 2 It is a schematic diagram of the overall framework of the solution in the present invention;
[0093] Figure 3 This is a flowchart of user search based on blockchain in an embodiment of the present invention;
[0094] Figure 4 The figure is a flow chart of cloud server equality determination in an embodiment of the present invention. DETAILED DESCRIPTION
[0095] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0096] like Figure 2 As shown in the figure, the key distribution center is defined as an honest and trustworthy entity that always performs key distribution operations honestly; the data owner is defined as an honest and trustworthy entity that can honestly perform user data encryption outsourcing according to the user's search permissions; the user is defined as an untrustworthy entity that may send search instructions beyond the search permissions to the cloud server, or send search tokens impersonating other users; the cloud server is defined as an untrustworthy entity that attempts to obtain sensitive information outsourced by the user, or returns partial or erroneous search results for the user's search instructions.
[0097] like Figure 1 As shown, the present invention provides a multi-user data multi-backup searchable encryption method based on blockchain, which includes six stages: initialization stage, key distribution stage, data update stage, trapdoor generation stage, search and matching stage, equality determination test stage and accountability stage.
[0098] 1. Initialization phase
[0099] 1.1. System administrator defines system public parameters ;in, f is a safe homomorphic XOR function, h and H are two standard hash functions, G is a standard pseudo-random function;
[0100] Homomorphic XOR function f is defined as: ,in, is generated by a standard key generator A random binary key string of bits;
[0101] Homomorphic XOR function f The properties are ,in, is a homomorphic XOR function f The key is composed of the following basic forms: A random binary string of bits, is a homomorphic XOR function f The basic form of the input is A binary random permutation string of bits;
[0102] Hash functions h is defined as: ;
[0103] Hash functions H is defined as: ;
[0104] in, Refers to a 01 string space of any length, refers to 01 string space of length;
[0105] Pseudo-random functions G is defined as: ,in, is generated by a standard key generator A random binary key string of bits.
[0106] 1.2. A string selected by the system administrator from the string space {0,1} Random number of bits: , and deploy the equality judgment contract on the blockchain, and use a secure channel to distribute the judgment key to the equality judgment contract .
[0107] 2. Key distribution phase
[0108] 2.1、Key Distribution Center Select four characters from the character space Random number: , and calculate the key , .
[0109] 2.2. In response to the registration request sent by the data owner, the key distribution center generates the data owner's update key , Self-identifier , and uses a secure channel to send the update key to the data owner , making the data owner’s identity identifier public on the blockchain .
[0110] 2.3. The key distribution center deploys the data owner’s smart contract on the blockchain and stores the key in the smart contract ; where the data owner's identifier is publicly recorded on the blockchain.
[0111] 2.4. The key distribution center calculates identity identifiers for multiple cloud servers in the outsourced service provider , Search Key , determine the key , Cloud Server Search Parameters , where the cloud server identifier and search parameters Publicly recorded on the blockchain, search for keys , determine the key The data are sent to the cloud servers of the outsourced service provider using a secure channel.
[0112] Cloud Server Search Key , determine the key and search parameters The calculation process is as follows:
[0113] 1) The key distribution center selects two for each registered cloud server Random number of bits ,calculate , set the cloud server search key ;
[0114] 2) Key distribution center calculation , set the cloud server determination key ;
[0115] 3) Key distribution center calculates cloud server search parameters .
[0116] 2.5. The key distribution center calculates an identity identifier for each registered user , authorized search key, user search parameters , where the user identifier and search parameters Is publicly recorded on the blockchain, and users search for the key The data are sent to the cloud servers of the outsourcing service provider using a secure channel;
[0117] Among them, the user searches for the key , User search parameters The calculation process is as follows:
[0118] 1) The key distribution center is for each registered user , select two Random number of bits ,calculate , set the user authorization search key ;
[0119] 2) The key distribution center calculates the user search parameters .
[0120] 3. Data update stage
[0121] The data update phase specifically includes the following steps:
[0122] 3.1. The data owner initializes two empty lists .
[0123] 3.2. For the original database , data owner preprocesses the original database Forming a reverse index database .
[0124] Among them, the structure of the reverse index database is (keyword ,File Index ).
[0125] 3.3. For each cloud server of the outsourcing service provider , the data owner performs steps 3.4 to 3.11.
[0126] 3.4. For the reverse index database Each keyword in , the data owner pre-computes The number of file indexes under , select 3 Random number of bits .
[0127] 3.5. Data owner calculates tag entry information , and store the entry information in list L;
[0128] The calculation process of hlw is as follows:
[0129] 1) Data owner calculates label information
[0130] ;
[0131] 2) Data owner calculates label information .
[0132] 3.6. For the reverse index database Each of the (keyword ,File Index ) Yes, the data owner Select 3 from the string space Random number of bits .
[0133] 3.7. Data owner calculates reverse search key and reverse search tags ;
[0134] Among them, the reverse search key and reverse search tags The calculation process is as follows:
[0135]
[0136] in, In step 3.4, the data owner is the keyword The random number selected; It means that after sorting in dictionary order, The document index ind sort position under the , its value range is 0 to .
[0137] 3.8. Data owner calculates forward update key and positive update tags ;
[0138] Among them, the forward update key and positive update tags The calculation process is as follows:
[0139]
[0140]
[0141] 3.9. The data owner calculates the encryption key hAST and uses the encryption key to calculate the encryption index ;
[0142] Among them, the encryption key hAST and the encryption index The calculation steps are as follows:
[0143]
[0144] .
[0145] 3.10. Data owner is listed in the Medium Storage .
[0146] 3.11. Data owner sends data to cloud server Send lists Lw and L.
[0147] 4. Trapdoor Generation Phase
[0148] 4.1、Users from Select 2 from the string space Random number of bits ;
[0149] 4.2. User Calculation Search Token ,in, The calculation process is as follows:
[0150] ;
[0151] 4.3. User will search for token and search for prepaid deposit Send to the blockchain to search for distribution contracts, where: Refers to the prepaid fee that users pay for each cloud server on the cloud service end to honestly perform search operations;
[0152] 4.4. The search distribution contract on the blockchain receives the search token sent by the user and deposit , calculate the authorization search token ,
[0153] Among them, the authorization search token
[0154] ;
[0155] 4.5. Smart contracts on the blockchain will authorize search tokens Distribute to each cloud server on the outsourcing service provider and freeze the user search deposit in the deposit pool .
[0156] 5. Search and match phase, see Figure 3 shown.
[0157] 5.1. The cloud server traverses the local storage list LW and takes out the entries ;
[0158] 5.2. Cloud Server Computing and Searching Auxiliary Information , and use the entry calculate ;
[0159] Among them, auxiliary information and entries The calculation process is as follows:
[0160]
[0161]
[0162] 5.2. Use of cloud servers and in the entry In comparison, if and If they are equal, then take out the ;
[0163] 5.3. Cloud server calculates reverse search key and search tags ;
[0164] Among them, the reverse search key and search tags The calculation process is as follows:
[0165]
[0166] , i ranges from 0 to ;
[0167] 5.4. The cloud server traverses the list L. If the document and If they are equal, then take out the document entry , decrypt the encrypted index Get Index ;
[0168] Among them, decryption encryption index Get Index The specific operations are as follows:
[0169] The data owner first calculates the user encryption key ;
[0170] The data owner decrypts the encrypted index using the user encryption key Get Index
[0171] ;
[0172] 5.5. The cloud server indexes the documents matched by the search Add the result set R.
[0173] 6. Equality determination test phase, see Figure 4 shown.
[0174] 6.1. The cloud server processes the result set R to obtain the equal judgment result set ;
[0175] The judgment result set The calculation process is as follows:
[0176] Cloud Server Select 1 from the string space Random number of bits ;
[0177] Cloud server uses equality determination test key Calculate equality test data ;
[0178] The cloud server will determine the data Add to the equality judgment data set middle;
[0179] The cloud server uses lexicographical order to determine the equality of the data set Sort.
[0180] 6.2. The cloud server sends the document index set to all equality determination nodes on the blockchain, and the equality determination nodes on the blockchain initialize an empty set locally. ; Equal determination nodes on the blockchain traverse the determination data set , for the judgment data set Each entry in , the equality determination test node then calculates the determination result , and the judgment results are combined Add to the reprocessed judgment result set , the equal judgment nodes on the blockchain will collect the judgment results Send to the equality judgment contract on the blockchain;
[0181] Among them, the judgment result The calculation process is as follows:
[0182]
[0183] 6.3. The equality determination contract on the blockchain combines the list elements in pairs and distributes them to the equality determination nodes on the blockchain for equality determination. The specific rules for equality determination are as follows:
[0184] If the two encrypted data are equal, it is considered that the data returned by the two cloud servers are encryptions of the same keyword, and the algorithm outputs the identity identifiers of the two servers. and 1, and in the result list Record the output of the algorithm in
[0185] If the two encrypted data are not equal, it is considered that the data returned by the two cloud servers are encryptions of different keywords, and the algorithm outputs the identity identifiers of the two servers. and 0, and in the result list The output of the algorithm is recorded in .
[0186] The result list The record format is , b is an identifier and The equal judgment result of is in the range of ;
[0187] 6.4. The equal judgment node on the blockchain lists the results Return to the equality judgment contract on the blockchain;
[0188] 6.5. List of results of equal judgment contract pairs on the blockchain Vote on the judgment results in the , select the true and valid judgment results, record them on the blockchain, and notify this server;
[0189] The rules for determining true and effective determination results are as follows:
[0190] Equality determination contract usage results list The judgment result in the vote is If the corresponding judgment result is 1, the cloud service is voted for;
[0191] The cloud server with the most votes and the smallest serial number selected by the equality judgment contract Judgment result As a true and effective judgment result; this server will search results Return the search results to the search user as real and valid search results;
[0192] 6.6. Equality determination contract on blockchain to determine the result As a basis, select the result list The encryption result of the server with a judgment result of 0 is used as a reference, and is combined and distributed to the judgment node for secondary equality judgment, and the result is written into the result list middle;
[0193] 6.7. The equality judgment contract on the blockchain lists the results The server with a judgment result of 0 is identified as a dishonest server, and the remaining servers are identified as honest cloud servers, and the identification results are returned to the search and distribution contract on the blockchain.
[0194] 7. Accountability Stage
[0195] The search and distribution contract on the blockchain uses the judgment result of the equal judgment contract as the basis to execute the payment refund or deduction of the deposit and provide accountability services for the data provider;
[0196] The specific process of payment, refund and deduction of deposit is as follows:
[0197] 1) If the server If a cloud server is identified as honest, the deposit of the server It will be unfrozen from the deposit pool and returned to the contract account of the server, and the fees prepaid by the search user will be of Payment to the cloud server , where N is the number of cloud servers;
[0198] 2) If the server If a cloud server is identified as malicious, the deposit of the server will be It will be unfrozen from the deposit pool and sent to the contract account of the search distribution contract to pay the verification fee of the verification node; the fee prepaid by the search user of It will be returned to the contract account of the search user; at the same time, the search distribution contract will report the relevant identity information of the malicious cloud server to the system administrator.
[0199] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A multi-user data multi-backup searchable encryption method based on blockchain, characterized in that: include: Initialization phase: The system administrator generates public parameters for the target system. , deploy the equality judgment contract on the blockchain and use a secure channel to distribute the judgment key to the equality judgment contract ; is the system safety parameter, f is a safe homomorphic XOR function, h and H are two standard hash functions, G is a standard pseudo-random function. is a string selected by the system administrator from the {0,1} string space Random number of bits; Key distribution phase: The key distribution center generates cloud server identity identifiers for data owners, multiple cloud servers in outsourced service providers, and users with different search permissions. , Cloud server search key , Cloud server determines the key , user identifier , User Search Key , data owner updates the key , User search parameters and cloud server search parameters , and distribute it to the corresponding entities, and deploy the search distribution contract for the data owner; Data update phase: Data owners use their own update keys , User search parameters , Cloud Server Search Parameters Generate encrypted data and upload it to multiple cloud servers of the outsourcing service provider; Trapdoor generation phase: The user selects a search keyword, generates a search token using his or her authorized search key, and and search token Sent to the search distribution contract on the blockchain; the search distribution contract on the blockchain freezes the user's search deposit and processes the user's search token to form an authorized search token , sent to multiple cloud servers in the outsourcing service provider; Search and match phase: Multiple cloud servers in the outsourcing service provider receive the authorization search token of the smart contract and send their own identity identifiers and cloud server prepayment deposit The search and distribution contract on the blockchain freezes the prepaid deposit of the cloud server. Subsequently, multiple cloud servers in the outsourcing service provider use the authorized search token and the stored encrypted data to search and match to obtain the result set. R ; Equality determination test phase: Multiple cloud servers in the outsourcing service provider process their own result sets separately R Get the set of equal judgment results , sent to the equality judgment contract on the blockchain; the equality judgment contract on the blockchain executes the equality judgment algorithm to identify the authentic search results, honest cloud servers and malicious cloud servers, and notifies the cloud servers corresponding to the authentic search results , the cloud server returns the corresponding result set to the search user As a search result; Accountability stage: The equality judgment contract calls the search distribution contract to execute the payment, return or deduction of the deposit. At the same time, the equality judgment contract reports the identity information of the malicious server to the system administrator, who then performs the accountability operation; Homomorphic XOR function f is defined as: , The pseudo-random function G is defined as: , in, , is generated by a standard key generator A binary random key string of bits; Homomorphic XOR function f The properties are: , in, is a homomorphic XOR function f The key of is a homomorphic XOR function f The basic form of their input is A binary random permutation string of bits; The hash function h is defined as: ;The hash function H is defined as: ;in, Refers to a 01 string space of any length, refers to 01 string space of length; The key distribution phase specifically includes the following steps: 1) The key distribution center Select four characters from the character space Random number , calculate the key ; 2) In response to the registration request sent by the data owner, the key distribution center generates the data owner update key , Self-identifier , and uses a secure channel to send the update key to the data owner , making the data owner’s identity identifier public on the blockchain At the same time, the key distribution center deploys the data owner's smart contract on the blockchain and stores the key in the smart contract. ; where the data owner's identifier is publicly recorded on the blockchain; 3) For multiple cloud servers in the system outsourcing service provider, the key distribution center generates different identity identifiers for multiple cloud servers in the outsourcing service provider , select two for each registered cloud server Random number of bits ,calculate , let the cloud server search for the key , determine the key ; Calculate cloud server search parameters , using a secure channel to send search keys to the cloud server and equality determination key , public cloud server identifier and user search parameters ; Among them, the identity identifiers of each cloud server in the outsourcing service provider and search parameters Recorded on the blockchain by the smart contract on the blockchain; 4) For registration requests sent by different users in the system, the key distribution center generates a different identity identifier for each registered user , for each registered user , select two Random number of bits ,calculate , user search parameters , allowing the user to authorize the search key ; Use a secure channel to send the authorized search key to the user , expose the user's search parameters ; where each user's search parameter It is publicly recorded on the blockchain by the smart contract on the blockchain.
2. According to claim 1, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The blockchain deployed by the system administrator is a consortium chain.
3. According to claim 1, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The data owner will perform data update operations for all outsourced cloud servers of the outsourced service provider. The data update phase specifically includes the following steps: 1) The data owner initializes two empty lists ; 2) Data owner preprocesses the database , forming a reverse index database , where the structure of the reverse index database is (keyword ,File Index ); 3) Data owner through the reverse index database get The number of file indexes under ,from Select 3 from the string space Random number of bits , and use your own update key Calculate and update auxiliary label information ; ; 4) Data owner is in the list L Medium Storage ; 5) For each (keyword ,File Index ) Yes, the data owner Select 3 from the string space Random number of bits ; 6) The data owner uses his / her own update key , User search parameters , Cloud Server Search Parameters and keywords Calculate the reverse search key ; 7) Data owner calculates reverse search tag ;in, In step 3 of the data update phase, the data owner is the keyword The random number selected; It means that after sorting in dictionary order, The document index ind sort position under the , its value range is 0 to ; 8) The data owner uses his / her own update key The key in , the user identifier who has permission to search the document index , Cloud Server Search Parameters Calculate the forward update key ; 9) Data owner calculates the positive update label ; 10) The data owner uses his / her own update key ko and the search parameters of the user with the search permission Calculate document index encryption key ; 11) The data owner uses the document index ind and the encryption key hAST to calculate the encrypted data ; 12) The data owner is stored in list L ; 13) Data owner sends a request to the cloud server Send lists Lw and L.
4. According to claim 3, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The trapdoor generation phase specifically includes the following steps: 1) User from Select 2 from the string space Random number of bits ; 2) The user uses his own authorized search key and keyword w to calculate the user search token ,in, The calculation process is as follows: ; 3) The user sends a search token to the search distribution contract on the blockchain and search for prepaid deposit ,in Refers to the prepaid fee that users pay for each cloud server on the outsourced service provider to honestly perform search operations; 4) The search distribution contract on the blockchain receives the search token sent by the user , calculate the authorization search token , where the authorization search token ; 5) Smart contracts on the blockchain will authorize search tokens Distribute to each cloud server on the outsourcing service provider and freeze the user search deposit in the deposit pool .
5. According to claim 4, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The search and matching phase specifically includes the following steps: 1) The cloud server goes through the locally stored list LW, and for each entry in the list LW , use itself to search for the key and authorization search token AST, calculate search auxiliary information ; 2) Cloud server uses search auxiliary information calculate and use and in the entry In comparison, if and If they are equal, then take out the ; 3) The cloud server traverses the locally stored list L, and for each entry in the list L , use itself to search for the key , own identity identifier , User authorization search token AST calculation reverse search key: ; 4) Cloud server uses reverse search key and step 2) of the search matching phase Calculate search tags , i ranges from 0 to ; 5) The cloud server traverses the list L, if the document and If they are equal, then take out the document entry , calculate the user encryption key , using the user encryption key Decrypting an encrypted index Get the encrypted index , where the calculated ; 6) The cloud server indexes the documents that match the search results. Add the result set R.
6. According to claim 5, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The equality determination test phase specifically includes the following steps: 1) For each document in the result set R, , the cloud server from Select 1 from the string space Random number of bits , using its own identifier , equality test key Calculate the equality judgment data ; 2) The cloud server will equalize the judgment data Add to the equality judgment data set In the example, the equal judgment data set Sort by lexicographic order and send to all decision nodes on the blockchain; 3) The decision node on the blockchain initializes an empty set ; 4) Equality determination nodes on the blockchain traverse the determination data set , for the judgment data set Each entry in , the equality test node uses the equality test key and cloud server search parameters Recalculate the judgment result , And the judgment results are collected Add to the reprocessed judgment result set , the equal judgment nodes on the blockchain will collect the judgment results Send to the equality judgment contract on the blockchain; 5) The equality judgment contract on the blockchain combines the list elements in pairs and distributes them to the equality judgment nodes on the blockchain for equality judgment. If the two encrypted data are equal, it is determined that the data returned by the two cloud servers are encryptions of the same keyword, and the algorithm outputs the identity identifiers of the two servers. and 1, and in the result list The output of the algorithm is recorded in ; if the two encrypted data are not equal, it is considered that the data returned by the two cloud servers are encryptions of different keywords, and the algorithm outputs the identity identifiers of the two servers and 0, and in the result list The output of the algorithm is recorded in The record format is , b is an identifier and The equal judgment result of is in the range of ; 6) The equal determination node on the blockchain lists the results Return to the equality judgment contract on the blockchain, the equality judgment contract on the blockchain lists the results The decision result in the voting is selected, and the decision node with the highest vote is selected and then processed by the cloud server. Judgment result As a true and valid judgment result, it is recorded on the blockchain and notified to the server, which returns the search result R as a true and valid search result to the search user; 7) Equality determination contract on the blockchain to determine the result As a basis, select the result list The encryption result of the server with a judgment result of 0 is used as a reference, and is combined and distributed to the judgment node for secondary equality judgment, and the result is written into the result list middle; 8) Equality determination contract reading result list on blockchain In the content, the result list The servers with a judgment result of 0 are considered dishonest servers, and the rest of the servers are considered honest cloud servers.
7. According to claim 6, the multi-user data multi-backup searchable encryption method based on blockchain is characterized in that: The accountability stage specifically includes the following steps: 1) If the server If a cloud server is identified as honest, the deposit of the server It will be unfrozen from the deposit pool and returned to the contract account of the server, and the fees prepaid by the search user will be of Payment to the cloud server , where N is the number of cloud servers; 2) If the server If a cloud server is identified as malicious, the deposit of the server will be It will be unfrozen from the deposit pool and sent to the contract account of the search distribution contract to pay the verification fee of the verification node; the fee prepaid by the search user of It will be returned to the contract account of the search user; at the same time, the search distribution contract will report the relevant identity information of the malicious cloud server to the system administrator.
