A privacy-protecting medical data sharing method, system and device

By using the Trusted Execution Environment (TEE) for encryption processing in medical data sharing, and dividing keys and indexes according to sensitivity, the problems of high communication overhead and high computational complexity of privacy protection methods in the existing technology are solved, and an efficient, Secure medical data sharing.

CN118260794BActive Publication Date: 2024-08-23CHINA JAPAN FRIENDSHIP HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410216559.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2024-08-23
Estimated Expiration
2044-02-27

AI Technical Summary

Technical Problem

In the existing medical data sharing process, privacy protection methods have problems such as high communication overhead, high computational complexity, and large errors, making it difficult to effectively protect patient privacy and data accuracy.

Method used

Use Trusted Execution Environment (TEE) to encrypt medical data, divide keywords according to medical items and sensitivity, calculate random keys and perform index mapping, achieve safe storage and decryption of ciphertext, and control the length of ciphertext or key , using symmetric encryption algorithms to improve data security.

Benefits of technology

Effectively protect patient privacy, ensure the accuracy and security of medical data, reduce hardware performance requirements, and achieve efficient encryption and fine-grained secure sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118260794B
    Figure CN118260794B
Patent Text Reader

Abstract

The present invention provides a privacy-protected medical data sharing method, system and device, which relates to the field of bio-information security technology. The method includes: after calculating a random key through a server-side TEE based on a keyword, encrypting the medical data according to the index, obtaining the medical data ciphertext and inputting it into the database; when querying, the TEE encryption client submits identity information and keywords to the server-side TEE, the server-side TEE feeds back the random key ciphertext to the TEE encryption client, sends the medical data ciphertext to the client, and the client decrypts the medical data ciphertext to obtain the medical data; when sharing, the authorizing party TEE encryption client submits the authorization signature result, the identity identification and keywords of the second client to the server-side TEE, the server-side TEE sends the random key ciphertext to the authorized party TEE encryption client, sends the medical data ciphertext to the authorized party client, and the authorized party client decrypts the medical data. This solution can improve the confidentiality effect and efficiency when sharing medical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bio-information security technology, and in particular to a privacy-protecting medical data sharing method, system and device. Background Art

[0002] Medical data often includes a lot of personal privacy information, such as allergies, infectious disease history, genetic defects, etc., which are characterized by large quantity, high importance and high sensitivity. In the process of data storage and sharing, how to effectively protect the patient's bio-information security and privacy is the primary technical issue to consider.

[0003] At present, privacy protection methods in the process of medical data sharing mainly rely on technologies such as secure multi-party computing, homomorphic encryption, searchable encryption and differential privacy. Among them, secure multi-party computing needs to be implemented through secret sharing protocols and multi-round interaction protocols, which has a large communication overhead; the security of homomorphic encryption and searchable encryption depends on the difficult problems in multiplication cycle groups or lattice theory, resulting in large computational complexity, ciphertext length and key length; differential privacy is to add noise to the original information, such as Laplace noise, Gaussian noise, etc., to maintain data availability while ensuring data privacy, but the calculation accuracy is low and will cause errors, so it is not suitable for medical data. Summary of the invention

[0004] The purpose of the present invention is to provide a privacy-protected medical data sharing method, system and device to solve at least one of the above-mentioned technical problems existing in the prior art.

[0005] In a first aspect, in order to solve the above technical problems, the present invention provides a privacy-protected medical data sharing method, comprising the following steps:

[0006] Step 11, divide the medical results of person A into various medical data according to medical items and sensitivity, and then add keywords; based on the keywords, calculate the random key through the trusted execution environment (Trusted Execution Environment, TEE) of the server, referred to as server TEE; based on the random key, encrypt the medical data according to the index, and input the obtained medical data ciphertext into the database; the sensitivity refers to the impact of the medical item on the health of the person himself and others, and the greater the impact, the higher the sensitivity level; the keywords include medical items and sensitivity levels;

