A blockchain-based searchable encryption system for medical data

By combining smart contracts on the blockchain, encrypted storage of medical data files and encrypted data retrieval in multi-user scenarios are achieved, which solves the shortcomings of privacy and multi-user search functions in existing technologies and improves the system's usability and the accuracy of search results.

CN116861449BActive Publication Date: 2026-07-24WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2023-05-10
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing blockchain-based searchable encryption schemes cannot simultaneously guarantee forward and backward privacy and enable multi-user search functionality, making them difficult to apply to real-world medical scenarios.

Method used

By combining smart contracts in blockchain, and through system initialization, medical data encryption, search, and monitoring modules, encrypted storage of medical data files and forward and backward privacy features in multi-user scenarios are achieved, while also supporting the legality monitoring of encrypted data and search requests.

Benefits of technology

It enables encrypted storage of medical data files and encrypted data retrieval in multi-user scenarios, ensuring the accuracy and privacy of search results, supporting the legality supervision of encrypted data, and improving the availability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116861449B_ABST
    Figure CN116861449B_ABST
Patent Text Reader

Abstract

The application discloses a kind of medical data searchable encryption systems based on block chain, including system initialization module, medical data file encryption module, medical data file update module, keyword search secret medical data module and medical data and search request supervision module.The application is based on the construction of alliance chain and public key searchable encryption, realizes the retrieval and supervision of ciphertext medical data in multi-user scene, and can realize the availability of medical data while ensuring data security and privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and in particular to a blockchain-based searchable encryption system for medical data. Background Technology

[0002] Searchable Encryption (SE) enables users to search data in encrypted form, serving as a crucial technology for ensuring the availability of medical data while maintaining security and privacy. In a searchable encryption system, the data owner stores the encrypted data on a cloud server. To search for data containing target keywords, the user constructs a search trapdoor and submits it to the cloud server, which then searches the encrypted data through the trapdoor. Because search trapdoors can only be constructed by authorized users, access control for data users is effectively implemented.

[0003] Multi-User Searchable Encryption (MUSE) is an important research direction in SE (Search Engine Engineering) and has practical research significance. In MUSE, the data owner uploads data to a cloud server and wants to share the data with multiple users. Therefore, the data owner authorizes a group of users to initiate keyword search queries and retrieve relevant files. Compared to single-user searchable encryption (where only the data owner can query the data), multi-user searchable encryption plays a crucial role in promoting data sharing. Broadcast Encryption (BE) technology can achieve multi-user data sharing and is suitable for scenarios where the number of data users is relatively fixed. In 2006, Curtmola et al. first proposed a multi-user searchable encryption scheme based on broadcast encryption, using broadcast encryption to allow the data owner to share the same encrypted data with multiple users.

[0004] Blockchain technology, as a decentralized computing paradigm with public verifiability and tamper-proof characteristics, can effectively solve the problem of unreliable third-party data search results when applied to searchable encryption technology. Smart contracts deployed in the blockchain can replace third-party servers to perform search functions. The smart contracts automatically execute the search protocol based on trigger conditions, producing correct results. Blockchain nodes record transaction results in an immutable ledger, ensuring the integrity of the transaction results without requiring further verification from the data owner. Even if one or more nodes fail or are corrupted into malicious adversaries, the fault tolerance of the blockchain consensus mechanism will not affect the correctness of the results, making the system more reliable. Furthermore, blockchain-based searchable encryption schemes can achieve new characteristics such as decentralization, fair exchange, and resistance to keyword guessing attacks.

[0005] Searchable encryption can ensure data security and privacy while maintaining data availability in medical data systems. However, in practical applications, search servers may return mismatched search results due to vested interests or single points of failure. Blockchain technology, as a decentralized computing paradigm with public verifiability and tamper-proof characteristics, can effectively solve the problem of unreliable search results from third-party servers when combined with searchable encryption. However, existing blockchain-based searchable encryption schemes cannot simultaneously guarantee forward and backward privacy and enable multi-user search functionality, making them difficult to apply to real-world medical scenarios. Summary of the Invention

[0006] This invention provides a blockchain-based searchable and encrypted medical data system. This solution combines smart contracts in the blockchain to ensure the accuracy of search results, realizes encrypted storage of medical data files and retrieval of encrypted data with forward and backward privacy features in multi-user scenarios, and supports the legality supervision of encrypted data and search requests.

