Verifiable electronic health record ciphertext search scheme in cloud-assisted electronic environment
By employing a verifiable and searchable encryption scheme based on blockchain technology and hash chain design, the security and dynamic data update issues in cloud-assisted electronic medical record systems are resolved. This enables public verification and efficient searching, protects the privacy of electronic health records, and reduces resource waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN UNIV OF SCI & TECH
- Filing Date
- 2025-02-25
- Publication Date
- 2026-04-28
AI Technical Summary
In existing cloud-assisted electronic medical record systems, existing searchable encryption schemes suffer from problems such as security relying on a trusted center for a single point of failure, lack of support for dynamic data updates, and reduced computational costs when search results are empty.
By employing blockchain technology and hash chains, a verifiable and searchable encryption scheme is designed. System parameters are generated through a trusted center, data owners encrypt files and indexes and upload them to a cloud server, data users generate search trapdoors, the cloud server performs searches and returns results, all participants can verify the correctness of the results through the blockchain, and data users decrypt the index locally to ensure security and privacy.
It enables public verification of search results without relying on a trusted central authority, supports dynamic data updates and parallel searches, while providing forward and backward security, protecting the privacy of electronic health records and reducing the waste of communication and computing resources.
Smart Images

Figure CN121940149A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a cloud-assisted electronic environment-based verifiable encrypted search scheme for electronic health records. Background Technology
[0002] Secure and efficient medical data retrieval, a key service of cloud-assisted electronic medical records, has attracted widespread attention from industry and academia. In current database systems, search methods still primarily target plaintext data. However, since patient medical records often contain sensitive information, and remote cloud servers are inherently insecure, this approach inevitably risks leaking sensitive patient information, posing a challenge to data security and privacy. A naive solution is to encrypt the data using classic encryption schemes (such as AES) before outsourcing. When users need to search for a file, they first download the entire encrypted dataset and then search on the decrypted data. Clearly, such a solution wastes valuable communication and computing resources. Therefore, secure and efficient search operations on encrypted data are essential.
[0003] Searchable Encryption (SE) is a promising cryptographic primitive that allows searching encrypted data in cloud-assisted electronic medical records. Specifically, in this approach, the data owner generates an encrypted index and outsources it to the cloud along with the encrypted data. The data user can then issue a search query using a token, and the cloud retrieves the matching index without decryption. Most SE schemes assume that the cloud must be an honest but curious adversary that attempts to infer some sensitive information but honestly follows the prescribed protocols. However, in practice, this assumption does not always hold true in cases of random failures, software bugs, malicious behavior, etc.
[0004] However, existing verifiable search engine (SE) methods are known to have the following security and functional limitations. First, the verification process of most methods heavily relies on a specific verifier, which is a trusted or honest but curious entity. In other words, such methods are vulnerable to single points of failure. Second, many existing verifiable SE schemes are designed only for static data. Therefore, these methods do not support EHRs (Extremely Highly Optimal Responses). Last but not least, many verifiable SE schemes fail when the search results are empty; this allows malicious clouds to exploit this vulnerability to reduce computational costs. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a cloud-assisted electronic environment-based verifiable encrypted electronic health record search solution.
[0006] The technical solution of this invention to solve the above-mentioned technical problems is: a verifiable and searchable encryption scheme, comprising the following steps:
[0007] (1) System establishment phase: Trusted Center (such as government) BC determines the security level and establishes system parameters;
[0008] (2) Key generation stage: The trusted center authenticates the actual identities of the DO and DU, and respectively
[0009] Issue a valid certificate;
[0010] (8) Update Phase: DO encrypts the files and indexes, generates proofs for all keywords, and sends the ciphertext of the files and indexes to CS. The proofs for the keywords are publicly verified after being submitted to BC;
[0011] (9) Trapdoor generation stage: DU generates a search trapdoor for the requested keyword and sends it to CS via blockchain;
[0012] (10) Search phase: CS finds all matching search results and returns them to DU via BC;
[0013] (11) Verification phase: Any participant can verify the correctness of the returned result based on the keyword proof sent by DU and the corresponding trapdoor;
[0014] (12) Decryption stage: After receiving the results returned by BC, DU decrypts them to obtain the corresponding index;
[0015] The above-verified cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (1), aims to initialize the system by generating and publishing system parameters and synchronizing the initial states of participants. Let (Fp, G1, P, q) represent parameters related to elliptic curves. Let hi ∈{0,5} :{0,1} λ →{0,1} λ Let H be six different collision-resistant hash functions that have the same input and output lengths, but different outputs for the same input. k (·) is a safe hash function.
[0016] F 1,2 (·) are two pseudo-random functions, E k (·) / D k (·) are secure symmetric encryption schemes. A core step in this algorithm is ensuring that each participant synchronizes their initial state. This involves two main steps: 1) DO needs to maintain a global counter that can be accessed by other participants but cannot be modified by them. 2) BC initializes four empty mappings T. i=1,2,3,4 CS reserves an empty mapping T5. These mappings store data in key-value pairs, i.e., T i[key] = value.
[0017] In the aforementioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, step (2) aims to generate public / private key pairs (PK, sk) for DO and DU. DO and DU each select two random numbers. and Use it as your private key and set the corresponding public key PK. o = aP, PKu = bP. This step assumes that each participant has the correct public key.
[0018] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, the specific process of updating in step (3) is as follows: the protocol updates the encrypted database by adding or deleting files. Broadly speaking, it includes two processes: encryption and updating. During the encryption process, DO encrypts each key index pair extracted from the database. Specifically, DO first calculates the master private key key = sk o PK u Once DO has confirmed DU's identity, it can pre-calculate the master private key key=sk o PK u For each keyword ω i DO generates two types of ciphertext and a proof, stored as key-value pairs. The first type is... in It is |DB(ω) i )| and previous state The encrypted text. Its function is to record the current state. The previous state is linked to a hidden single list. The second type is indexed ciphertext. Where j∈[1,…,|DB(ω) i These ciphertexts construct a network based on... A hidden star structure centered on [the target]. To verify the correctness of the returned results, DO [presumably referring to a specific algorithm or method] builds upon previous proofs. Generate a proof hash value of the encrypted index With ω i The relevant proofs form a hash proof chain, similar to a blockchain. During the update process, DO sends the ciphertext and proof to BC and CS. Subsequently, both BC and CS store this information in key-value pairs. To store data in BC, DO can achieve this by deploying a simple smart contract on an Ethereum or Hyperledger platform.
[0019] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, the specific process of the trapdoor in step (4) is as follows: to search for ω i All files, DU retrieves v l ←T1[l] and calculate the key ←sk u PK o This key plays an authentication role because only authorized users can know it. It then generates a value. And As a trapdoor sent to BC, CS can retrieve the value by searching the blockchain where DU sent it. Note that DU cannot directly send the trapdoor to CS, as this ensures that the trapdoor will not be modified or rejected by DU.
[0020] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, the specific search process in step (5) is as follows: aiming to retrieve all matching encrypted data Rω i Corresponding to the trapdoor In short, the search process mainly consists of three parts: decryption, retrieval, and self-verification. First, CS uses a trapdoor. Decrypting the ciphertext Determine the current state and the previous state The size of the corresponding dataset | DB(ω) i Second, CS retrieves the matched ciphertext. Use a for loop to decrypt it to the encrypted index E. Usage Status As the key, our search algorithm incorporates an autovariable process, unlike other schemes. Specifically, CS calculates the hash value for all matching ciphertexts. And based on the previous status Retrieve previous proofs from the blockchain.
[0021]
[0022] Then, CS verifies the equation. The validity of the result is verified by checking if the equation holds true. If the equation holds true, CS will... Add to Rω i Then, the next loop is executed. Otherwise, it indicates that some error occurred in the above process, and CS must repeat the entire process until no errors occur. It is worth mentioning that the verification operation is used only by CS to prevent internal calculation errors. Furthermore, in our scheme, CS does not send the results directly to DU. Instead, it sends them to BC to ensure that the results cannot be tampered with or rejected.
[0023] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (6), the specific verification process is as follows: each participant can perform verification. To confirm, the verifier first retrieves Rω from the blockchain. i And parse it as Then, the verifier calculates It then checks if it matches what is retrieved from the blockchain. If the above tests pass, the validity of the result is guaranteed. Our scheme implements public verification because all the necessary information can be obtained from BC.
[0024] The aforementioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (7) decryption, differs from most existing schemes in that our scheme requires an additional decryption algorithm to decrypt the search results. This is done to achieve backward security, where each index is returned in encrypted form, preventing the CS from knowing any information about the returned file indexes, including which files have been previously deleted. To obtain the correct index of the matching file, the DU needs to decrypt them after receiving the returned results. The most basic operation in the decryption process is a symmetric encryption decryption operation, which leads to efficient processing. Furthermore, the algorithm is executed locally on the data user's end, thus having minimal real-time requirements.
[0025] The beneficial effects of this invention are as follows:
[0026] 1. This invention proposes a blockchain-based publicly verifiable SE scheme to protect the privacy of sensitive data in the EHR system and mitigate the vulnerability of existing SE schemes.
[0027] 2. This invention applies blockchain and anti-hash chain in the solution design process, enabling it to support public verification of search results without the need for a trusted center.
[0028] 3. This invention designs a novel hidden structure in the solution, supporting dynamic data updates and parallel search, while providing forward safety guarantees. Our solution also achieves backward safety at the cost of sacrificing one round of interaction. Attached Figure Description
[0029] Figure 1 This is a system framework diagram of the present invention.
[0030] Figure 2 This is the overall flowchart of the present invention. Detailed Implementation
[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0032] like Figure 1 As shown, Figure 1 The system framework diagram of this invention shows that the data owner (DO) outsources a large number of encrypted files, along with searchable index ciphertext, to the CS for subsequent keyword search queries. Furthermore, the proof for each keyword is uploaded to the BC. To enjoy the content search service, the data user (DU) submits a valid search trapdoor to the BC for a secure query. After completing the search, the DU retrieves the encrypted search results from the BC, decrypts them, and obtains the actual index of the file. Then, the DU submits these indexes to the CS to request the corresponding file. Upon receiving the search trapdoor, the CS executes a search algorithm to find all matching index ciphertexts and records the search results on the blockchain, ensuring tamper-proof integrity and enabling public verification. The blockchain (BC) is responsible for maintaining three records: 1) the proof submitted by the DO, 2) the trapdoor submitted by the DU, and 3) the search results submitted by the CS. Based on the transparency and immutability of the blockchain, all records are visible and trustworthy to all participants.
[0033] like Figure 2 As shown, a cloud-assisted electronic environment verifiable encrypted electronic health record search scheme includes the following steps:
[0034] (1) System establishment phase: Trusted Center (such as government) BC determines the security level and establishes system parameters;
[0035] (2) Key generation stage: The Trusted Center authenticates the actual identities of DO and DU and issues valid certificates to them respectively;
[0036] (3) Update Phase: DO encrypts the files and indexes, generates proofs for all keywords, and sends the ciphertext of the files and indexes to CS. The proofs for the keywords are submitted to BC for public verification;
[0037] (4) Trapdoor generation stage: DU generates a search trapdoor for the requested keyword and sends it to CS via blockchain;
[0038] (5) Search phase: CS finds all matching search results and returns them to DU through BC;
[0039] (6) Verification phase: Any participant can verify the correctness of the returned result based on the keyword proof and corresponding trapdoor sent by DU;
[0040] (7) Decryption stage: After receiving the results returned by BC, DU decrypts them to obtain the corresponding index.
[0041] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (1), aims to initialize the system by generating and publishing system parameters and synchronizing the initial state of participants. Let (Fp, G1, P, q) represent parameters related to elliptic curves. Let hi ∈{0,5} :{0,1} λ →{0,1} λ Let H be six different collision-resistant hash functions that have the same input and output lengths, but different outputs for the same input. k (·) is a safe hash function, F 1,2 (·) are two pseudo-random functions, E k (·) / D k (·) are secure symmetric encryption schemes. A core step in this algorithm is ensuring that each participant synchronizes their initial state. This involves two main steps: 1) DO needs to maintain a global counter that can be accessed by other participants but cannot be modified by them. 2) BC initializes four empty mappings T. i=1,2,3,4 CS reserves an empty mapping T5. These mappings store data in key-value pairs, i.e., T i [key] = value.
[0042] In the aforementioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, step (2) aims to generate public / private key pairs (PK, sk) for DO and DU. DO and DU each select two random numbers. and Use it as your private key and set the corresponding public key PK. o = aP, PKu = bP. This step assumes that each participant has the correct public key.
[0043] The verifiable search encryption method described above, specifically the update process in step (3), involves the protocol updating the encryption database by adding or deleting files. Broadly speaking, it comprises two processes: encryption and updating. During encryption, DO encrypts each key index pair extracted from the database. Specifically, DO first calculates the master private key key = sk o PK u Once DO has confirmed DU's identity, it can pre-calculate the master private key key=sk o PK u For each keyword ω i DO generates two types of ciphertext and a proof, stored as key-value pairs. The first type is... in It is |DB(ω) i )| and previous state The encrypted text. Its function is to record the current state. The previous state is linked to a hidden single list. The second type is indexed ciphertext. Where j∈[1,…,|DB(ω) i These ciphertexts construct a network based on... A hidden star structure centered on [the target]. To verify the correctness of the returned results, DO [presumably referring to a specific algorithm or method] builds upon previous proofs. Generate a proof hash value of the encrypted index With ω i The relevant proofs form a hash proof chain, similar to a blockchain. During the update process, DO sends the ciphertext and proof to BC and CS. Subsequently, both BC and CS store the information in key-value format. To store data in BC, DO can achieve this by deploying a simple smart contract on an Ethereum or Hyperledger platform. In the electronic health record ciphertext search scheme, the specific process of the trapdoor in step (4) is as follows: to search for data containing ω i All files, DU retrieves v l ←T1[l] and calculate the key ←sk u PK o This key plays the role of identity verification
[0044] The aforementioned verifiable authentication role in a cloud-assisted electronic environment is known only to authorized data users. It then generates a value. And As a trapdoor sent to BC, CS can retrieve the value by searching the blockchain where DU sent it. Note that DU cannot directly send the trapdoor to CS, as this ensures that the trapdoor will not be modified or rejected by DU.
[0045] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, the specific search process in step (5) is as follows: aiming to retrieve all matching encrypted data Rω i Corresponding to the trapdoor In short, the search process mainly consists of three parts: decryption, retrieval, and self-verification. First, CS uses a trapdoor. Decrypting the ciphertext Determine the current state and the previous state The size of the corresponding dataset | DB(ω) i Second, CS retrieves the matched ciphertext. Use a for loop to decrypt it to the encrypted index E. Usage Status As the key, our search algorithm incorporates an autovariable process, unlike other schemes. Specifically, CS calculates the hash value for all matching ciphertexts. And based on the previous status Retrieve previous proofs from the blockchain.
[0046]
[0047] Then, CS verifies the equation. The validity of the result is verified by checking if the equation holds true. If the equation holds true, CS will... Add to Rω i Then, the next loop is executed. Otherwise, it indicates that some error occurred in the above process, and CS must repeat the entire process until no errors occur. It is worth mentioning that the verification operation is used only by CS to prevent internal calculation errors. Furthermore, in our scheme, CS does not send the results directly to DU. Instead, it sends them to BC to ensure that the results cannot be tampered with or rejected.
[0048] The above-mentioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (6), the specific verification process is as follows: each participant can perform verification. To confirm, the verifier first retrieves Rω from the blockchain. i And parse it as Then, the verifier calculates It then checks if it matches what is retrieved from the blockchain. If the above tests pass, the validity of the result is guaranteed. Our scheme implements public verification because all the necessary information can be obtained from BC.
[0049] The aforementioned cloud-assisted electronic environment verifiable electronic health record encrypted search scheme, in step (7) decryption, differs from most existing schemes in that our scheme requires an additional decryption algorithm to decrypt the search results. This is done to achieve backward security, where each index is returned in encrypted form, preventing the CS from knowing any information about the returned file indexes, including which files have been previously deleted. To obtain the correct index of the matching file, the DU needs to decrypt them after receiving the returned results. The most basic operation in the decryption process is a symmetric encryption decryption operation, which leads to efficient processing. Furthermore, the algorithm is executed locally on the data user's end, thus having minimal real-time requirements.
Claims
1. A cloud-assisted electronic environment-based verifiable encrypted electronic health record search scheme, characterized in that, Includes the following steps: (1) System establishment phase: Trusted Center (such as government) BC determines the security level and establishes system parameters; (2) Key generation stage: The trusted center authenticates the actual identities of the DO and DU, and respectively Issue a valid certificate; (3) Update phase: DO encrypts the files and indexes, generates proofs for all keywords, and sends the ciphertext of the files and indexes to CS. The proofs for the keywords are publicly verified after being submitted to BC. (4) Trapdoor generation stage: DU generates a search trapdoor for the requested keyword and sends it to CS via the blockchain. (5) Search phase: CS finds all matching search results and returns them to DU via BC. (6) Verification phase: Any participant can verify the correctness of the returned result based on the keyword proof and corresponding trapdoor sent by DU. (7) Decryption stage: After receiving the results returned by BC, DU decrypts them to obtain the corresponding index.
2. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 1, characterized in that, In step (1), the algorithm aims to initialize the system by generating and publishing system parameters, as well as the initial states of the synchronizing participants. Let (Fp, G1, P, q) represent the parameters associated with the elliptic curve. Let hi ∈{0,5} :{0,1} λ →{0,1} λ Let H be six different collision-resistant hash functions that have the same input and output lengths, but different outputs for the same input. k (·) is a safe hash function, F 1,2 (·) are two pseudo-random functions, E k (·) / D k (·) are secure symmetric encryption schemes. A core step in this algorithm is ensuring that each participant synchronizes their initial state. This involves two main steps: 1) DO needs to maintain a global counter that can be accessed by other participants but cannot be modified by them. 2) BC initializes four empty mappings T. i=1,2,3,4 CS reserves an empty mapping T5. These mappings store data in key-value pairs, i.e., T i [key] = value.
3. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 2, characterized in that, In step (2), the purpose is to generate a public / private key pair (PK, sk) for DO and DU. DO and DU each select two random numbers. and Use it as your private key and set the corresponding public key PK. o = aP, PKu = bP. This step assumes that each participant has the correct public key.
4. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 3, characterized in that, The specific process of updating in step (3) is as follows: the protocol updates the encrypted database by adding or deleting files. Broadly speaking, it includes two processes: encryption and updating. During the encryption process, DO encrypts each key index pair extracted from the database. Specifically, DO first calculates the master private key key = sk o PK u Once DO has confirmed DU's identity, it can pre-calculate the master private key key=sk o PK u For each keyword ω i DO generates two types of ciphertext and a proof, stored as key-value pairs. The first type is... in It is |DB(ω) i )| and previous state The encrypted text. Its function is to set the current state The previous state is linked to a hidden single list. The second type is indexed ciphertext. Where j∈[1, ...,|DB(ω) i These ciphertexts construct a network based on... A hidden star structure centered on [the target]. To verify the correctness of the returned results, DO [presumably referring to a specific algorithm or method] builds upon previous proofs. Generate a proof hash value of the encrypted index With ω i The relevant proofs form a hash proof chain, similar to a blockchain. During the update process, DO sends the ciphertext and proof to BC and CS. Subsequently, both BC and CS store this information in key-value pairs. To store data in BC, DO can achieve this by deploying a simple smart contract on an Ethereum or Hyperledger platform.
5. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 4, characterized in that, The specific process of creating the trapdoor in step (4) is as follows: to search for the trapdoor containing ω i All files, DU search v l ←T1[l] and calculate the key ←sk u PK o This key plays an authentication role because only authorized users can know it. It then generates a value. And As a trapdoor sent to BC, CS can retrieve the value by searching the blockchain where DU sent it. Note that DU cannot directly send the trapdoor to CS, as this ensures that the trapdoor will not be modified or rejected by DU.
6. The cloud-assisted electronic environment verifiable encrypted electronic health record search scheme according to claim 5, characterized in that, The specific process of the search in step (5) is as follows: The aim is to retrieve all matching encrypted data Rω. i Corresponding to the trapdoor In short, the search process mainly consists of three parts: decryption, retrieval, and self-verification. First, CS uses a trapdoor. Decrypting the ciphertext Determine the current state and the previous state The size of the corresponding dataset | DB(ω) i Second, CS retrieves the matched ciphertext. Use a for loop to decrypt it to the encrypted index E. Usage Status As the key, our search algorithm incorporates an autovariable process, unlike other schemes. Specifically, CS calculates the hash value for all matching ciphertexts. And based on the previous status Retrieve previous proofs from the blockchain. Then, CS verifies the equation. The validity of the result is verified by checking if the equation holds true. If the equation holds true, CS will... Add to Rω i Then execute the next loop. Otherwise, it indicates that some error occurred in the above process, and CS must repeat the entire process until no errors occur. It is worth mentioning that the verification operation is used only by CS to prevent internal calculation errors. Furthermore, in our scheme, CS does not send the results directly to DU. Instead, it sends them to BC to ensure that the results cannot be tampered with or rejected.
7. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 6, characterized in that, The verifiable search encryption method described above, specifically the verification process in step (6), involves each participant performing verification. To confirm, the verifier first retrieves Rω from the blockchain. i And parse it as ..., Then, the verifier calculates It then checks if it matches what is retrieved from the blockchain. If the above tests pass, the validity of the result is guaranteed. Our scheme implements public verification because all the necessary information can be obtained from BC.
8. The cloud-assisted electronic environment verifiable electronic health record encrypted search scheme according to claim 7, characterized in that, In step (7), decryption, unlike most existing schemes, our scheme requires an additional decryption algorithm to decrypt the search results. This is done to achieve backward security, where each index is returned in ciphertext to prevent the CS from knowing any information about the returned file indexes, including which files have been previously deleted. To obtain the correct index of the matching file, the DU needs to decrypt them after receiving the returned results. The most basic operation in the decryption process is the decryption of symmetric encryption, which leads to efficient processing. Furthermore, the algorithm is executed locally on the data user's end, thus having minimal real-time requirements.