[0007] Step 12, when the person A queries his own medical data, he submits the identity information and keywords to the server TEE through the first TEE encryption client; after the identity authentication is qualified, the server TEE encrypts the random key according to the keyword and the public key of the first TEE encryption client, obtains the random key ciphertext and feeds it back to the first TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the first client; the first client decrypts the random key through the random key ciphertext and its own private key, decrypts the medical data ciphertext, and obtains the medical data; the first TEE encryption client refers to the client in the first client used to communicate with the server TEE, and does not restrict whether the chip of the first client is set with a trusted execution environment;

[0008] Step 13. When other person B needs to query the medical data of person A, keywords are sent to person A through the second client; person A sets sharing permissions according to the sensitivity level; the authorization signature result, the identity of the second client, keywords and sharing permissions are submitted to the server TEE through the first TEE encryption client; after the authorization signature result and the legitimacy of the identity of the second client are authenticated, the server TEE encrypts the random key according to the keyword and the public key of the second TEE encryption client, obtains the random key ciphertext and sends it to the second TEE encryption client, and based on the index, sends the corresponding medical data ciphertext and sharing permissions in the database to the second client; the second client decrypts the random key through the random key ciphertext and its own private key, decrypts the medical data ciphertext, obtains the medical data and stores it according to the sharing permissions; the second TEE encryption client refers to the client in the second client used to communicate with the server TEE, and does not restrict whether the chip of the second client is set with a trusted execution environment.

[0009] Through the above steps, the patient's medical data can be classified according to medical items and sensitivity, and the necessary medical data can be shared and authorized according to the actual situation; TEE technology is used for encryption processing, which can provide calculation accuracy equivalent to that of traditional 64-bit register CPU, ensuring the accuracy of medical data; the advantages of algorithms such as symmetric encryption in TEE are used to improve the security of medical data during storage and sharing.

[0010] In a feasible implementation manner, the step 11 specifically includes:

[0011] Step 110: After dividing the medical results of person A into various medical data according to medical items and sensitivity, add keywords and input them into the server TEE;

[0012] Step 111: In the server TEE, select the pseudorandom function (PRF) and random seed of the corresponding encryption level according to the sensitivity level in the keyword. , according to a medical data Keywords , calculate the corresponding random key ;

[0013] Step 112: Select a hash algorithm , the random key Mapping to medical data Index ;

[0014] Step 113: Use a random key , for medical data Encrypt to get the medical data ciphertext ;

[0015] Step 114: The server TEE uses the index , encrypt medical data Import into database.

[0016] Through the above steps, the key can be managed in a closed manner in the TEE, and the medical data can be securely stored in the database after being encrypted, so that the key and the medical data can be stored in partitions.

[0017] In a feasible implementation, the pseudo-random function may select a key derivation function in the national encryption SM9 standard.

[0018] In a feasible implementation manner, the hash algorithm may select collision-resistant hash functions such as SHA-256 and SM3.

[0019] In a feasible implementation manner, the step 12 specifically includes:

[0020] Step 120: Query medical data of person A When the client communicates with the server TEE through the first TEE encryption client, the legitimacy of the TEE operating environment is remotely authenticated;

[0021] Step 121: The first TEE encrypted client sends its own identity information and keywords To the server TEE; the identity information includes the signature result and identity ; The signature result The first client uses its own private key Identify yourself Obtained after signing;

[0022] Step 122: The server TEE has a pre-stored private key The corresponding public key And registration identity information, through the public key Verify the signature result Legitimacy, identity verification through registered identity information Legality: If both verifications are legal, the verification is passed and step 123 is executed; otherwise, step 12 is terminated;

[0023] Step 123: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ; In this way, the characteristic of pseudo-random function as a deterministic function can be used to calculate an unchanging random key based on an unchanging random seed and keyword;

[0024] Step 124: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ;

[0025] Step 125: The server TEE encrypts the client's public key based on the first TEE , for random keys Encrypt and get the random key ciphertext Feedback to the first TEE encryption client;

[0026] Step 126: Server-side TEE based on index , retrieve the corresponding medical data ciphertext in the database ;

[0027] Step 127: The server encrypts the medical data Sending to the first client;

[0028] Step 128: The first client uses a random key ciphertext and your own private key , decrypt the corresponding random key ;

