Block chain assisted verifiable multi-keyword search encryption method
Through blockchain-assisted smart contracts and ABE encryption solutions, the multi-keyword search efficiency and data security problems in the existing searchable encryption methods are solved, and fair transactions and data security sharing between cloud servers and users are realized, ensuring that The accuracy and completeness of medical data.
Patent Information
- Application Number
- CN202410656030.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-08-13
AI Technical Summary
Existing searchable encryption methods have problems in search efficiency and data security, especially in the issue of multi-keyword search and cloud server untrustworthy, which makes search results difficult to guarantee inaccurate and fairness, especially in medical data. There may be serious consequences in electronic health records.
Adopt blockchain-assisted verifiable multi-keyword search encryption method, and deploy smart contracts and contract mechanisms through authorization centers to ensure that the verification and payment process of search results are transparent and fair, reduce dependence on third parties, and the inability to use blockchain Forgedness and transparency, combined with ABE encryption scheme to achieve secure sharing and access control of data.
Realize fair transactions between cloud servers and users, ensure the accuracy and completeness of search results, reduce malicious behavior, improve system reliability and user privacy protection, reduce dependence on third parties, and improve medical care. Secure sharing of data and search efficiency.
Smart Images

Figure CN118487828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer medical technology, and in particular to a blockchain-assisted verifiable multi-keyword search encryption method. Background Art
[0002] Searchable encryption is an encryption primitive that allows searching encrypted data uploaded to a cloud server. Searchable encryption provides the ability to return target ciphertext based on specific search keywords without leaking personal information to the cloud server, thus ensuring the security of user privacy data. This technology not only fully utilizes the powerful computing power of cloud servers, but also helps users save a lot of network and computing overhead.
[0003] Existing searchable encryption methods can be divided into two categories: searchable symmetric encryption and searchable public key encryption. However, traditional data sharing technologies have some problems in search efficiency. At present, many searchable encryption methods only support single keyword search, which may cause users to receive a large number of irrelevant search results or files. In reality, not all search results meet the needs of users. A practical solution should have the ability to search multiple keywords. Returning all successfully matched search results to users will not only increase the computational burden, but also consume a lot of network bandwidth. In order to improve efficiency, users are allowed to search for multiple keywords in each query, and the most relevant encrypted files containing these keywords are returned to save network bandwidth. Taking the medical industry as an example, doctors may prefer to obtain information related to the patient's condition rather than other irrelevant parts, which helps to improve the quality of medical care. Therefore, it is necessary to consider retrieving target files quickly and accurately according to user needs.
[0004] In addition, in reality, cloud servers are usually "honest but curious", that is, they are not completely trustworthy. They may be curious about some sensitive information, and although they will perform search operations correctly, they may still have some dishonest behaviors. For example:
[0005] (1) Tampering with encrypted data: The cloud server may tamper with the received encrypted data.
[0006] (2) Colluding with malicious users to send wrong search results: Cloud servers may collude with malicious users to send wrong search results.
[0007] (3) Save storage space to earn more profits: In order to earn more profits, cloud servers may save more storage space, delete some encrypted data, and then forge relevant search results when users need them. Users may also claim that the results are incorrect after obtaining the target data and refuse to pay the service fee. This will lead to the unfair phenomenon of "paying for service". In today's pay-as-you-go cloud environment, cloud service providers certainly want to charge service fees when sending search results, while users want to pay service fees after obtaining the target data and verifying the correctness of the results.
[0008] Therefore, it is urgent to implement a fair, reliable solution that supports ciphertext retrieval verification to ensure that the cloud server can get the service fee after performing the service, and the search data obtained by the user can be accurate and complete. Especially in the context of electronic health records, the accuracy of search results directly affects the patient's medical treatment process. If a diagnosis is made based on wrong information, it may lead to devastating consequences. Therefore, we need to verify the search results to ensure their reliability.
[0009] When implementing verification-supported solutions, traditional methods usually rely on trusted third parties, but this often requires a lot of time and human resources. In recent years, blockchain technology has emerged as a very promising solution. Researching efficient and fair multi-keyword searchable encryption methods for outsourced decryption not only has high theoretical value, but also has important significance in practical applications. Because it is unforgeable, open and transparent. The fairness mechanism of blockchain is applied to the searchable encryption mechanism through smart contracts. Due to the characteristics of unchangeable and automatic execution of smart contracts deployed on the blockchain, malicious behavior can be avoided from interfering with it. Combining blockchain technology with searchable encryption can solve the trust problem of traditional solutions, achieve fair transactions, and ensure that when users and cloud servers honestly execute according to the agreement, cloud servers can obtain service fees, and users can also obtain the target results they need. Once the cloud server's behavior is dishonest, it cannot obtain service fees. In addition, once the user obtains the target data, it cannot refuse to pay the service fee. By using blockchain technology and smart contracts, we can establish a decentralized trust mechanism, reduce dependence on third parties, and improve the reliability of the entire system. This approach can not only protect the rights and interests of cloud servers and users, but also ensure the fairness and transparency of transactions. Therefore, the application of blockchain in the field of searchable encryption provides a new prospect for solving the time and human resource consumption problems in traditional solutions.
[0010] Therefore, it is necessary to provide a blockchain-assisted verifiable multi-keyword search encryption method to solve the above technical problems. Summary of the invention
[0011] In order to solve the above technical problems, the present invention provides a blockchain-assisted verifiable multi-keyword search encryption method.
[0012] The present invention provides a blockchain-assisted verifiable multi-keyword search encryption method, which specifically comprises the following steps:
[0013] S1. In the initialization phase, the authorization center AA deploys the deposit pool contract, the doctor authority management contract, the verification contract, and the fair payment and penalty contract. The cloud server deploys the search contract, and generates the public parameter PP and the master key MSK according to the user attribute set U and the security parameter k through the authorization center AA, and secretly saves the master key MSK. Then, the user's private key SK, conversion key TK and retrieval key RK are generated according to the user's attribute set S, public parameter PP and master key MSK.
[0014] S2, the cloud server, doctors and patients first deposit a certain amount of deposit into the deposit pool in order to perform subsequent operations;
[0015] S3. The doctor encrypts the plaintext medical record file m, and uses the public parameter PP to encrypt the plaintext medical record file to generate the ciphertext CT through secret sharing; and selects the keyword set WD from the medical record file, uses the hash function to calculate each keyword, and generates the index I. Then the doctor uploads the ciphertext CT and index I to the cloud server and blockchain for storage respectively;
[0016] S4. When the patient has a search demand, the patient generates a search trapdoor TD locally using his own private key SK and sends the search trapdoor TD to the doctor. The doctor then initiates a search request. Before executing the search operation, the search contract first verifies whether the doctor has the search permission. If yes, the search operation is executed through the search function in the search contract, otherwise 0 is returned;
[0017] S5. The cloud server performs the search operation and pre-decrypts the search results, and then sends them to the verification contract for verification. The verification contract verifies the correctness of the search results through the verification function.
[0018] If the search result passes the verification, the subsequent fair payment operation is executed, and the fair payment and penalty contract initiates a transfer operation to the deposit pool contract through the payment function;
[0019] If the verification fails, it proves that there is a malicious party, and the penalty function is executed, deducting the deposit of the cloud server and the doctor, and returning the patient's deposit;
[0020] S6. The local user only needs to perform a simple calculation by retrieving the key RK to obtain the original plaintext medical record file m.
[0021] Preferably, the specific method for the authorization center AA in S1 to generate the public parameter PP and the master key MSK according to the user attribute set U and the security parameter k is:
[0022] The attribute set is U = {1, 2, ... N}, let G, G1 be the additive group and multiplicative group of order p, Z p is an integer group of order p, k is a security parameter, there exists a mapping e:G×G→G1, g is a generator of the additive group G1,
[0023] The authorization center AA selects a secure hash function H1: {0,1} * →G,H2:{0,1} * →Z p .
[0024] The authorization center AA has a unique attribute i∈U in the attribute set in the integer group Z. p Randomly select s i ,calculate Then, a, α, z are randomly selected to generate public parameters PP and master key MSK = α, z.
[0025] Preferably, the specific method of generating the user's private key SK, conversion key TK and retrieval key RK according to the user's attribute set S, public parameter PP and master key MSK in S1 is:
[0026] The authorization center AA uses each attribute i in the user's attribute set S, the master key MSK and the public parameter PP to generate a p Randomly select t from the equation and calculate K = g α g at ,L=g t ,
[0027] The authorization center AA randomly selects y,z∈Z p , calculated K1 = g yz ,K2=g y ,
[0028] Each user's corresponding private key
[0029] The authorization center AA then calculates the conversion key
[0030] TK={K′1=(K1) 1 / z ,K'2=(K2) 1 / z ,K'=(K) 1 / z ,L'=(L) 1 / z ,K i' =(K i ) 1 / z},
[0031] Let the retrieval key RK = {z}.
[0032] Preferably, the specific method of encrypting the plain text medical record file using the public parameter PP to generate the ciphertext CT in S3 is:
[0033] Input public parameters PP, plaintext m and linear secret sharing scheme LSSS access structure, A = (M, ρ) is a l × n matrix, ρ is a mapping that maps the rows of the matrix M to attributes;
[0034] First, the algorithm selects a random number r i ∈Z p ,calculate and The doctor then randomly selects the vector s is the secret exponent to be shared; for each row i of m, the algorithm computes λ i =M i v;
[0035] Doctor Calculation Cryptogram Finally, the ciphertext CT is returned.
[0036] Preferably, the specific method of selecting a keyword set WD from the medical record file in S3 and calculating each keyword using a hash function to generate an index I is as follows:
[0037] For each keyword w in WD j , the algorithm randomly selects an r1 belonging to Z p ;
[0038] The doctor then calculated W3=g ar ;
[0039] The algorithm then outputs the keyword index I = {{W j} j∈[1,d] ,W1,W2,W3} and transmits it to the blockchain through a secure channel. Finally, the algorithm returns the keyword index I.
[0040] Preferably, in S4, the specific method for the patient to generate the search trapdoor TD locally using his own private key SK is:
[0041] The patient randomly selects β∈Z according to his / her private key, public parameter PP and the keyword WD' he / she wants to query. p , for w in the keyword set WD' j 'Calculate the search trap
[0042] Preferably, before performing the search operation in S4, the search contract first verifies whether the doctor has the search authority. The specific verification method is: the search contract takes the trap door TD and the index I as input, and then BC checks whether the following equation is established:
[0043]
[0044] Preferably, in S6, the local user only needs to perform a simple calculation by retrieving the key RK to obtain the original plaintext medical record file m, and the specific calculation formula is:
[0045]
[0046] Compared with the related art, the blockchain-assisted verifiable multi-keyword search encryption method provided by the present invention has the following beneficial effects:
[0047] 1. The present invention uses the collaboration between cloud servers and blockchains to adopt a hybrid storage model on and off the blockchain. Our solution not only reduces the storage burden on the user side, but also provides users with data search and lightweight decryption. Due to the unforgeable, open and transparent characteristics of blockchains, blockchain technology is applied to searchable encryption mechanisms, which solves the problem of cloud server corruption and enables service fairness between users and cloud servers. In order to achieve flexible access control and secure sharing of data, the ABE scheme is used to encrypt data, which also protects user privacy. The scheme designs four types of smart contracts, among which the patient management contract checks whether the user has search permissions, thereby achieving the security of the search function; the fair payment contract achieves fairness between doctors and patients and avoids many unnecessary troubles; the verification contract can determine the correctness of the search results returned by the cloud without the need for additional verification by local users; the penalty contract realizes the deposit deduction for malicious participants and reduces the occurrence of malicious behavior. We have conducted security analysis through rigorous proofs, and the implementation of this scheme will be conducive to the secure sharing of medical data. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a preferred embodiment of a blockchain-assisted verifiable multi-keyword search encryption method provided by the present invention;
[0049] Figure 2 Functional interaction diagram of each smart contract provided by the present invention;
[0050] Figure 3 The present invention provides a flowchart for the specific operation execution of each algorithm of the solution. DETAILED DESCRIPTION
[0051] 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 part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0052] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The following is a detailed description of the specific implementation of a blockchain-assisted verifiable multi-keyword search encryption method in conjunction with a specific embodiment.
[0054] The present invention provides a blockchain-assisted verifiable multi-keyword search encryption method, including: smart contract design:
[0055] Deposit Pool Contract: This contract allows users to deposit Ether as a deposit and withdraw these funds when needed. The contract supports three main operations: depositing funds, withdrawing funds, and transferring funds from one account to another. These operations are recorded through blockchain events, providing transparency and auditability for all transactions. The contract requires sufficient account balance before transfer to avoid negative balance, thereby ensuring the security of fund transfers. In addition, the contract also provides basic support for mechanisms such as payment and punishment.
[0056] Doctor authority management contract: This contract is responsible for managing doctor authority and ensuring that only authorized doctors can perform searches. The authority center can be one or more trusted medical service providers, or it can be a core node in the alliance blockchain network that is responsible for managing doctor authority in the alliance blockchain system. This contract is responsible for adding or removing doctors' search authority by maintaining a mapping table that records which doctor addresses have the right to initiate search requests, thereby ensuring that only authorized doctors can access sensitive medical data and perform search operations.
[0057] Search contract: Executed by the cloud server responsible for processing the search request initiated by the doctor to the system. Before executing the search, it verifies whether the doctor who initiated the request has the corresponding permissions to ensure that only authorized doctors can use the search function. This contract embodies one of the core functions, which is to allow doctors to search according to the needs of patients while ensuring the safety and compliance of the operation.
[0058] Verification contract: This contract is responsible for receiving and verifying search results, and decides whether to execute payment or penalty operations based on the verification results. If the verification is successful, it will trigger the payment process and distribute the fees in the patient's deposit to the doctor and the cloud server. If the verification fails, it will execute the penalty mechanism, deduct the deposit of the doctor and the cloud server, and return it to the patient. This contract is a key part of ensuring search results and fair transactions.
[0059] Fair Payment and Penalty Contract: This contract manages the payment and penalty logic of the search service by interacting with the deposit pool contract. Once the search results are verified, the contract will distribute the search fee in the patient's deposit to the doctor and cloud server providing the service in a predetermined ratio. Specifically, the doctor and the cloud server each receive half of the payment amount. If the search results fail to pass verification, the contract will perform a penalty operation, deducting the corresponding amount from the doctor and cloud server's deposits and transferring the amount to the patient.
[0060] Encryption method design:
[0061] 1. Initialization phase
[0062] AA is a completely credible authority center, and the attribute set is U = {1,2,…N}. Let G, G1 be the additive group and multiplicative group of order p, Z p is an integer group of order p, k is a security parameter, there exists a mapping e:G×G→G1, g is a generator of the additive group G1, AA selects a secure hash function H1:{0,1} * →G,H2:{0,1} * →Z p .AA For each attribute i∈U in the attribute set, in the integer group Z p Randomly select s i ,calculate Then, a, α, z are randomly selected to generate public parameters PP and master key MSK = α, z.
[0063] As a fully trusted participant, AA is also responsible for the deployment of the deposit pool contract, doctor authorization contract, verification contract, and fair payment and penalty contract.
[0064] AA uses each attribute i in the user's attribute set S, the master key MSK and the public parameter PP to generate a p Randomly select t and calculate K = g α g at ,L=g t , AA randomly selects y,z∈Z p , calculated K1 = g yz ,K2=g y , the private key corresponding to each user Then AA calculates the transformation key TK = {K′1 = (K1) 1 / z ,K'2=(K2) 1 / z ,K'=(K) 1 / z ,L'=(L) 1 / z ,K i' =(K i ) 1 / z}, let the retrieval key RK = {z}.
[0065] 2. Ciphertext index generation phase
[0066] Input public parameters PP, plaintext M and linear secret sharing scheme LSSS access structure, A = (M, ρ) is a l × n matrix, ρ is a mapping that maps the rows of matrix M to attributes. First, the algorithm selects a random number r i ∈Z p ,calculate and The doctor then randomly selects the vector s is the secret exponent to be shared. For each row i of M, the algorithm calculates λ i =M i v. Doctor calculates ciphertext Finally, the ciphertext CT is returned.
[0067] In the index generation phase, the doctor calculates the keyword index I through the public parameter PP and the keyword set WD (containing d keywords). j , the algorithm randomly selects an r1 belonging to Z p The doctor then calculates W3=g ar . Then the algorithm outputs the keyword index I = {{W j} j∈[1,d] ,W1,W2,W3} and transmits it to the blockchain through a secure channel. The final algorithm returns the keyword index I. This process allows the creation of an index that can be searched in an encrypted environment without exposing the specific keyword content.
[0068] 3. Trapdoor Generation Phase
[0069] In this stage, the patient randomly selects β∈Z according to his private key, public parameter PP and the keyword WD' he wants to query. p , for w in the keyword set WD' j' Calculate the search trapdoor The patient then sends the trapdoor to the doctor for subsequent search operations.
[0070] 4. Search, outsourcing decryption and verification phase
[0071] The doctor initiates a search request to the doctor management contract and verifies the search permission, and then the search contract executes the search, which takes the trap door TD and index I as input. Then BC checks whether the following equation holds:
[0072]
[0073] The above calculation involves matching keywords in the index with keywords in the trapdoor. In the keyword encryption phase, the algorithm encrypts the d keywords that generate the index. The patient generates a trapdoor based on the d' keywords he wants to query, where d'≤d. In order to verify whether the equation is valid, the number of searches for d' keywords selected from d keywords is
[0074] By inputting the public parameter PP, the conversion key TK, and the ciphertext CT to be decrypted, if the user's attribute set S satisfies the access structure (M, ρ) corresponding to the ciphertext CT, then pre-decryption is started, otherwise 0 is output.
[0075] definition Then calculate the constant ω i ∈Z p Make If {ω i} is a valid share of the secret value s, then The decryption operation is then performed as follows:
[0076] By inputting the public parameter PP, the conversion key TK and the pre-decrypted ciphertext CT", the verification contract performs the following operations: if It proves that the pre-decryption stage is correct, otherwise the output is 0.
[0077] 5. Decryption phase
[0078] The user only needs to perform the following calculation once by retrieving the key RK to get the original plaintext:
[0079]
[0080] The correctness and safety of the present invention are given below:
[0081] Correctness:
[0082] Search for correctness:
[0083]
[0084]
[0085]
[0086] If and only if {w j′ |j′=1,2,…,d′}={w j |j=1,2,…,d′}, the above two formulas are equal. Only in this case, formula (1) holds.
[0087] Outsourced decryption correctness:
[0088] The correctness of the calculation in the outsourced decryption phase is shown below:
[0089]
[0090] Security:
[0091] Proposition 1: If the CP-ABE scheme is selectively secure under chosen plaintext attacks (CPA), then our proposed scheme can also achieve selective security under chosen plaintext attacks (CPA).
[0092] Proof: Assuming that adversary A can crack our scheme with a non-negligible advantage under the selected plaintext attack model, we can construct an algorithm B that can crack the CP-ABE scheme with a non-negligible advantage under the selected plaintext attack model.
[0093] Let C be the challenger corresponding to B in the selective CPA security game in CP-ABE. Perform the following steps:
[0094] Initialization: A gives B a challenge access policy A * , B will A * Send it to C as its challenge access strategy and give the CP-ABE solution
[0095] Phase 1: B initializes an empty table T and an empty set D, and A issues the following adaptive query: When A performs an adaptive query on the private key associated with the attribute set S, B checks whether (SK, TK, RK) exists in table T. If so, B returns the private key SK. Otherwise, B returns the private key SK in Z. p Randomly select t, y, z and calculate K = g α g at ,L=g t , SK is then sent to A, and (S, SK) is added to table T. Note that B does not know the actual retrieval key RK=z.
[0096] Challenge: Adversary A submits two plaintexts m0 and m1 of the same length. B selects a random bit β∈{0,1}, two random bits corresponding to access structure A *The plaintext m0, m1 and send them to C. C selects a random bit γ∈{0,1} and uses the encryption algorithm of the CP-ABE scheme with public parameters PP and access policy A. * Encrypted plaintext m γ , then CT * Send to B. Then B for each row M of the matrix M i Choose a random vector B randomly selects r i' ∈Z p , calculated Finally, we will challenge the ciphertext CT * ={C,C',C i ,D i}i∈[1,l] is sent to A.
[0097] Phase 2: Adversary A issues a private key adaptive query similar to Phase 1, with the restriction that the attribute set S cannot satisfy access policy A * , and S is not contained in T.
[0098] Guess: A gives a guess β'∈{0,1}ofβ, and B gives a guess β'∈{0,1}ofγ. If β=γ, B has completed a perfect attack. Therefore, if A can crack our scheme with a non-negligible advantage, then the algorithm B we constructed can also break the CP-ABE scheme with a non-negligible advantage.
[0099] Proposition 2: Our scheme can achieve the confidentiality of keywords in the blockchain.
[0100] Proof: All actions performed by users in the blockchain network are recorded in a tamper-proof manner. In the scheme proposed in this paper, keywords are stored in the blockchain in the form of ciphertext. The blockchain connects blocks in order through cryptographic technology, and the header of each block contains the hash value of the previous block. After the data is written to the blockchain, the blockchain network nodes directly monitor the information contained in the encrypted data, and each node backs up the storage. In other words, all nodes of the blockchain will store a copy. Only entities authorized by the blockchain network nodes can access the keyword ciphertext to obtain medical data. If a malicious node attempts to access or modify the keywords of the patient's medical data, it must be verified by the authorization contract and needs to meet the consensus of at least 51% of the nodes in the entire network. Therefore, the confidentiality of the keywords can be guaranteed on the blockchain.
[0101] The circuits and controls involved in the present invention are all prior art and will not be described in detail here.
[0102] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A blockchain-assisted verifiable multi-keyword search encryption method, characterized in that: include: The specific steps are: S1. In the initialization phase, the authorization center AA deploys the deposit pool contract, the doctor authority management contract, the verification contract, and the fair payment and penalty contract. The cloud server deploys the search contract, and generates the public parameter PP and the master key MSK according to the user attribute set U and the security parameter k through the authorization center AA, and secretly saves the master key MSK. Then, the user's private key SK, conversion key TK and retrieval key RK are generated according to the user's attribute set S, public parameter PP and master key MSK. S2, the cloud server, doctors and patients first deposit a certain amount of deposit into the deposit pool in order to perform subsequent operations; S3, the doctor encrypts the plaintext medical record file m, and uses the public parameter PP to encrypt the plaintext medical record file to generate the ciphertext CT through secret sharing; The doctor selects a keyword set WD from the medical record file, calculates each keyword using a hash function, and generates an index I. The doctor then uploads the ciphertext CT and index I to the cloud server and blockchain for storage. S4. When the patient has a search demand, the patient generates a search trapdoor TD locally using his own private key SK and sends the search trapdoor TD to the doctor. The doctor then initiates a search request. Before executing the search operation, the search contract first verifies whether the doctor has the search permission. If yes, the search operation is executed through the search function in the search contract, otherwise 0 is returned; S5. The cloud server performs the search operation and pre-decrypts the search results, and then sends them to the verification contract for verification. The verification contract verifies the correctness of the search results through the verification function. If the search result passes the verification, the subsequent fair payment operation is executed, and the fair payment and penalty contract initiates a transfer operation to the deposit pool contract through the payment function; If the verification fails, it proves that there is a malicious party, and the penalty function is executed, deducting the deposit of the cloud server and the doctor, and returning the patient's deposit; S6. The local user only needs to perform a simple calculation by retrieving the key RK to obtain the original plaintext medical record file m.
2. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 1, characterized in that: The specific method for the authorization center AA in S1 to generate the public parameter PP and the master key MSK according to the user attribute set U and the security parameter k is: The attribute set is U = {1, 2, ... N}, let G, G1 be the additive group and multiplicative group of order p, Z p is an integer group of order p, k is a security parameter, there exists a mapping e:G×G→G1, g is a generator of the additive group G1, The authorization center AA selects a secure hash function H1: {0,1} * →G,H2:{0,1} * →Z p .; The authorization center AA has a unique attribute i∈U in the attribute set in the integer group Z. p Randomly select s i ,calculate Then, a, α, z are randomly selected to generate public parameters PP and master key MSK = α, z.
3. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 2, characterized in that: The specific method of generating the user's private key SK, conversion key TK and retrieval key RK according to the user's attribute set S, public parameter PP and master key MSK in S1 is: The authorization center AA uses each attribute i in the user's attribute set S, the master key MSK and the public parameter PP to generate a p Randomly select t from the equation and calculate K = g α g at ,L=g t , The authorization center AA randomly selects y,z∈Z p , calculated K1 = g yz ,K2=g y , Each user's corresponding private key The authorization center AA then calculates the conversion key TK={K1'=(K1) 1 / z ,K'2=(K2) 1 / z ,K'=(K) 1 / z ,L'=(L) 1 / z ,K i' =(K i ) 1 / z }, Let the retrieval key RK = {z}.
4. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 3, characterized in that: The specific method of using the public parameter PP to encrypt the plain text medical record file to generate the cipher text CT in S3 is: Input public parameters PP, plaintext m and linear secret sharing scheme LSSS access structure, A = (M, ρ) is a l × n matrix, ρ is a mapping that maps the rows of the matrix M to attributes; First, the algorithm selects a random number r i ∈Z p ,calculate and The doctor then randomly selects the vector s is the secret exponent to be shared; for each row i of m, the algorithm computes λ i =M i v; Doctor Calculation Ciphertext Finally, the ciphertext CT is returned.
5. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 4, characterized in that: In S3, a keyword set WD is selected from the medical record file, and each keyword is calculated using a hash function to generate an index I. The specific method is: For each keyword w in WD j , the algorithm randomly selects an r1 belonging to Z p ; The doctor then calculated W3=g ar ; The algorithm then outputs the keyword index I = {{W j } j∈[1,d] ,W1,W2,W3} and transmits it to the blockchain through a secure channel. Finally, the algorithm returns the keyword index I.
6. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 5, characterized in that: In S4, the patient generates the search trapdoor TD locally using his own private key SK. The specific method is: The patient randomly selects β∈Z according to his / her private key, public parameter PP and the keyword WD' he / she wants to query. p , for w in the keyword set WD' j 'Calculate the search trap 7. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 6, characterized in that: Before performing the search operation, the search contract first verifies whether the doctor has the search permission. The specific verification method is as follows: the search contract takes the trap door TD and the index I as input, and then BC checks whether the following equation is true:
8. A blockchain-assisted verifiable multi-keyword search encryption method according to claim 1, characterized in that: In S6, the local user only needs to perform a simple calculation by retrieving the key RK to obtain the original plaintext medical record file m. The specific calculation formula is:
Citation Information
Cited By
Multi-keyword searchable encryption method and system based on block chain
CN120124089A