[0007] To achieve the above objectives, this invention discloses a blockchain-based searchable and encrypted medical data system, comprising:

[0008] The system initialization module is used to generate the system's public parameters Param and the public-private key pair (d) of the regulatory authority SUP through the trusted authority TI. sup Q sup ) and the public / private key pair of medical data user MDU TI receives public key certificate applications from MDU and issues certificates to MDU after approval.

[0009] The medical data encryption module is used to preprocess the raw medical data through the medical data owner MDO, encrypt it using a data encryption algorithm, and then upload the encrypted medical data to the blockchain through a smart contract. The data encryption algorithm encrypts the raw medical data based on system public parameters, MDU public key and mapping.

[0010] The medical data search module is used to generate a trapdoor by MDU based on publicly available system parameters, MDU's private key, and search keywords. The smart contract then performs a search based on the publicly available system parameters, the trapdoor, and MDU's private key to obtain a set of matching results. MDU then executes a decryption algorithm on the result set to obtain a set of file indexes, which is uploaded to MCS to obtain a set of related ciphertext. Finally, the ciphertext set is decrypted to obtain the original medical data.

[0011] In one implementation, the system further includes a medical data file update module, which is specifically used for: for ordinary users, given keywords and a status pointer, calculating the updated status pointer to obtain the updated medical database, and then using a data encryption algorithm to add or delete data in the updated medical database; for newly added authorized users, generating a new public-private key pair for them, obtaining the original broadcast ciphertext, and then executing the update algorithm to obtain a new vector, wherein the update algorithm is based on the system's public parameter Param, and the set of authorized users {u i′} i′∈[1,n′] and its public key The secret values ​​r and s stored by the medical data owner, along with the set of file indexes, are updated to the vector of newly authorized users.

[0012] In one embodiment, the method further includes a medical data oversight module, which comprises: [the module's components] based on a given publicly available parameter Param and a sensitive word dictionary W... * SUP's private key d sup The public key set of the regulated objects The monitoring algorithm is executed, a hash list H is output, and H is uploaded to the blockchain via a smart contract to filter out illegal requests.

[0013] In one implementation, the system initialization module is specifically used for:

[0014] Trusted Institution (TI) uses a system establishment algorithm to generate public system parameters (Param) based on given security parameters, and a key generation algorithm to generate public-private key pairs for regulatory bodies (SUP) and medical data users (MDU).

[0015] In one implementation, the medical data encryption module is specifically used for:

[0016] The medical data owner preprocesses the raw medical data to obtain IND = {ind1, ind2, ..., ind...} m}, W = {w1, w2, ..., w D}and

[0017] Initialize ∑, execute Output

[0018] Through smart contracts Uploaded to the Medical Consortium Blockchain (MCB);

[0019] Here, IND represents the file index consisting of all medical data, ind1, ind2, and ind... mLet w1, w2, and wm represent the indexes of the first, second, and m-th medical data files, respectively. Let W represent the keyword dictionary. D These represent the first keyword, the second keyword, and the Dth keyword, respectively. This indicates that the keyword w is included. k File index, These represent the first and second indices containing the keyword, respectively; ∑ represents the keyword state pointer mapping stored in MDO; and Encrypt() represents the data encryption algorithm. This represents the public key set of MDU, DB represents the database consisting of all medical data, add represents adding a file, and EDB represents the encrypted file index dataset stored on the blockchain, which consists of encrypted medical data. Indicates the status pointer The ciphertext reference and the carrier for storing encrypted pointers, Represents file index The ciphertext reference and the carrier for storing the encrypted index, Indicates keyword w k The encrypted reference and storage carrier of encrypted keywords.

[0020] In one implementation, the medical data search module is specifically used for:

[0021] MDU Execution Output search trapdoor Among them, Trapdoor() is the trapdoor generation algorithm, which is used to generate trapdoors based on the input parameters Param, and w k Get the keyword w k Search traps;

[0022] Smart contract execution Output the matching result set RS(w) k ), where Search() is the search algorithm, which searches based on keywords in the input parameters. Search the encrypted file index dataset EDB stored on the blockchain to find the set of results RS(w) with successful keyword matches. k );

[0023] MDU Execution Output file index set I;

[0024] MDU sends I to the medical cloud server MCS, and MCS returns the relevant ciphertext set C;

[0025] MDU uses the decryption key to decrypt C and outputs the medical record file D to obtain the original medical data;