[0029] The private key With the public key A set of public and private key pairs belonging to the first client, the private key is distributed to the first client in advance by the server TEE ;

[0030] Step 129: The first client uses a random key , for medical data encryption Decrypt and get medical data .

[0031] Through the above steps, patients and other medical data owners can query their own medical data safely and accurately, and the ciphertext or key length can be controlled within 300B. Compared with the ciphertext or key length of up to 300KB in homomorphic encryption or searchable encryption technology, it greatly reduces the space occupied, which is conducive to encrypting large amounts of medical data with different sensitivity levels.

[0032] In a feasible implementation, the specific method of remote authentication in step 120 includes: the server-side TEE collects relevant information of the current running environment and generates a summary of information including hash values ​​of executable programs and memory data; the server-side TEE signs the summary with its internal private key, and sends the summary and signature information to the first TEE encryption client; the first TEE encryption client uses the public key to verify the legitimacy of the summary and signature information, and if the verification is successful, the remote authentication is successful.

[0033] In a feasible implementation manner, the step 13 specifically includes:

[0034] Step 130: When other person B needs to query the medical data of person A When the user receives the medical data from the client, the second TEE encryption client communicates with the server TEE to remotely authenticate the legitimacy of the TEE operating environment; the second client sends the medical data to the first client of person A via the server. Keywords ;

[0035] Step 131: After person A agrees to authorize sharing, the sharing permissions are set according to the sensitivity level; the first client uses its own private key Identification of the second client Sign and get the authorized signature result , and the authorization signature result , the identity of the second client 、Keywords And sharing permissions are sent to the server TEE; the sharing permissions include sharing duration, operation permissions, etc.;

[0036] Step 132: The server TEE pre-stores the public key corresponding to the private key and the registered identity information of the second client. The legitimacy of the authorization signature result is verified by the public key, and the legitimacy of the identity identifier of the second client is verified by the registered identity information of the second client. If both verifications are legal, the verification passes and step 133 is executed; otherwise, step 13 is terminated.

[0037] Step 133: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ;

[0038] Step 134: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ;

[0039] Step 135: The server TEE encrypts the client's public key through the second TEE , for random keys Encrypt and get the random key ciphertext Send to the second TEE encryption client;

[0040] Step 136: Server-side TEE based on index , retrieve the corresponding medical data ciphertext in the database ;

[0041] Step 137: The server encrypts the medical data and sharing permissions are sent to the second client;

[0042] Step 138: The second client uses the random key ciphertext and your own private key , decrypt the corresponding random key ;

[0043] The private key With the public key A set of public and private key pairs belonging to the second client, which are distributed to the second client by the server TEE in advance ;

[0044] Step 139: The second client uses a random key , for medical data encryption Decrypt and get medical data ; and share medical data based on permissions For storage.

[0045] Through the above steps, patients and other medical data owners can decide whether to share their medical data with others, and set sharing permissions based on sensitivity levels to protect the security of medical data and patient privacy; through the identification encryption algorithm, the ciphertext or key length is effectively controlled, reducing hardware performance requirements.

[0046] In the second aspect, based on the same inventive concept, the present application also provides a privacy-protected medical data sharing system, including a server and multiple clients, the server including a server TEE and a database, and the client including a TEE encryption client;

[0047] The server-side TEE is used to calculate a random key when receiving medical data containing keywords, encrypt the medical data according to the index based on the random key, and input the obtained medical data ciphertext into the database, wherein the keywords include medical items and sensitivity levels; when querying, it communicates with the TEE encryption client to perform identity authentication, encrypts the random key according to the keywords and the public key of the TEE encryption client, obtains the random key ciphertext and feeds it back to the TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the client through the server; when sharing, it communicates with the TEE encryption client of the authorizer, performs authorization signature result and legality authentication of the authorized party's identity identification, encrypts the random key according to the keywords and the public key of the TEE encryption client of the authorized party, obtains the random key ciphertext and feeds it back to the TEE encryption client of the authorized party, and based on the index, sends the corresponding medical data ciphertext and sharing authority in the database to the client of the authorized party through the server;

[0048] The TEE encryption client is used to communicate with the server TEE when querying, submit identity information and keywords to the server TEE and receive random key ciphertext; when sharing, the TEE encryption client of the authorizer communicates with the server TEE, submits the authorization signature result, the identity of the authorized party, keywords and sharing permissions to the server TEE, and the TEE encryption client of the authorized party communicates with the server TEE to receive random key ciphertext;

[0049] The client is used to decrypt the random key ciphertext using its own private key when querying, and unlock the medical data ciphertext after obtaining the random key to obtain the medical data; when sharing, the authorized party's client uses its own private key to decrypt the random key ciphertext, and unlocks the medical data ciphertext after obtaining the random key, and stores the medical data according to the sharing permissions after obtaining it.

[0050] On the third aspect, based on the same inventive concept, the present application also provides a privacy-protecting medical data sharing device, including a processor, a memory and a bus, wherein the memory stores instructions and data that can be read by the processor, and the processor is used to call the instructions and data in the memory to execute the privacy-protecting medical data sharing method as described above, and the bus connects the functional components for transmitting information.

[0051] By adopting the above technical solution, the present invention has the following beneficial effects:

[0052] The present invention provides a privacy-protected medical data sharing method, system and device, which can classify the patient's medical data according to medical items and sensitivity, and authorize the sharing of necessary medical data according to actual conditions, so as to effectively protect the patient's privacy; adopt TEE technology for encryption processing to ensure the accuracy of medical data and the security of keys; utilize the advantages of algorithms such as symmetric encryption in TEE to improve the security of medical data during storage and sharing; and further control the ciphertext or key length through the identification encryption algorithm, so as to provide a spatial basis for the detailed encryption of medical data, thereby realizing efficient encryption and fine-grained secure sharing. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 A flow chart of a privacy-protecting medical data sharing method provided by an embodiment of the present invention;

[0055] Figure 2 for Figure 1 The specific method flow chart of step 11 in FIG.

[0056] Figure 3 for Figure 1 Specific method flow chart of step 12;

[0057] Figure 4 for Figure 1 Specific method flow chart of step 13;

[0058] Figure 5 A diagram of a privacy-protected medical data sharing system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.

[0060] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0061] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0062] To facilitate understanding of the following embodiments, the inventive concept of the present application is briefly described as follows:

[0063] In order to solve the technical problems mentioned in the background technology, this application considers dividing medical data according to medical items and sensitivity, and encrypting them separately, so that the necessary medical data can be shared in a limited manner according to actual needs in the future to achieve patient privacy protection. This requires a large amount of password space, and TEE technology can manage passwords and medical data separately through independent space, while improving password security and ensuring the accuracy of medical data, it can also reduce communication overhead; use algorithms such as symmetric encryption to improve the security of data during storage and sharing; use algorithms such as identity encryption to effectively control the ciphertext or key length, so that as many passwords as possible can be generated within a certain space, while also reducing hardware performance requirements.

[0064] The present invention is further explained below in conjunction with specific implementation modes.

[0065] It should also be noted that the following specific embodiments or specific implementations are a series of optimized settings listed in the present invention to further explain the specific content of the invention, and these settings can be used in combination or in association with each other.

[0066] Embodiment 1:

[0067] like Figure 1 As shown, a privacy-protecting medical data sharing method provided in this embodiment includes the following steps:

[0068] Step 11: divide the medical results of person A into various medical data according to medical items and sensitivity, and then add keywords; based on the keywords, calculate the random key through the server TEE; based on the random key, encrypt the medical data according to the index, and input the medical data ciphertext into the database; the sensitivity level refers to the impact of the medical item on the person's own health and the health of others, and the greater the impact, the higher the sensitivity level; the keywords include medical items and sensitivity levels;

[0069] Step 12: When person A queries his own medical data, he submits his identity information and keywords to the server TEE through the first TEE encryption client; after the identity authentication is qualified, the server TEE encrypts the random key according to the keyword and the public key of the first TEE encryption client, obtains the random key ciphertext and feeds it back to the first TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the first client; the first client decrypts the random key through the random key ciphertext and its own private key, and then decrypts the medical data ciphertext to obtain the medical data;