[0026] Decrypt() is the decryption algorithm, which decrypts the data based on the input parameters Param. w k and RS(w k ) Obtain the file index set I.

[0027] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:

[0028] 1. It adopts searchable encryption technology, which not only ensures the storage security of outsourced medical data compared with traditional encryption methods, but also takes into account the availability of the data.

[0029] 2. By combining smart contracts in the consortium blockchain Fabric, the problem of unreliable search results from third-party servers is effectively solved, ensuring the accuracy of search results.

[0030] 3. The use of polynomial-based broadcast encryption technology enables ciphertext data retrieval in multi-user scenarios, while also supporting the legal supervision of ciphertext data.

[0031] 4. Forward and backward privacy are achieved through a singly linked list data structure and a pseudo-random permutation function.

[0032] 5. It avoids key management and distribution operations, allowing users to independently generate search trapdoors. It has high performance in scenarios that require frequent search operations. At the same time, consortium blockchains have significant advantages in performance and overhead compared to public blockchains, and the medical data system proposed as a result also has high availability. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 A model diagram of a searchable encryption scheme based on blockchain provided in an embodiment of the present invention;

[0035] Figure 2 This is a flowchart illustrating the implementation of the system establishment algorithm in the method provided in this embodiment of the invention;

[0036] Figure 3 The flowchart illustrates the implementation of the key generation algorithm in the method provided in this embodiment of the invention.

[0037] Figure 4 This is a flowchart illustrating the implementation of the data encryption algorithm in the method provided in this embodiment of the invention;

[0038] Figure 5 This is a flowchart illustrating the implementation of the update algorithm in the method provided in this embodiment of the invention;

[0039] Figure 6 This is a flowchart illustrating the implementation of the trapdoor generation algorithm in the method provided in this embodiment of the invention.

[0040] Figure 7 This is a flowchart illustrating the implementation of the search algorithm in the method provided in this embodiment of the invention;

[0041] Figure 8 This is a flowchart illustrating the implementation of the decryption algorithm in the method provided in this embodiment of the invention.

[0042] Figure 9 This is a flowchart illustrating the implementation of the monitoring algorithm in the method provided in this embodiment of the invention;

[0043] Figure 10 This is a framework diagram of a searchable encryption system for medical data provided in the embodiments of the present invention. Detailed Implementation

[0044] To address the technical problem that existing blockchain-based searchable encryption schemes cannot simultaneously guarantee forward and backward privacy and enable multi-user search functionality, making them unsuitable for practical medical scenarios, this invention proposes a blockchain-based searchable encryption system for medical data. This scheme combines smart contracts in the blockchain to ensure the accuracy of search results, realizes encrypted storage of medical data files and retrieval of encrypted data with forward and backward privacy features in multi-user scenarios, and supports the legality supervision of encrypted data and search requests.

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] The specific symbols involved in this invention are described as follows:

[0047] κ: Safety parameter;

[0048] Param: System common parameters

[0049] G1: Additive group of order q

[0050] G2: Multiplicative group of order q

[0051] P: Generator of group G1

[0052] e: from arrive bilinear mapping

[0053] H / h: Hash function

[0054] F, F -1 Pseudo-random permutation function

[0055] Pseudo-random key permutation

[0056] key: The symmetric key for encrypting data

[0057] M max Maximum number of indexes containing the keyword.

[0058] (d sup Q sup ): Public-private key pair of the regulator

[0059] (d u Q u ): User u's public / private key pair, public key

[0060] W: Keyword dictionary W = {w1, w2, ...}

[0061] IND: Index of all files IND = {ind1, ind2, ...}

[0062] OP: Add / Delete Operations OP = {add, del} (add means add a file, del means delete a file)

[0063] Contains keyword w k File Index

[0064] Contains keyword w k Number of files

[0065] ∑: Keyword state pointer mapping stored by the data owner ∑[key]=value

[0066] VI: Version information for encrypted datasets

[0067] After the cth update, the keyword is w. k status pointer, Not involved in information storage

[0068] status pointer The ciphertext reference and the carrier for storing encrypted pointers

[0069] File Index The carrier of encrypted references and storage of encrypted indexes

[0070] Keyword w k The ciphertext reference and storage carrier of encrypted keywords

[0071] document Encrypted index

[0072] EDB: Encrypted Index Dataset of Files Stored on the Blockchain

[0073] Keyword w k Search traps

[0074] RS(w k ): Trapdoor Search results