[0070] Step 13. When other person B needs to query the medical data of person A, keywords are sent to person A through the second client; person A sets sharing permissions according to the sensitivity level; the authorization signature result, the identity of the second client, keywords and sharing permissions are submitted to the server TEE through the first TEE encryption client; after the authorization signature result and the legitimacy of the identity of the second client are authenticated, the server TEE encrypts the random key according to the keywords and the public key of the second TEE encryption client, obtains the random key ciphertext and sends it to the second TEE encryption client, and based on the index, sends the corresponding medical data ciphertext and sharing permissions in the database to the second client; the second client decrypts the random key through the random key ciphertext and its own private key, decrypts the medical data ciphertext, obtains the medical data and stores it according to the sharing permissions.

[0071] Furthermore, if Figure 2 As shown, the step 11 specifically includes:

[0072] Step 110: After dividing the medical results of person A into various medical data according to medical items and sensitivity, add keywords and input them into the server TEE;

[0073] Step 111: In the server TEE, select the pseudo-random function and random seed corresponding to the encryption level according to the sensitivity level in the keyword. , according to a medical data Keywords , calculate the corresponding random key , the specific expression can be:

[0074] ;

[0075] Step 112: Select a hash algorithm , the random key Mapping to medical data Index , the specific expression can be:

[0076] ;

[0077] ;

[0078] in, Represents a hash value domain;

[0079] Step 113: Use a random key , for medical data Encrypt to get the medical data ciphertext , the specific expression can be:

[0080] ;

[0081] Step 114: The server TEE uses the index , encrypt medical data Import into database.

[0082] Furthermore, the pseudo-random function may select a key derivation function in the national encryption SM9 standard.

[0083] Furthermore, the hash algorithm may use collision-resistant hash functions such as SHA-256 and SM3.

[0084] Furthermore, if Figure 3 As shown, the step 12 specifically includes:

[0085] Step 120: Query the medical data at person A When the client communicates with the server TEE through the first TEE encryption client, the legitimacy of the TEE operating environment is remotely authenticated;

[0086] Step 121: The first TEE encrypted client sends its own identity information and keywords To the server TEE; the identity information includes the signature result and identity ; The signature result The first client uses its own private key Identify yourself Obtained after signing;

[0087] Step 122: The server TEE has a pre-stored private key The corresponding public key And registration identity information, through the public key Verify the signature result Legitimacy, identity verification through registered identity information Legality: If both verifications are legal, the verification is passed and step 123 is executed; otherwise, step 12 is terminated;

[0088] Step 123: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ; In this way, the characteristic of pseudo-random function as a deterministic function can be used to calculate an unchanging random key based on an unchanging random seed and keyword;

[0089] Step 124: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ;

[0090] Step 125: The server TEE encrypts the client's public key based on the first TEE , for random keys Encrypt and get the random key ciphertext Feedback to the first TEE encryption client, the specific expression can be:

[0091] ;

[0092] Step 126: Server TEE based on index , retrieve the corresponding medical data ciphertext in the database ;

[0093] Step 127: The server encrypts the medical data Sending to the first client;

[0094] Step 128: The first client uses a random key ciphertext and your own private key , decrypt the corresponding random key , the specific expression can be:

[0095] ;

[0096] The private key With the public key A set of public and private key pairs belonging to the first client, the private key is distributed to the first client in advance by the server TEE ;

[0097] Step 129: The first client uses a random key , for medical data encryption Decrypt and get medical data , the specific expression can be:

[0098] .

[0099] Furthermore, the specific method of remote authentication in step 120 includes: the server-side TEE collects relevant information of the current running environment and generates a summary of information including hash values ​​of executable programs and memory data; the server-side TEE signs the summary with its internal private key, and sends the summary and signature information to the first TEE encryption client; the first TEE encryption client uses the public key to verify the legitimacy of the summary and signature information, and if the verification is successful, the remote authentication is successful.

[0100] Furthermore, if Figure 4 As shown, the step 13 specifically includes:

[0101] Step 130: When other person B needs to query the medical data of person A When the user receives the medical data from the client, the second TEE encryption client communicates with the server TEE to remotely authenticate the legitimacy of the TEE operating environment; the medical data is sent to the first client of person A through the second client and the server. Keywords ;

[0102] Step 131: After person A agrees to authorize sharing, the sharing permissions are set according to the sensitivity level; the first client uses its own private key Identification of the second client Sign and get the authorized signature result , and the authorization signature result , the identity of the second client 、Keywords The sharing authority is sent to the server TEE; the sharing authority includes sharing duration, operation authority, etc.; the specific expression of the signature result can be:

[0103] ;

[0104] Step 132: The server TEE pre-stores the public key corresponding to the private key and the registered identity information of the second client. The legitimacy of the authorization signature result is verified by the public key, and the legitimacy of the identity identifier of the second client is verified by the registered identity information of the second client. If both verifications are legal, the verification passes and step 133 is executed; otherwise, step 13 is terminated.

[0105] Step 133: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ;

[0106] Step 134: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ;

[0107] Step 135: The server TEE encrypts the client's public key through the second TEE , for random keys Encrypt and get the random key ciphertext Sent to the second TEE encryption client, the specific expression can be:

[0108] ;

[0109] Step 136: Server-side TEE based on index , retrieve the corresponding medical data ciphertext in the database ;

[0110] Step 137: The server encrypts the medical data and sharing permissions are sent to the second client;

[0111] Step 138: The second client uses the random key ciphertext and your own private key , decrypt the corresponding random key , the specific expression can be:

[0112] ;

[0113] The private key With the public key A set of public and private key pairs belonging to the second client, which are distributed to the second client by the server TEE in advance ;

[0114] Step 139: The second client uses a random key , for medical data encryption Decrypt and get medical data ; and share medical data based on permissions For storage.

[0115] Embodiment 2:

[0116] like Figure 5 As shown, this embodiment provides a privacy-protected medical data sharing system, including a server and multiple clients, the server including a server TEE and a database, and the client including a TEE encryption client;

[0117] The server-side TEE is used to calculate a random key when receiving medical data containing keywords, encrypt the medical data according to the index based on the random key, and input the obtained medical data ciphertext into the database, wherein the keywords include medical items and sensitivity levels; when querying, it communicates with the TEE encryption client to perform identity authentication, encrypts the random key according to the keywords and the public key of the TEE encryption client, obtains the random key ciphertext and feeds it back to the TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the client through the server; when sharing, it communicates with the TEE encryption client of the authorizer, performs authorization signature result and legality authentication of the authorized party's identity identification, encrypts the random key according to the keywords and the public key of the TEE encryption client of the authorized party, obtains the random key ciphertext and feeds it back to the TEE encryption client of the authorized party, and based on the index, sends the corresponding medical data ciphertext and sharing authority in the database to the client of the authorized party through the server;

[0118] The TEE encryption client is used to communicate with the server TEE when querying, submit identity information and keywords to the server TEE and receive random key ciphertext; when sharing, the TEE encryption client of the authorizer communicates with the server TEE, submits the authorization signature result, the identity of the authorized party, keywords and sharing permissions to the server TEE, and the TEE encryption client of the authorized party communicates with the server TEE to receive random key ciphertext;

[0119] The client is used to decrypt the random key ciphertext using its own private key when querying, and unlock the medical data ciphertext after obtaining the random key to obtain the medical data; when sharing, the authorized party's client uses its own private key to decrypt the random key ciphertext, and unlocks the medical data ciphertext after obtaining the random key, and stores the medical data according to the sharing permissions after obtaining it.

[0120] Embodiment three:

[0121] This embodiment provides a privacy-protecting medical data sharing device, including a processor, a memory and a bus, wherein the memory stores instructions and data that can be read by the processor, the processor is used to call the instructions and data in the memory to execute the privacy-protecting medical data sharing method as described above, and the bus connects the functional components for transmitting information.

[0122] In another embodiment, the present solution can be implemented by a device, which may include a corresponding module for performing each or several steps in the above-mentioned embodiments. The module may be one or more hardware modules specially configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.