[0075] XOR operation

[0076] ||:Connection operation

[0077] DB: Database

[0078] n: Total number of initially authorized users

[0079] n′: The total number of newly authorized users.

[0080] Please see Figure 1 The diagram below illustrates the searchable encryption method based on blockchain according to this invention. Please refer to [link / reference]. Figures 2-9 Here is the specific algorithm for a searchable encryption scheme based on blockchain:

[0081] 1. System setup algorithm Setup(κ)

[0082] (1) Given the safety parameter κ;

[0083] (2) Calculate the parameters of the bilinear pair system.

[0084] (3) Select a secure hash function (H0, H1, H2, H3, H4, h1, h2, h3, h4), where,

[0085] (4) Select a pseudo-random permutation function F: {0, 1} κ ×{0, 1} κ →{0,1}κ Its inverse permutation function is F -1 ;

[0086] (5) Output common parameters Param = (G1, G2, q, P, e, H0, H1, H2, H3, H4, h1, h2, h3, h4, F, F -1 ).

[0087] 2. Key generation algorithm KeyGen(Param)

[0088] (1) Random generation Calculate the secret value D of the derived public key u =d u ·P;

[0089] (2) Given the regulator's public key as Q sup =d sup ·P;

[0090] (3) Random selection The public key of the data user

[0091] (4) Output the public key

[0092] 3. Data encryption algorithm

[0093] (1) Given the system public parameter Param, the authorized data user's public key Database DB, mapping ∑, encrypted data authorized user {u i} i∈[1,n] and its public key

[0094] (2) Random selection Calculate the version information of this encrypted database: VI = r·P;

[0095] (3) Random selection Construct polynomial Let vector

[0096] Where z i is z in f(z) i The coefficient;

[0097] (4) For each keyword w in the keyword set W k :

[0098] a) Search If the result is empty, then let

[0099] b) Randomly generate pseudo-random permutation keys calculate

[0100] c) Update mapping

[0101] d) Given a state pointer and the symmetric key for encrypting the file;

[0102] e) Calculation

[0103] f) Calculate the encrypted index

[0104] g) Calculation

[0105] h) Calculate the trapdoor for the keyword wk to be stored.

[0106] i) Calculation

[0107] (5) Output encrypted database

[0108]

[0109] 4. Update Algorithm

[0110] (1) Given the system parameter Param, update the authorized user set {u i′} i′∈[1,n′] and its public key Secret values ​​r and s stored by the data owner, and a set of file indexes.

[0111] (2) Calculate the polynomial g(z) = f(z) - s;

[0112] (3) Calculate the new authorized polynomial

[0113] (4) Output vector Where z′ i z is in polynomial f′(z) i The coefficient.

[0114] 5. Trapdoor Generation Algorithm

[0115] (1) Given the public parameter Param, the authorized user {u i} i∈[1,n] and its private key Keyword w k ;

[0116] (2) Calculate user u i Secret Value

[0117] (3) Obtain the version information of the keyword wk: VI = r·P, and calculate the intermediate value.

[0118] (4) Calculate H0(V) 0 H0(V) 1 , …,H0(V) n ;

[0119] (5) Calculate the secret value

[0120] (6) Output trapdoor

[0121] 6. Search Algorithm

[0122] (1) Given the common parameter Param, the keyword w k Search traps and the encrypted database EDB;

[0123] (2) Initialize the empty set

[0124] (3) Calculate the keyword w k encrypted citation carrier

[0125] (4) Retrieve stored keywords w from EDB k carrier of encrypted keywords like If the result is ⊥, then the search will terminate and return. Otherwise, calculate the state pointer.

[0126] (5) Calculate the status pointer encrypted citation carrier

[0127] (6) Retrieve the storage state pointer from the EDB carrier of encrypted pointers like If the result is ⊥, then the search will terminate and return. Otherwise, calculate

[0128] (7) Calculate the file index encrypted citation carrier

[0129] (8) Retrieve the storage file index from EDB carrier of encrypted index

[0130] (9) Calculation

[0131] (10) Order

[0132] (11) Calculate the last updated state

[0133] (12) Order Proceed to step (6);

[0134] (13) After the loop ends, output the search result set RS(w) k ).

[0135] 7. Decryption Algorithm

[0136] (1) Given the public parameter Param, the authorized user {u i} i∈[1,n] and its private key Result set RS(w k );

[0137] (2) Initialize the empty file index set