[0123] The processor performs the various methods and processes described above. For example, the method implementation in the present solution can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be executed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods by any other appropriate means (for example, by means of firmware).

[0124] The device can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus connects various circuits including one or more processors, memories, and / or hardware modules together. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0125] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A privacy-protecting medical data sharing method, characterized in that: The steps include: Step 11: divide the medical results of person A into various medical data according to medical items and sensitivity levels, and then add keywords; based on the keywords, calculate the random key through the server TEE; based on the random key, encrypt the medical data according to the index, and input the medical data ciphertext into the database after obtaining it; the keywords include medical items and sensitivity levels; the sensitivity level refers to the impact of the medical items on the individual's own health and the health of others, and the greater the impact, the higher the sensitivity level; the TEE refers to the trusted execution environment; The step 11 specifically includes: Step 110: After dividing the medical results of person A into various medical data according to medical items and sensitivity, add keywords and input them into the server TEE; Step 111: In the server TEE, select the pseudo-random function and random seed corresponding to the encryption level according to the sensitivity level in the keyword. , according to a medical data Keywords , calculate the corresponding random key ; Step 112: Select a hash algorithm , the random key Mapping to medical data Index ; Step 113: Use a random key , for medical data Encrypt to get the medical data ciphertext ; Step 114: The server TEE uses the index , encrypt medical data Input into database; Step 12, when the person A queries his own medical data, he submits the identity information and keywords to the server TEE through the first TEE encryption client; after the identity authentication is qualified, the server TEE encrypts the random key according to the keyword and the public key of the first TEE encryption client, obtains the random key ciphertext and feeds it back to the first TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the first client; the first client decrypts the random key through the random key ciphertext and its own private key, and then decrypts the medical data ciphertext to obtain the medical data; the first client includes the first TEE encryption client; Step 13, when person B needs to query the medical data of person A, he sends keywords to person A through the second client; person A sets sharing permissions according to the sensitivity level; submits the authorization signature result, the identity of the second client, keywords and sharing permissions to the server TEE through the first TEE encryption client; after the authorization signature result and the legitimacy of the identity of the second client are authenticated, the server TEE encrypts the random key according to the keyword and the public key of the second TEE encryption client, obtains the random key ciphertext and sends it to the second TEE encryption client, and based on the index, sends the corresponding medical data ciphertext and sharing permissions in the database to the second client; the second client decrypts the random key through the random key ciphertext and its own private key, decrypts the medical data ciphertext, obtains the medical data and stores it according to the sharing permissions; the second client includes the second TEE encryption client; The step 13 specifically includes: Step 130: When person B needs to query person A's medical data When the user receives the medical data from the client, the second TEE encryption client communicates with the server TEE to remotely authenticate the legitimacy of the TEE operating environment; the second client sends the medical data to the first client of person A via the server. Keywords ; Step 131: After person A agrees to authorize sharing, the sharing permissions are set according to the sensitivity level; the first client uses its own private key Identification of the second client Sign and get the authorized signature result , and the authorization signature result , the identity of the second client 、Keywords And sharing permissions are sent to the server TEE; Step 132: The server TEE pre-stores the public key corresponding to the private key and the registered identity information of the second client. The legitimacy of the authorization signature result is verified by the public key, and the legitimacy of the identity identifier of the second client is verified by the registered identity information of the second client. If both verifications are legal, the verification passes and step 133 is executed; otherwise, step 13 is terminated. Step 133: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ; Step 134: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ; Step 135: The server TEE encrypts the client's public key through the second TEE , for random keys Encrypt and get the random key ciphertext Send to the second TEE encryption client; Step 136: Server-side TEE based on index , retrieve the corresponding medical data ciphertext in the database ; Step 137: The server encrypts the medical data and sharing permissions are sent to the second client; Step 138: The second client uses the random key ciphertext and your own private key , decrypt the corresponding random key ; The private key With the public key A set of public and private key pairs belonging to the second client, which are distributed to the second client by the server TEE in advance ; Step 139: The second client uses a random key , for medical data encryption Decrypt and get medical data ; and share medical data based on permissions For storage.

2. The method according to claim 1, characterized in that The pseudo-random function selects the key derivation function in the national encryption SM9 standard.

3. The method according to claim 1, characterized in that The step 12 specifically includes: Step 120: Query medical data of person A When the client communicates with the server TEE through the first TEE encryption client, the legitimacy of the TEE operating environment is remotely authenticated; Step 121: The first TEE encrypted client sends its own identity information and keywords To the server TEE; the identity information includes the signature result and identity ; The signature result The first client uses its own private key Identify yourself Obtained after signing; Step 122: The server TEE has a pre-stored private key The corresponding public key And registration identity information, through the public key Verify the signature result Legitimacy, identity verification through registered identity information Legality: If both verifications are legal, the verification is passed and step 123 is executed; otherwise, step 12 is terminated; Step 123: The server TEE selects the pseudo-random function and random seed in step 111 , based on keywords , calculate the random key ; Step 124: The server TEE selects the hash algorithm in step 112 , based on random keys Mapping gets index ; Step 125: The server TEE encrypts the client's public key based on the first TEE , for random keys Encrypt and get the random key ciphertext Feedback to the first TEE encryption client; Step 126: Server TEE based on index , retrieve the corresponding medical data ciphertext in the database ; Step 127: The server encrypts the medical data Sending to the first client; Step 128: The first client uses a random key ciphertext and your own private key , decrypt the corresponding random key ; The private key With the public key A set of public and private key pairs belonging to the first client, the private key is distributed to the first client in advance by the server TEE ; Step 129: The first client uses a random key , for medical data encryption Decrypt and get medical data .

4. The method according to claim 3, characterized in that:The specific method of remote authentication in step 120 includes: the server-side TEE collects relevant information of the current running environment and generates a summary including the executable program and the hash value of the memory data; the server-side TEE signs the summary with its internal private key, and sends the summary and signature information to the first TEE encryption client; the first TEE encryption client uses the public key to verify the legitimacy of the summary and signature information, and the remote authentication is successful if the verification is successful.

5. The method according to claim 1, characterized in that The sharing permissions include sharing duration and operation permissions.

6. A privacy-protected medical data sharing system using the method as described in any one of claims 1 to 5, characterized in that: It includes a server and multiple clients, the server includes a server TEE and a database, and the client includes a TEE encryption client; The server-side TEE is used to calculate a random key when receiving medical data containing keywords, encrypt the medical data according to the index based on the random key, and input the obtained medical data ciphertext into the database, wherein the keywords include medical items and sensitivity levels; when querying, it communicates with the TEE encryption client to perform identity authentication, encrypts the random key according to the keywords and the public key of the TEE encryption client, obtains the random key ciphertext and feeds it back to the TEE encryption client, and based on the index, sends the corresponding medical data ciphertext in the database to the client through the server; when sharing, it communicates with the TEE encryption client of the authorizer, performs authorization signature result and legality authentication of the authorized party's identity identification, encrypts the random key according to the keywords and the public key of the TEE encryption client of the authorized party, obtains the random key ciphertext and feeds it back to the TEE encryption client of the authorized party, and based on the index, sends the corresponding medical data ciphertext and sharing authority in the database to the client of the authorized party through the server; The TEE encryption client is used to communicate with the server TEE when querying, submit identity information and keywords to the server TEE and receive random key ciphertext; when sharing, the TEE encryption client of the authorizer communicates with the server TEE, submits the authorization signature result, the identity of the authorized party, keywords and sharing permissions to the server TEE, and the TEE encryption client of the authorized party communicates with the server TEE to receive random key ciphertext; The client is used to decrypt the random key ciphertext using its own private key when querying, and unlock the medical data ciphertext after obtaining the random key to obtain the medical data; when sharing, the authorized party's client uses its own private key to decrypt the random key ciphertext, and unlocks the medical data ciphertext after obtaining the random key, and stores the medical data according to the sharing permissions after obtaining it.

7. A privacy-protected medical data sharing system, characterized in that: It includes a processor, a memory and a bus, wherein the memory stores instructions and data read by the processor, the processor is used to call the instructions and data in the memory to execute any method as claimed in claim 1-5, and the bus connects the functional components for transmitting information.