[0138] (3) For each

[0139] a) Calculation

[0140] b) If op=add, let Otherwise, do not update I;

[0141] (4) Output set I, obtain the encrypted data from the cloud server based on I and use the key to decrypt it to obtain the plaintext.

[0142] 8. Regulatory Algorithm

[0143] (1) Given the common parameter Param, the authorized user u i public key The regulator's private key d sup and sensitive word set W * ;

[0144] (2) Initialize the secret value list and hash value list

[0145] (3) For each ui , i∈[1,n]:

[0146] a) Calculate user u i Secret Value

[0147] b) Calculate the secret value s by taking steps (3)(4)(5) of Trapdoor, and let S = S∪s;

[0148] (4) For each s∈S, w k ∈W * :

[0149] a) Calculation

[0150] b) Calculation make

[0151] c) Calculation

[0152] d) Calculation

[0153] (5) Output hash value list H (Search supervision: the search traps T generated by DU) w (Matching against the H list to intercept illegal search requests) and set I (file supervision: accessing CS using the file index in set I to locate the corresponding illegal file).

[0154] The searchable encryption system for medical data is designed based on a blockchain-based searchable encryption scheme. It mainly realizes the encrypted storage of medical data files and secure retrieval by multiple users, while also supporting the legality supervision of encrypted data and search requests.

[0155] This invention provides a blockchain-based searchable and encrypted medical data system, comprising:

[0156] The system initialization module is used to generate the system's public parameters Param and the public-private key pair (d) of the regulatory authority SUP through the trusted authority TI. sup Q sup ) and the public / private key pair of medical data user MDU TI receives public key certificate applications from MDU and issues certificates to MDU after approval.

[0157] The medical data encryption module is used to preprocess the raw medical data through the medical data owner MDO, encrypt it using a data encryption algorithm, and then upload the encrypted medical data to the blockchain through a smart contract. The data encryption algorithm encrypts the raw medical data based on system public parameters, MDU public key and mapping.

[0158] The medical data search module is used to generate a trapdoor by MDU based on publicly available system parameters, MDU's private key, and search keywords. The smart contract then performs a search based on the publicly available system parameters, the trapdoor, and MDU's private key to obtain a set of matching results. MDU then executes a decryption algorithm on the result set to obtain a set of file indexes, which is uploaded to MCS to obtain a set of related ciphertext. Finally, the ciphertext set is decrypted to obtain the original medical data.

[0159] Please see Figure 10 This is a framework diagram for a searchable encrypted system for medical data.

[0160] In one implementation, the system further includes a medical data file update module, which is specifically used for: for ordinary users, given keywords and a status pointer, calculating the updated status pointer to obtain the updated medical database, and then using a data encryption algorithm to add or delete data in the updated medical database; for newly added authorized users, generating a new public-private key pair for them, obtaining the original broadcast ciphertext, and then executing the update algorithm to obtain a new vector, wherein the update algorithm is based on the system's public parameter Param, and the set of authorized users {u i′} i′∈[1,n′] and its public key The secret values ​​r and s stored by the medical data owner, along with the set of file indexes, are updated to the vector of newly authorized users.

[0161] The specific implementation steps of the medical data file update module are as follows:

[0162] The update method for regular users is as follows:

[0163] a) Given keywords w′ k and its status pointer

[0164] b) Calculate the status pointer Output in For keywords containing w′ k The file index is defined by IND′, where IND′ is the set of file indexes to be updated, and W′ is the dictionary of keywords to be updated.

[0165] c) Call or Add / delete items.

[0166] The update method for authorized users is as follows:

[0167] a) Generate a new MDU public / private key pair

[0168] b) Obtain the original broadcast ciphertext implement Output new vector

[0169] In the specific implementation process, the data encryption algorithm and update algorithm used in this module are as described in Algorithm 3 and Algorithm 4 above.

[0170] In one embodiment, the method further includes a medical data oversight module, which comprises: [the module's components] based on a given publicly available parameter Param and a sensitive word dictionary W... * SUP's private key d sup The public key set of the regulated objects The monitoring algorithm is executed, a hash list H is output, and H is uploaded to the blockchain via a smart contract to filter out illegal requests.

[0171] Specifically, the implementation process of the medical data supervision module is as follows:

[0172] (1) Given the public parameter Param, the sensitive word dictionary W * SUP's private key d sup The public key set of the regulated objects

[0173] (2) SUP execution Output the hash list H;

[0174] (3) SUP uploads H to the Medical Consortium Chain MCB via a smart contract to filter illegal requests.

[0175] In the specific implementation process, the monitoring algorithm used in this module is as described in Algorithm 8 above.

[0176] In one implementation, the system initialization module is specifically used for:

[0177] Trusted Institution (TI) uses a system establishment algorithm to generate public system parameters (Param) based on given security parameters, and a key generation algorithm to generate public-private key pairs for regulatory bodies (SUP) and medical data users (MDU).

[0178] In the specific implementation process, the system establishment algorithm and key generation algorithm used in this module are as described in Algorithm 1 and Algorithm 2 above.

[0179] In one implementation, the medical data encryption module is specifically used for:

[0180] The medical data owner preprocesses the raw medical data to obtain IND = {ind1, ind2, ..., ind...} m}, W = {w1, w2, ..., w D}and

[0181] Initialize ∑, execute Output

[0182] Through smart contracts Uploaded to the Medical Consortium Blockchain (MCB);

[0183] Here, IND represents the file index consisting of all medical data, ind1, ind2, and ind... m Let w1, w2, and wm represent the indexes of the first, second, and m-th medical data files, respectively. Let W represent the keyword dictionary. D These represent the first keyword, the second keyword, and the Dth keyword, respectively. This indicates that the keyword w is included. k File index, These represent the first and second indices containing the keyword, respectively; ∑ represents the keyword state pointer mapping stored in MDO; and Encrypt() represents the data encryption algorithm. This represents the public key set of MDU, DB represents the database consisting of all medical data, add represents adding a file, and EDB represents the encrypted file index dataset stored on the blockchain, which consists of encrypted medical data. Indicates the status pointer The ciphertext reference and the carrier for storing encrypted pointers, Represents file index The ciphertext reference and the carrier for storing the encrypted index, Indicates keyword w k The encrypted reference and storage carrier of encrypted keywords.

[0184] In the specific implementation process, the data encryption algorithm used in this module is as described in Algorithm 3 above.

[0185] In one implementation, the medical data search module is specifically used for:

[0186] MDU Execution Output search trapdoor Among them, Trapdoor() is the trapdoor generation algorithm, which is used to generate trapdoors based on the input parameters Param, and w k Get the keyword w k Search traps;

[0187] Smart contract execution Output the matching result set RS(w) k), where Search() is the search algorithm, which is used to search based on the keywords in the input parameters. Search the encrypted file index dataset EDB stored on the blockchain to find the set of results RS(w) with successful keyword matches. k );

[0188] MDU Execution Output file index set I;

[0189] MDU sends I to the medical cloud server MCS, and MCS returns the relevant ciphertext set C;

[0190] MDU uses the decryption key to decrypt C and outputs the medical record file D to obtain the original medical data;

[0191] Decrypt() is the decryption algorithm, which decrypts the data based on the input parameters Param. w k and RS(w k ) Obtain the file index set I.

[0192] In the specific implementation process, the trapdoor generation algorithm, search algorithm, and decryption algorithm used in this module are as described in Algorithm 5, Algorithm 6, and Algorithm 7 above.

[0193] The correctness of the algorithm proposed in this invention will be analyzed below:

[0194] • When generating the search trapdoor, for the broadcast polynomial Authorized user u i You can use a private key Calculate the secret value s:

[0195]

[0196] After obtaining s, calculate the search trapdoor. You can then search based on the trapdoor.

[0197] • In the supervision of encrypted data, given the supervisor's private key d sup and authorized users' partial public keys calculate The specific calculation steps are as follows:

[0198]

[0199] get Then, the secret value s used for searching and decryption can be calculated as described above.

[0200] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0201] 1. It adopts searchable encryption technology, which, compared with traditional encryption methods, not only ensures the storage security of outsourced medical data, but also takes into account the availability of the data.

[0202] 2. By combining smart contracts in the consortium blockchain Fabric, the problem of unreliable search results from third-party servers is effectively solved, ensuring the accuracy of search results.

[0203] 3. The use of polynomial-based broadcast encryption technology enables ciphertext data retrieval in multi-user scenarios, while also supporting the legal supervision of ciphertext data.

[0204] 4. Forward and backward privacy are achieved through a singly linked list data structure and a pseudo-random permutation function.

[0205] 5. It avoids key management and distribution operations, allowing users to independently generate search trapdoors. It has high performance in scenarios that require frequent search operations. At the same time, consortium blockchains have significant advantages in performance and overhead compared to public blockchains, and the medical data system proposed as a result also has high availability.

[0206] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0207] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0208] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations to the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A blockchain-based searchable and encrypted medical data system, characterized in that, include: The system initialization module is used to generate publicly available system parameters through the Trusted Organization (TI). Public and private key pairs of regulatory bodies (SUPs) and the public / private key pair of medical data user MDU TI receives public key certificate applications from MDU and issues certificates to MDU after approval. The medical data encryption module is used to preprocess the raw medical data through the medical data owner MDO, encrypt it using a data encryption algorithm, and then upload the encrypted medical data to the blockchain through a smart contract. The data encryption algorithm encrypts the raw medical data based on system public parameters, MDU public key and mapping. The medical data search module is used to generate a trapdoor by MDU based on the system's public parameters, MDU's private key, and search keywords. The smart contract then performs a search based on the system's public parameters, the trapdoor, and MDU's private key to obtain a set of matching results. MDU then executes a decryption algorithm on the result set to obtain a set of file indexes, which is uploaded to MCS to obtain a set of related ciphertext. Finally, the ciphertext set is decrypted to obtain the original medical data. The medical data search module is specifically used for: MDU Execution Output search trapdoor ,in, () represents the trapdoor generation algorithm, which generates trapdoors based on input parameters. , and Get keywords Search traps; Smart contract execution Output the set of matching results ,in, () represents a search algorithm that searches for keywords in the input parameters. Encrypted index dataset of files stored on the blockchain The search returned a set of results where the keywords were successfully matched. ; MDU Execution Output file index set ; MDU will The message is sent to the Medical Cloud Server (MCS), which returns a set of related encrypted messages. ; MDU uses a decryption key Decryption Output medical record files To obtain the original medical data; in, This is a decryption algorithm, its function is to decrypt based on the input parameters. , , and Get the file index set .

2. The blockchain-based searchable and encrypted medical data system as described in claim 1, characterized in that, The system also includes a medical data file update module, which is specifically used for: for ordinary users, given keywords and a status pointer, calculating the updated status pointer to obtain the updated medical database, and then using a data encryption algorithm to add or delete data in the updated medical database; for newly authorized users, generating a new public-private key pair, obtaining the original broadcast ciphertext, and then executing the update algorithm to obtain a new vector, wherein the update algorithm is based on publicly available system parameters. Authorized user set and its public key Secret values ​​kept by medical data owners The file index set is updated with the vector of newly authorized users.

3. The blockchain-based searchable and encrypted medical data system as described in claim 1, characterized in that, The system also includes a medical data oversight module, which comprises: enabling regulatory agencies to monitor data based on given publicly available parameters. sensitive word dictionary SUP's private key The public key set of the regulated objects Execute the regulatory algorithm and output a hash list. and through smart contracts Uploaded to the blockchain to filter out illegitimate requests.

4. The blockchain-based searchable and encrypted medical data system as described in claim 1, characterized in that, The system initialization module is specifically used for: Trusted Institutions (TI) uses a system establishment algorithm to generate publicly available system parameters based on given security parameters. A key generation algorithm is used to generate public-private key pairs for the regulatory body SUP and for medical data users MDU.

5. The blockchain-based searchable and encrypted medical data system as described in claim 1, characterized in that, The medical data encryption module is specifically used for: The medical data owner preprocesses the raw medical data to obtain... , and ; initialization ,implement Output ; Through smart contracts Uploaded to the Medical Consortium Blockchain (MCB); in, This represents a file index that comprises all medical data. , and These represent the indexes of the first medical data file, the second medical data file, and the third medical data file, respectively. An index of a medical data file, This represents a keyword dictionary. , and These represent the first keyword, the second keyword, and the Dth keyword, respectively. Indicates the presence of keywords File index, , These represent the first and second indexes containing the keywords, respectively. This represents the key state pointer mapping stored in the MDO. Indicates the data encryption algorithm. Represents the set of public keys for MDU. A database representing all medical data. This indicates adding a file. This refers to a file encrypted index dataset stored on the blockchain, which consists of encrypted medical data. Indicates the status pointer The ciphertext reference and the carrier for storing encrypted pointers, Represents file index The ciphertext reference and the carrier for storing the encrypted index, Keywords The encrypted reference and storage carrier of encrypted keywords.