WO2019196042A1 - 支持分层搜索的加密健康记录的获取方法和系统 - Google Patents

支持分层搜索的加密健康记录的获取方法和系统 Download PDF

Info

Publication number
WO2019196042A1
WO2019196042A1 PCT/CN2018/082731 CN2018082731W WO2019196042A1 WO 2019196042 A1 WO2019196042 A1 WO 2019196042A1 CN 2018082731 W CN2018082731 W CN 2018082731W WO 2019196042 A1 WO2019196042 A1 WO 2019196042A1
Authority
WO
WIPO (PCT)
Prior art keywords
ciphertext
user
keyword
trapdoor
access
Prior art date
Application number
PCT/CN2018/082731
Other languages
English (en)
French (fr)
Inventor
张鹏
陈泽虹
喻建平
刘宏伟
Original Assignee
深圳大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Priority to PCT/CN2018/082731 priority Critical patent/WO2019196042A1/zh
Publication of WO2019196042A1 publication Critical patent/WO2019196042A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Definitions

  • the present invention relates to the field of information security technologies, and in particular, to a method and system for acquiring an encrypted health record that supports hierarchical search.
  • Keyword search based on public key encryption can effectively protect the data privacy stored by users on the cloud platform, and can also search ciphertext to meet the needs of users and obtain relevant data information.
  • search level issues For the same keyword, we expect the chairman of a company to search all the documents about the keyword, and the minister of a department can only search for documents related to the department.
  • search level issues For the same keyword, we expect the chairman of a company to search all the documents about the keyword, and the minister of a department can only search for documents related to the department.
  • the main object of the present invention is to provide a public key encryption method and system for supporting hierarchical search, which can solve the technical problem that the technical solution for returning different search results is lacking in the market for the search level of the user.
  • a first aspect of the present invention provides a method for obtaining an encrypted health record that supports hierarchical search, the method comprising:
  • the user client sends a search request of the health record to the server, and receives the search permission control ciphertext sent by the server, where the search authority control ciphertext comprises the access level defined by the data owner client according to the health record.
  • Access policy tree
  • the user client performs the access authority verification by using the user attribute set and the access policy tree according to the preset recursive algorithm, and obtains the access authority verification result that satisfies the user attribute set, where the user attribute set is a preset global a collection of elements in the attribute set;
  • the user client obtains a keyword input by the user, generates a trapdoor by using the keyword and the access authority verification result, and sends the trapdoor to the server;
  • the user client receives a matching result generated by the server based on the trapdoor and keyword ciphertext matching, generates an identifier according to the matching result, and sends the identifier to the server, and obtains the server based on the identifier.
  • the keyword ciphertext is obtained by the data owner client based on the encrypted binary tree constructed by the binary length corresponding to the keyword.
  • a second aspect of the present invention provides an acquisition system for an encrypted health record that supports hierarchical search, the system comprising:
  • a user client configured to send a search request of the health record to the server, and receive a search permission control ciphertext sent by the server, where the search permission control ciphertext includes the access divided by the data owner client according to the health record
  • the user client is further configured to perform access authority verification by using a user attribute set and the access policy tree according to a preset recursive algorithm, and obtain an access authority verification result that satisfies the user attribute set, where the user attribute set is an advance a set of elements in the set global property set;
  • the user client is further configured to acquire a keyword input by the user, generate a trapdoor by using the keyword and the access authority verification result, and send the trapdoor to the server;
  • the user client is further configured to receive a matching result generated by the server and based on the trapdoor and keyword ciphertext matching, generate an identifier according to the matching result, and send the identifier to the server to acquire the server.
  • the keyword ciphertext is obtained by an encrypted binary tree constructed by the data owner client based on a binary length corresponding to the keyword.
  • the present invention provides a method and system for acquiring an encrypted health record that supports hierarchical search.
  • the search permission control ciphertext includes an access policy tree constructed by the data owner's access level according to the health record by sending a search request of the health record to the server and receiving the search permission control ciphertext sent by the server.
  • the user attribute set and the access policy tree are used to perform access authority verification, and the access authority verification result that satisfies the user attribute set is obtained, that is, the access level conforming to the user attribute set is obtained.
  • the obtained identifier is matched with the user's access level, and therefore, for different users, the obtained encrypted health record is related to the access level thereof, and is effective. Returning different search results for the user's search level, ensuring the privacy of the data.
  • FIG. 1 is a schematic flowchart of a method for acquiring an encrypted health record supporting hierarchical search according to a first embodiment of the present invention
  • FIG. 2 is a schematic flow chart of an additional step before step 101 in the first embodiment of the present invention.
  • step 3 is a schematic flowchart of a refinement step of step 103 in the first embodiment of the present invention.
  • step 4 is a schematic flowchart of a refinement step of step 104 in the first embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an acquisition system for an encrypted health record supporting hierarchical search according to a second embodiment of the present invention.
  • the present invention proposes a method and system for acquiring an encrypted health record supporting hierarchical search.
  • the search permission control ciphertext includes an access policy tree constructed by the data owner's access level according to the health record by sending a search request of the health record to the server and receiving the search permission control ciphertext sent by the server.
  • the user attribute set and the access policy tree are used to perform access authority verification, and the access authority verification result that satisfies the user attribute set is obtained, that is, the access level conforming to the user attribute set is obtained.
  • the obtained identifier is matched with the user's access level, and therefore, for different users, the obtained encrypted health record is related to the access level thereof, and is effective. Returning different search results for the user's search level, ensuring the privacy of the data.
  • FIG. 1 is a schematic flowchart diagram of a method for acquiring an encrypted health record supporting hierarchical search according to a first embodiment of the present invention. specific:
  • Step 101 The user client sends a search request for the health record to the server, and receives the search permission control ciphertext sent by the server, and the search authority control ciphertext includes an access policy tree constructed by the data owner client according to the access level divided by the health record. ;
  • the method for obtaining the encrypted health record supporting the hierarchical search may be based on a mobile medical network.
  • the server sends a search permission control ciphertext
  • the search permission control ciphertext includes an access policy tree constructed by the data owner client according to the access level divided by the health record.
  • FIG. 2 is a schematic flowchart of an additional step before step 101 in the first embodiment of the present invention. specific:
  • Step 201 The third-party notarization client obtains the security parameter and the global attribute set input by the third-party notarization object, generates the system public key and the master key, and generates the user key according to the system public key and the master key and the user attribute set;
  • Step 202 The data owner client encrypts the uploaded health record by using a symmetric encryption algorithm, and uses the public key encryption algorithm to index the ciphertext extracted from the health record, and the index ciphertext includes the search permission control ciphertext. And the keyword ciphertext.
  • the third-party notarization object includes a professional testing institution, a supervisory institution, etc.
  • the data owner includes the holder of the health record. specific:
  • the system initialization function inputs the security parameter ⁇ and the global attribute set N from the third-party notarized object to obtain the system public key PK and the master key MSK. Specifically, the system randomly selects two elements ⁇ , ⁇ Z p , and for each element a j in the global attribute set N, selects a random number v j ⁇ Z p , and calculates The system public key PK and the master key MSK are generated.
  • the calculation formula of the system public key PK and the master key MSK is:
  • the health records are divided into n access levels. Then, upload the data owner Before each health record, you need to record hr j for each health record (where ) assign an identifier id j and from 2d keywords extracted from health records Wherein the binary lengths corresponding to the identifier and the keyword are respectively And d.
  • Each health record is encrypted using a symmetric encryption algorithm, such as encryption using the Advanced Encryption Standard (AES), to obtain an encrypted health record.
  • AES Advanced Encryption Standard
  • the purpose of constructing an access policy tree is to control the user's search permissions.
  • the polynomial q x is selected, starting from the root node R, selecting the polynomial in a top-down manner, for each node x in the access policy tree T, the threshold t x only needs to be
  • d R other nodes start from the root node R, set Randomly select d R other nodes to completely define the polynomial q R , where d R other nodes are composed of two types of nodes, one is the hierarchical node of the child node of the root node R, and the other is the remaining Randomly selected nodes.
  • q R (0) q parent(x) (index(x)).
  • the remaining d x other nodes of the polynomial q x are composed of hierarchical nodes and randomly selected nodes included in the child nodes of the node.
  • the search permission control ciphertext is: The search permission control ciphertext is generated by the data owner and uploaded and saved in the server.
  • N 00 denote the root node of the binary tree
  • N lh denote the hth node of the first layer.
  • the edge connecting the parent node N lh and the child node N l+1, h' corresponds to the number e l+1, h' ⁇ ⁇ 1, 2 ⁇ .
  • the structure of the encrypted binary tree is as follows:
  • the identifier ⁇ id ⁇ ⁇ in the series is concatenated and replaces the original from right to left 0 in , get a new binary string
  • Length and The length is equal.
  • first hash function H 1 : ⁇ 0,1 ⁇ * ⁇ G 0
  • second hash function H 2 : ⁇ 0,1 ⁇ * ⁇ 0,1 ⁇ ⁇
  • the third hash function H 3 ⁇ 0, 1 ⁇ * ⁇ ⁇ 0, 1 ⁇ ⁇
  • the first pseudo random function PRF 1 : ⁇ 0, 1 ⁇ ⁇ ⁇ ⁇ 0, 1 ⁇ d ⁇ ⁇ 0, 1 ⁇ d
  • the second pseudo-random function PRF 2 : ⁇ 0, 1 ⁇ ⁇ ⁇ ⁇ 0, 1 ⁇ * ⁇ ⁇ 0, 1 ⁇ ⁇ , where ⁇ and ⁇ represent security parameters;
  • PK represents the system public key
  • ⁇ , ⁇ , r, and v j all belong to the elements in the system set Z p
  • MSK represents the master key
  • SK represents the user key
  • D represents the first key
  • a j represents the user An element in the attribute set N', wherein the user attribute set N' is a set of elements in the global attribute set N, and Dj represents a second key;
  • CI represents an index ciphertext
  • SCC represents a search authority control ciphertext
  • EBT represents a keyword ciphertext
  • SCC indicates that the search authority controls the ciphertext
  • T indicates the access policy tree.
  • C i represents the second node ciphertext
  • k i represents the third node ciphertext
  • represents the number of access levels
  • Catt(x) represents the leaf node x ciphertext
  • att(x) represents In the access policy tree, any one of the sets Y of attributes corresponding to the leaf node x, t i , ⁇ and s i represent elements in the system set Z p
  • k represents the set ⁇ 0, 1 ⁇ ⁇
  • the element, v att(x) represents an index of the attribute value corresponding to the node x in the access policy tree, and q x(0) represents the value of the polynomial q x constant term corresponding to the node x in the access policy tree;
  • EBT represents a keyword ciphertext
  • U represents a first cryptographic element
  • S i represents a second cryptographic element
  • represents the number of access levels
  • C lh represents a third cryptographic element
  • M represents a subscript of (l, h) a ciphertext set of pairs, where the (l, h) pair represents the hth node of the 1st layer in the encrypted binary tree, u, t i , y 00 and y lh belong to elements in the system set Z p ,
  • a character string representing 0,1 can be truncated into a plurality of identifiers
  • w j represents one of a plurality of keywords.
  • Step 102 The user client performs the access authority verification by using the user attribute set and the access policy tree according to the preset recursive algorithm, and obtains the access authority verification result that satisfies the user attribute set, and the user attribute set is a preset set of elements in the global attribute set. ;
  • the server sends a search permission control ciphertext, and then the user client runs a verification algorithm to detect whether the user has permission to search for the encrypted health record. If the user attribute set does not satisfy the access policy tree embedded in the search permission control ciphertext, the decryption is null, indicating that the user has no permission to search for the encrypted health record; if the user attribute set satisfies the access policy tree embedded in the search permission control ciphertext, The access authorization verification result is generated to construct the trapdoor.
  • the search authority verification formula DecryptVal (PK, SCC, SK) ⁇ VR.
  • the user inputs the system public key PK, the search authority control ciphertext SCC, and the user key SK, and obtains the access authority verification result VR.
  • DecValNode SCC, SK, x
  • SCC represents the search authority control ciphertext
  • SK represents the user key
  • x represents the access policy tree T. Node.
  • the relevant content of the access authority verification is executed and output by the user client.
  • the user client uses the user attribute set and the access policy tree to perform access authority verification according to the preset recursive algorithm, and obtains the access authority verification result that satisfies the user attribute set according to the following formula:
  • VR represents the access authority verification result
  • k i represents the third node ciphertext
  • a i represents the verification element
  • F i represents a recursive result value
  • DecValNode SCC, SK, x i
  • SCC search authority control ciphertext
  • SK represents a user key
  • x i represents an ith level in the access policy tree.
  • the nodes, ⁇ , ⁇ , r, t i and s i belong to the elements in the system set Z p , Indicates the value of the polynomial constant term corresponding to the i-th hierarchical node, Indicates the first node ciphertext, D represents the first key, and C i represents the second node ciphertext.
  • Step 103 The user client obtains the keyword input by the user, generates a trapdoor by using the keyword and the access authority verification result, and sends the trapdoor to the server;
  • FIG. 3 is a schematic flowchart of the refinement step of step 103 in the first embodiment of the present invention.
  • the refinement step of the step 103 specifically includes:
  • Step 301 The user client obtains a keyword input by the user, and generates a bucket element set corresponding to the keyword.
  • Step 302 The user client generates a trapdoor by using the bucket element set and the access authority verification result, and the trapdoor includes a first trapdoor element, a second trapdoor element, a third trapdoor element, and a fourth trapdoor element.
  • the trapdoor generation algorithm inputs a user key SK, an access authority verification result VR, and a keyword , get the trapdoor TD. specific:
  • k i represents the third node ciphertext.
  • the relevant content generated by the trapdoor is executed and output by the user client.
  • k denotes an element in the set ⁇ 0, 1 ⁇ ⁇ , k i denotes a third node ciphertext, and t i denotes an element in the system set Z p
  • Represents a collection of bucket elements Represents a bucket element, Represents a keyword, and d represents the binary length corresponding to the keyword
  • TD means trapdoors
  • S' represents the second trapdoor element
  • d represents the binary length corresponding to the keyword
  • t i , ⁇ j and ⁇ represent the elements in the system set Z p and ⁇ 1 is an element in ⁇ j
  • Step 104 The user client receives the matching result generated by the trapdoor and the keyword ciphertext matching fed back by the server, generates an identifier according to the matching result, and sends the identifier to the server, and obtains the encrypted health record of the server based on the identifier matching, the keyword ciphertext It is obtained by the data owner client based on the encrypted binary tree constructed by the binary length corresponding to the keyword.
  • FIG. 4 is a schematic flowchart of the refinement step of step 104 in the first embodiment of the present invention.
  • the refinement step of the step 104 includes:
  • Step 401 The user client receives the matching result generated by the trapdoor and the keyword ciphertext matching fed back by the server, generates an identifier according to the matching result, and sends the identifier to the server.
  • Step 402 The user client obtains an encrypted health record that the server matches based on the identifier.
  • index ciphertext is generated and uploaded in the server by the data owner. specific:
  • step 101 On the basis of step 101, step 102 and step 103,
  • the server After the user client outputs the trapdoor, the server receives the trapdoor and performs the following algorithm to search for the matching ciphertext.
  • Match algorithm Search(CI,TD) ⁇ Search result The matching algorithm takes the index ciphertext CI and the trapdoor TD as input, and obtains the search result by calculating the matching:
  • the retrieval algorithm is run to obtain the encrypted health record, specifically, the retrieval algorithm.
  • Match results Privilege verification result VR and keywords As input, do the following:
  • h represents a node in the d-th layer of the constructed encrypted binary tree
  • i represents the access level satisfied by the user client
  • the search permission control ciphertext includes an access policy tree constructed by the data owner's access level according to the health record by sending a search request of the health record to the server and receiving the search permission control ciphertext sent by the server.
  • the user attribute set and the access policy tree are used to perform access authority verification, and the access authority verification result that satisfies the user attribute set is obtained, that is, the access level conforming to the user attribute set is obtained.
  • the obtained identifier is matched with the user's access level, and therefore, for different users, the obtained encrypted health record is related to the access level thereof, and is effective. Returning different search results for the user's search level, ensuring the privacy of the data.
  • FIG. 5 is a schematic structural diagram of an acquisition system for an encrypted health record supporting hierarchical search according to a second embodiment of the present invention.
  • the system includes a third party notary client 501, a user client 502, a server 503, and a data owner client 504, wherein the pointing of the arrow indicates the direction in which the information is sent. specific:
  • the user client 502 is configured to send a search request of the health record to the server 503, and receive the search permission control ciphertext sent by the server 503.
  • the search authority control ciphertext includes an access level structure defined by the data owner client 504 according to the health record. Access policy tree;
  • the user client 502 is further configured to perform access authority verification by using a user attribute set and an access policy tree according to a preset recursive algorithm, and obtain an access authority verification result that satisfies a user attribute set, where the user attribute set is a preset global attribute set. Collection of elements;
  • the user client 502 is further configured to acquire a keyword input by the user, generate a trapdoor by using the keyword and the access authority verification result, and send the trapdoor to the server 503;
  • the user client 502 is further configured to receive the matching result generated by the trapdoor and the keyword ciphertext matching fed back by the server 503, generate an identifier according to the matching result, and send the identifier to the server 503, and obtain the encrypted health record of the server 503 based on the identifier matching.
  • the keyword ciphertext is obtained by the data owner client 504 based on the encrypted binary tree constructed by the binary length corresponding to the keyword.
  • the method further includes:
  • the third-party notarization client 501 is configured to obtain a security parameter and a global attribute set input by the third-party notarization object, generate a system public key and a master key, and generate a user key according to the system public key and the master key and the user attribute set;
  • the data owner client 504 is configured to encrypt the uploaded health record by using a symmetric encryption algorithm, and use the public key encryption algorithm to index the ciphertext of the keyword extracted from the health record, and the index ciphertext includes the search authority control key. Text and keyword ciphertext;
  • first hash function H 1 : ⁇ 0,1 ⁇ * ⁇ G 0
  • second hash function H 2 : ⁇ 0,1 ⁇ * ⁇ 0,1 ⁇ ⁇
  • the third hash function H 3 ⁇ 0, 1 ⁇ * ⁇ ⁇ 0, 1 ⁇ ⁇
  • the first pseudo random function PRF 1 : ⁇ 0, 1 ⁇ ⁇ ⁇ ⁇ 0, 1 ⁇ d ⁇ ⁇ 0, 1 ⁇ d
  • the second pseudo-random function PRF 2 : ⁇ 0, 1 ⁇ ⁇ ⁇ ⁇ 0, 1 ⁇ * ⁇ ⁇ 0, 1 ⁇ ⁇ , where ⁇ and ⁇ represent security parameters;
  • PK represents the system public key
  • ⁇ , ⁇ , r, and v j all belong to the elements in the system set Z p
  • MSK represents the master key
  • SK represents the user key
  • D represents the first key
  • a j represents the user An element in the attribute set N', wherein the user attribute set N' is a set of elements in the global attribute set N, and Dj represents a second key;
  • CI represents an index ciphertext
  • SCC represents a search authority control ciphertext
  • EBT represents a keyword ciphertext
  • SCC indicates that the search authority controls the ciphertext
  • T indicates the access policy tree.
  • C i represents the second node ciphertext
  • k i represents the third node ciphertext
  • represents the number of access levels
  • Catt(x) represents the leaf node x ciphertext
  • att(x) represents In the access policy tree, any one of the sets Y of attributes corresponding to the leaf node x, t i , ⁇ and s i represent elements in the system set Z p
  • k represents the set ⁇ 0, 1 ⁇ ⁇
  • the element, v att(x) represents an index of the attribute value corresponding to the node x in the access policy tree, and q x(0) represents the value of the polynomial q x constant term corresponding to the node x in the access policy tree;
  • EBT represents a keyword ciphertext
  • U represents a first cryptographic element
  • S i represents a second cryptographic element
  • represents the number of access levels
  • C lh represents a third cryptographic element
  • M represents a subscript of (l, h) a ciphertext set of pairs, where the (l, h) pair represents the hth node of the 1st layer in the encrypted binary tree, u, t i , y 00 and y lh belong to elements in the system set Z p ,
  • a character string representing 0,1 can be truncated into a plurality of identifiers
  • w j represents one of a plurality of keywords.
  • the user client 502 is further configured to perform the access authority verification by using the user attribute set and the access policy tree according to the preset recursive algorithm, and obtain the access authority verification result that satisfies the user attribute set according to the following formula:
  • VR represents the access authority verification result
  • k i represents the third node ciphertext
  • a i represents the verification element
  • F i represents a recursive result value
  • DecValNode SCC, SK, x i
  • SCC search authority control ciphertext
  • SK represents a user key
  • x i represents an ith level in the access policy tree.
  • the nodes, ⁇ , ⁇ , r, t i and s i belong to the elements in the system set Z p , Indicates the value of the polynomial constant term corresponding to the i-th hierarchical node, Indicates the first node ciphertext, D represents the first key, and C i represents the second node ciphertext.
  • the user client 502 is further configured to acquire a keyword input by the user, and generate a bucket element set corresponding to the keyword;
  • the user client 502 is further configured to generate a trapdoor by using a bucket element set and an access authority verification result, where the trapdoor includes a first trapdoor element, a second trapdoor element, a third trapdoor element, and a fourth trapdoor element;
  • k denotes an element in the set ⁇ 0, 1 ⁇ ⁇ , k i denotes a third node ciphertext, and t i denotes an element in the system set Z p
  • Represents a collection of bucket elements Represents a bucket element, Represents a keyword, and d represents the binary length corresponding to the keyword
  • TD means trapdoors
  • S' represents the second trapdoor element
  • d represents the binary length corresponding to the keyword
  • t i , ⁇ j and ⁇ represent the elements in the system set Z p and ⁇ 1 is an element in ⁇ j
  • the user client 502 is further configured to receive the matching result generated by the trapdoor and the keyword ciphertext matching fed back by the server 503, generate an identifier according to the matching result, and send the identifier to the server 503;
  • the user client 502 is further configured to obtain an encrypted health record that the server 503 matches based on the identifier;
  • h represents a node in the d-th layer of the constructed encrypted binary tree
  • i represents the access level satisfied by the user client
  • the search permission control ciphertext includes an access policy tree constructed by the data owner's access level according to the health record by sending a search request of the health record to the server and receiving the search permission control ciphertext sent by the server.
  • the user attribute set and the access policy tree are used to perform access authority verification, and the access authority verification result that satisfies the user attribute set is obtained, that is, the access level conforming to the user attribute set is obtained.
  • the obtained identifier is matched with the user's access level, and therefore, for different users, the obtained encrypted health record is related to the access level thereof, and is effective. Returning different search results for the user's search level, ensuring the privacy of the data.

Abstract

一种支持分层搜索的加密健康记录的获取方法和系统。通过向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主根据健康记录划分的访问等级构造的访问策略树(101)。又由于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,即得到符合用户属性集的访问等级(102)。因此,基于该访问权限验证结果进行一系列的步骤后,得到的标识符是与用户的访问等级相匹配的,因此,对于不同的用户,得到的加密健康记录是与其访问等级相关的,有效的针对用户的搜索级别返回不同的搜索结果,保障了数据的隐私性。

Description

支持分层搜索的加密健康记录的获取方法和系统 技术领域
本发明涉及信息安全技术领域,尤其涉及一种支持分层搜索的加密健康记录的获取方法和系统。
背景技术
云计算时代,为了数据共享的便捷性及节省本地的管理成本开销,用户外包大量的数据到云计算平台,但是,这种外包方式可能会泄漏用户的数据信息。
基于公钥加密的关键字搜索能够有效保护用户存储在云平台的数据隐私,还能对密文进行搜索,以满足用户的需求并获取到相关的数据信息。但是,使用基于公钥加密的关键字搜索来保障数据隐私还存在一些问题,比如,搜索级别的问题。针对同一个关键字,我们期望某公司董事长能搜索到关于该关键字的所有文档,而某一部门的部长则只能搜索到与该部门相关的文档。然而,目前市场上缺少针对用户的搜索级别,返回不同搜索结果的技术方案。
发明内容
本发明的主要目的在于提供一种支持分层搜索的公钥加密方法和系统,可以解决市场上缺少针对用户的搜索级别,返回不同搜索结果的技术方案的技术问题。
为实现上述目的,本发明第一方面提供一种支持分层搜索的加密健康记录的获取方法,所述方法包括:
用户客户端向服务器发送健康记录的搜索请求,并接收所述服务器发送的 搜索权限控制密文,所述搜索权限控制密文包括由数据属主客户端根据所述健康记录划分的访问等级构造的访问策略树;
所述用户客户端根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,得到满足所述用户属性集的访问权限验证结果,所述用户属性集为预先设定的全局属性集中的元素集合;
所述用户客户端获取用户输入的关键词,利用所述关键词及所述访问权限验证结果生成陷门并将所述陷门发送给所述服务器;
所述用户客户端接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器,获取所述服务器基于所述标识符匹配的加密健康记录,所述关键词密文是由所述数据属主客户端基于所述关键词对应的二进制长度构造的加密二值树得到的。
为实现上述目的,本发明第二方面提供一种支持分层搜索的加密健康记录的获取系统,所述系统包括:
用户客户端,用于向服务器发送健康记录的搜索请求,并接收所述服务器发送的搜索权限控制密文,所述搜索权限控制密文包括由数据属主客户端根据所述健康记录划分的访问等级构造的访问策略树;
所述用户客户端,还用于根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,得到满足所述用户属性集的访问权限验证结果,所述用户属性集为预先设定的全局属性集中的元素集合;
所述用户客户端,还用于获取用户输入的关键词,利用所述关键词及所述访问权限验证结果生成陷门并将所述陷门发送给所述服务器;
所述用户客户端,还用于接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器,获取所述服务器基于所述标识符匹配的加密健康记录,所述关键词密文是由所述数据属主客户端基于所述关键词对应的二进制长度构造的加密二值树得到 的。
本发明提供一种支持分层搜索的加密健康记录的获取方法和系统。通过向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主根据健康记录划分的访问等级构造的访问策略树。又由于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,即得到符合用户属性集的访问等级。因此,基于该访问权限验证结果进行一系列的步骤后,得到的标识符是与用户的访问等级相匹配的,因此,对于不同的用户,得到的加密健康记录是与其访问等级相关的,有效的针对用户的搜索级别返回不同的搜索结果,保障了数据的隐私性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明第一实施例所提供的一种支持分层搜索的加密健康记录的获取方法的流程示意图;
图2为本发明第一实施例中步骤101之前的追加步骤的流程示意图;
图3为本发明第一实施例中步骤103的细化步骤的流程示意图;
图4为本发明第一实施例中步骤104的细化步骤的流程示意图;
图5为本发明第二实施例所提供的一种支持分层搜索的加密健康记录的获取系统的结构示意图。
具体实施方式
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
由于现有技术中存在市场上缺少针对用户的搜索级别,返回不同搜索结果的技术方案的技术问题。
为了解决上述技术问题,本发明提出一种支持分层搜索的加密健康记录的获取方法和系统。通过向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主根据健康记录划分的访问等级构造的访问策略树。又由于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,即得到符合用户属性集的访问等级。因此,基于该访问权限验证结果进行一系列的步骤后,得到的标识符是与用户的访问等级相匹配的,因此,对于不同的用户,得到的加密健康记录是与其访问等级相关的,有效的针对用户的搜索级别返回不同的搜索结果,保障了数据的隐私性。
请参阅图1,为本发明第一实施例所提供的一种支持分层搜索的加密健康记录的获取方法的流程示意图。具体的:
步骤101:用户客户端向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主客户端根据健康记录划分的访问等级构造的访问策略树;
需要说明的是,本支持分层搜索的加密健康记录的获取方法可以基于移动医疗网络。用户客户端向服务器发送健康记录的搜索请求时,服务器会发送搜索权限控制密文,该搜索权限控制密文包括数据属主客户端根据健康记录划分的访问等级构造的访问策略树。进一步的,请参阅图2,为本发明第一实施例 中步骤101之前的追加步骤的流程示意图。具体的:
步骤201:第三方公证客户端获取第三方公证客体输入的安全参数和全局属性集,生成系统公钥和主密钥,并根据系统公钥和主密钥以及用户属性集生成用户密钥;
步骤202:数据属主客户端利用对称加密算法对上传的健康记录进行加密,并利用公钥加密算法对从健康记录中提取到的关键词建立索引密文,索引密文包括搜索权限控制密文和关键词密文。
需要说明的是,第三方公证客体包括专业的检测机构、监督机构等,数据属主包括健康记录的持有者等。具体的:
预先建立全局属性集N={a 1,a 2,…,a n},表示系统有n个属性,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、拉格朗日系数
Figure PCTCN2018082731-appb-000001
(i∈Z p,S为系统集合Z p中的元素集合)、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ和第三哈希函数H 3:{0,1} *→{0,1} κ,其中λ和κ表示安全参数。
执行系统初始化函数Setup(1 κ,L)→(PK,MSK)。系统初始化函数由第三方公证客体输入安全参数κ和全局属性集N,得到系统公钥PK和主密钥MSK。具体的,系统随机选择两个元素α,β∈Z p,对于全局属性集N中的每个元素a j,选择一个随机数v j∈Z p,计算
Figure PCTCN2018082731-appb-000002
生成系统公钥PK和主密钥MSK。其中,系统公钥PK和主密钥MSK的计算公式为:
Figure PCTCN2018082731-appb-000003
MSK={α,g β,{v j|a j∈N}}
用户密钥生成函数KeyGen(PK,MSK,N')→SK。由第三方公证客体输入系统公钥PK和主密钥MSK,选择用户属性集
Figure PCTCN2018082731-appb-000004
选择随机数r∈Z p,生成用户密钥SK:
Figure PCTCN2018082731-appb-000005
进一步的,若数据属主需要上传
Figure PCTCN2018082731-appb-000006
个健康记录
Figure PCTCN2018082731-appb-000007
到服务器上,
Figure PCTCN2018082731-appb-000008
个健康记录分为η个访问等级。则,在数据属主上传
Figure PCTCN2018082731-appb-000009
个健康记录之前,需为每个健康记录hr j(其中,
Figure PCTCN2018082731-appb-000010
)分配一个标识符id j,并从
Figure PCTCN2018082731-appb-000011
个健康记录中提取出2 d个关键词
Figure PCTCN2018082731-appb-000012
其中,标识符和关键词所对应的二进制长度分别为
Figure PCTCN2018082731-appb-000013
和d。使用对称加密算法对每个健康记录进行加密,如使用高级加密标准(Advanced Encryption standard,AES)进行加密,得到加密健康记录。令
Figure PCTCN2018082731-appb-000014
表示与关键词w j在第i个访问等级相关联的标识符集,令
Figure PCTCN2018082731-appb-000015
其中,
Figure PCTCN2018082731-appb-000016
服务器在接收到数据属主上传的加密健康记录后,需进行以下内容:
定义一个d维向量b=(1,…,1)、第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d和第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,随机选择k∈{0,1} λ,对于每个关键词w j∈W,计算b+PRF 1(k,w j)→b j,并将HR(w j)中的文件添加到相应的桶元素b j中,每个b j对应η个二进制串
Figure PCTCN2018082731-appb-000017
其中,j=1,…,2 d,所有的二进制串的长度相等,且每一位都初始化为0。
随机选择一个数t i∈Z p,计算
Figure PCTCN2018082731-appb-000018
其中,i=1,…,η。
构造访问策略树的目的是用于控制用户的搜索权限。对于访问策略树T的每个节点x,选择多项式q x,从根节点R开始,以自顶向下的方式选择多项式,对于访问策略树T中的每个节点x,阈值t x仅需要比多项式q x的阶d x多1,即t x=d x+1。
对于访问策略树T,设置分级节点x i,并随机选择β、s i∈Z p,计算
Figure PCTCN2018082731-appb-000019
Figure PCTCN2018082731-appb-000020
其中,i=1,…,η。
从根节点R开始,设定
Figure PCTCN2018082731-appb-000021
随机选择d R个其他节点来完整的定义多项式q R,其中,d R个其他节点由两种类型的节点组成,一种是根节点R的子节点包含的等级节点,另一种是剩余的随机选择的节点。
对于每个非根节点x,如果x是等级节点,则设定
Figure PCTCN2018082731-appb-000022
否则设定q R(0)=q parent(x)(index(x))。多项式q x的剩余d x个其他节点由该节点的子节点包含的等级节点和随机选择的节点构成。
在访问策略树中,令Y表示与叶子节点相对应的属性构成的集合,对于所有的att(x)∈Y,计算
Figure PCTCN2018082731-appb-000023
搜索权限控制密文为:
Figure PCTCN2018082731-appb-000024
该搜索权限控制密文为数据属主生成的并上传保存在服务器中。
构造加密二值树用于关键字搜索。加密二值树的深度为d=log|W|。令N 00表示二值树的根节点,N lh表示第l层的第h个节点。连接父节点N lh和子节点N l+1,h'的边对应着数e l+1,h'∈{1,2}。每个叶子节点对应一个桶元素,假设桶元素b j与叶子节点N dj相关联,其中,j=1,…,2 d。则加密二值树的构造如下:
1、每一个非叶子节点N lh对应于密文C lh={C′ lh,C″ lh},其中,C lh计算如下:
对于根节点N 00,选择随机数y 00∈Z p,计算
Figure PCTCN2018082731-appb-000025
Figure PCTCN2018082731-appb-000026
Figure PCTCN2018082731-appb-000027
对于其他节点N lh,选择随机数y lh∈Z p,计算
Figure PCTCN2018082731-appb-000028
Figure PCTCN2018082731-appb-000029
其中,h=1,…,2 l;l=1,…,d-1。
2、对于叶子节点N dj。其中,j=1,…,2 d;i=1,…,η。
依次将标识符集
Figure PCTCN2018082731-appb-000030
中的标识符{id ζ}串联起来,并从右至左代替原
Figure PCTCN2018082731-appb-000031
中的0,得到新的二进制串
Figure PCTCN2018082731-appb-000032
计算
Figure PCTCN2018082731-appb-000033
其中,
Figure PCTCN2018082731-appb-000034
的长度与
Figure PCTCN2018082731-appb-000035
的长度相等。
Figure PCTCN2018082731-appb-000036
选择随机数u∈Z p,计算U=g u
Figure PCTCN2018082731-appb-000037
其中,i=1,…,η。
令M表示所有下标为(l,h)对的密文集合。输出关键词密文:
Figure PCTCN2018082731-appb-000038
索引密文为:CI={SCC,EBT},发送索引密文CI和加密健康记录CHR存储于医疗健康服务器HP i和HP r,其中,HP i和HP r分别表示存储索引密文和加密健康记录的服务器。
即:预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ、第三哈希函数H 3:{0,1} *→{0,1} κ、第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中λ和κ表示安全参数;
其中,系统公钥与主密钥及用户密钥的计算公式如下:
Figure PCTCN2018082731-appb-000039
MSK={α,g β,{v j|a j∈N}}
Figure PCTCN2018082731-appb-000040
其中,PK表示系统公钥,α、β、r、和v j均属于系统集合Z p中的元素,MSK表示主密钥,SK表示用户密钥,D表示第一密钥,a j表示用户属性集N'中的元素,其中,用户属性集N'为全局属性集N中的元素集合,D j表示第二密钥;
其中,索引密文的计算公式如下:
CI={SCC,EBT}
其中,CI表示索引密文,SCC表示搜索权限控制密文,EBT表示关键词密文;
其中,搜索权限控制密文的计算公式如下:
Figure PCTCN2018082731-appb-000041
其中:
Figure PCTCN2018082731-appb-000042
Figure PCTCN2018082731-appb-000043
Figure PCTCN2018082731-appb-000044
Figure PCTCN2018082731-appb-000045
其中,SCC表示搜索权限控制密文,T表示访问策略树,
Figure PCTCN2018082731-appb-000046
表示第一节点密文,C i表示第二节点密文,k i表示第三节点密文,η表示访问等级的个数,C att(x)表示叶子节点x密文,att(x)表示在访问策略树中,与叶子节点x相对应的属性构成的集合Y中的任一个元素,t i、β和s i表示系统集合Z p中的元素,k表示集合{0,1} λ中的元素,v att(x)表示访问策略树中的节点x对应的属性值的指数,q x(0)表示访问策略树中的节点x对应的多项式q x常数项的取值;
其中,关键词密文的计算公式如下:
Figure PCTCN2018082731-appb-000047
U=g u
Figure PCTCN2018082731-appb-000048
Figure PCTCN2018082731-appb-000049
其中,EBT表示关键词密文,U表示第一加密元素,S i表示第二加密元素,η表示访问等级的个数,C lh表示第三加密元素,M表示下标为(l,h)对的密文集合,其中(l,h)对表示加密二值树中第l层的第h个节点,u、t i、y 00和y lh属于系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000050
表示0,1构成的字符串,可以截断成多个标识符,w j表示多个关键词中的一个。
步骤102:用户客户端根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,用户属性集为预先设定的全局属性集中的元素集合;
需要说明的是,当用户客户端首次向服务器发送健康记录的搜索请求时,服务器会发送搜索权限控制密文,然后用户客户端运行验证算法来检测用户是 否有权限搜索加密健康记录。如果用户属性集不满足嵌入在搜索权限控制密文中的访问策略树,则解密之后得到null,表示用户无权限搜索加密健康记录;若用户属性集满足嵌入在搜索权限控制密文中的访问策略树,则生成访问权限验证结果,以便构造陷门。具体的:
在步骤101的基础上,搜索权限验证公式:DecryptVal(PK,SCC,SK)→VR。用户输入系统公钥PK、搜索权限控制密文SCC和用户密钥SK,得到访问权限验证结果VR。需要定义预设递归算法DecValNode(SCC,SK,x)用以验证用户是否有权限搜索加密的健康记录,其中,SCC表示搜索权限控制密文,SK表示用户密钥,x表示访问策略树T中的节点。
1、若x为叶子节点,则令a j=att(x)。
如果
Figure PCTCN2018082731-appb-000051
则DecValNode(SCC,SK,x)=null,否则,计算:
Figure PCTCN2018082731-appb-000052
2、若x为非叶子节点,则递归算法DecValNode(SCC,SK,x)的定义如下,对于节点x的所有子节点z,执行F z=DecValNode(SCC,SK,z)。设S x是任意的k x个子节点z构成的集合。如果S x不存在,则F z=null;如果S x存在,则F z≠null,计算:
Figure PCTCN2018082731-appb-000053
其中,j=index(z),S' x={index(z):z∈S x}。
用户客户端调用访问策略树T的根节点R的函数DecValNode(SCC,SK,R), 如果用户属性集满足部分或者整个访问策略树,即用户属性集满足访问策略树的第i个等级节点,则计算得到访问权限验证结果VR={k i,A i},其中:
Figure PCTCN2018082731-appb-000054
Figure PCTCN2018082731-appb-000055
用户保存访问权限验证结果VR={k i,A i}。
其中,访问权限验证的相关内容由用户客户端执行并输出。
即:用户客户端根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,按照如下公式得到满足用户属性集的访问权限验证结果:
VR={k i,A i}
其中,VR表示访问权限验证结果,k i表示第三节点密文,A i表示验证元素;
其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1};
其中,验证元素A i的计算公式如下:
Figure PCTCN2018082731-appb-000056
Figure PCTCN2018082731-appb-000057
其中,F i表示递归结果值,DecValNode(SCC,SK,x i)表示预设递归算法,SCC表示搜索权限控制密文,SK表示用户密钥,x i表示访问策略树中的第i个等级节点,α、β、r、t i和s i均属于系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000058
表示第i个等级节点所对应的多项式常数项的取值,
Figure PCTCN2018082731-appb-000059
表示第一节点密文,D表示第一密钥,C i表示第二节点密文。
步骤103:用户客户端获取用户输入的关键词,利用关键词及访问权限验证结果生成陷门并将陷门发送给服务器;
具体的,请参阅图3,为本发明第一实施例中步骤103的细化步骤的流程 示意图。该步骤103的细化步骤具体包括:
步骤301:用户客户端获取用户输入的关键词,生成与关键词对应的桶元素集合;
步骤302:用户客户端利用桶元素集合和访问权限验证结果,生成陷门,陷门包括第一陷门元素、第二陷门元素、第三陷门元素和第四陷门元素。
需要说明的是,若用户想要搜索包含关键词
Figure PCTCN2018082731-appb-000060
的加密健康记录,需运行陷门生成算法
Figure PCTCN2018082731-appb-000061
来生成与关键词
Figure PCTCN2018082731-appb-000062
相关联的陷门TD。该陷门生成算法输入用户密钥SK、访问权限验证结果VR和关键词
Figure PCTCN2018082731-appb-000063
,得到陷门TD。具体的:
在步骤101与步骤102的基础上,计算
Figure PCTCN2018082731-appb-000064
其中
Figure PCTCN2018082731-appb-000065
表示异或算法,公式
Figure PCTCN2018082731-appb-000066
与公式
Figure PCTCN2018082731-appb-000067
等价,k i表示第三节点密文。计算桶元素
Figure PCTCN2018082731-appb-000068
得到桶元素的集合
Figure PCTCN2018082731-appb-000069
其中,j=1,2,…,d。
对于每个桶元素
Figure PCTCN2018082731-appb-000070
选择随机数τ j∈Z p,计算
Figure PCTCN2018082731-appb-000071
Figure PCTCN2018082731-appb-000072
其中,j=1,2,…,d。
计算
Figure PCTCN2018082731-appb-000073
Figure PCTCN2018082731-appb-000074
输出陷门
Figure PCTCN2018082731-appb-000075
其中,陷门生成的相关内容由用户客户端执行并输出。
即:预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ及第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d,其中λ表示安全参数;
其中,桶元素集合的计算公式如下:
Figure PCTCN2018082731-appb-000076
Figure PCTCN2018082731-appb-000077
j=1,2,…,d
其中,k表示集合{0,1} λ中的元素,k i表示第三节点密文,t i表示系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000078
表示桶元素的集合,
Figure PCTCN2018082731-appb-000079
表示桶元素,
Figure PCTCN2018082731-appb-000080
表示关键词,d表示关键词对应的二进制长度;
其中,陷门的计算公式如下:
Figure PCTCN2018082731-appb-000081
其中:
Figure PCTCN2018082731-appb-000082
Figure PCTCN2018082731-appb-000083
Figure PCTCN2018082731-appb-000084
Figure PCTCN2018082731-appb-000085
其中,TD表示陷门,
Figure PCTCN2018082731-appb-000086
表示第一陷门元素,S'表示第二陷门元素,
Figure PCTCN2018082731-appb-000087
表示第三陷门元素,
Figure PCTCN2018082731-appb-000088
表示第四陷门元素,d表示关键词对应的二进制长度,t i、τ j和α表示系统集合Z p中的元素且τ 1为τ j中的一个元素,
Figure PCTCN2018082731-appb-000089
表示桶元素。
步骤104:用户客户端接收服务器反馈的基于陷门和关键词密文匹配生成的匹配结果,根据匹配结果生成标识符并发送给服务器,获取服务器基于标识符匹配的加密健康记录,关键词密文是由数据属主客户端基于关键词对应的二进制长度构造的加密二值树得到的。
具体的,请参阅图4,为本发明第一实施例中步骤104的细化步骤的流程示意图。该步骤104的细化步骤包括:
步骤401:用户客户端接收服务器反馈的基于陷门和关键词密文匹配生成的匹配结果,根据匹配结果生成标识符并发送给服务器;
步骤402:用户客户端获取服务器基于标识符匹配的加密健康记录。
需要说明的是,索引密文是在数据属主生成并上传保存在服务器中。具体的:
在步骤101、步骤102及步骤103的基础上,
当用户客户端输出陷门后,服务器接收到陷门,执行以下算法来搜索匹配的密文。
匹配算法Search(CI,TD)→Search result。匹配算法以索引密文CI和陷门TD作为输入,通过计算匹配得到Search result:
对于根节点,计算:
Figure PCTCN2018082731-appb-000090
Figure PCTCN2018082731-appb-000091
Figure PCTCN2018082731-appb-000092
对每个i∈{1,…,d-1},计算:
Figure PCTCN2018082731-appb-000093
Figure PCTCN2018082731-appb-000094
Figure PCTCN2018082731-appb-000095
服务器从上到下遍历加密二值树经过上述算式得到的边e i+1(i=0,1,…,d-1),直至到达对应的叶子节点。
判断公式e(g,S i)=e(S',U)是否成立,若成立,则发送匹配结果给用户客户端,匹配结果为:
Figure PCTCN2018082731-appb-000096
若不成立,则返回结果为null。
当用户客户端接收到匹配结果后,运行检索算法来得到加密的健康记录,具体的,检索算法
Figure PCTCN2018082731-appb-000097
以匹配结果
Figure PCTCN2018082731-appb-000098
权限验证结果VR和关键词
Figure PCTCN2018082731-appb-000099
作为输入,进行如下操作:
计算
Figure PCTCN2018082731-appb-000100
以获得所有的标识符{id ζ}。
发送所有的标识符{id ζ}给服务器HP r,接收服务器HP r发送的相关加密健康记录{chr ζ}。
即:预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第三哈希函数H 3:{0,1} *→{0,1} κ及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中κ表示安全参数;
其中,匹配结果的计算公式如下:
Figure PCTCN2018082731-appb-000101
其中,
Figure PCTCN2018082731-appb-000102
表示匹配结果,h表示构造的加密二值树中第d层中的一个节点,i表示用户客户端满足的访问等级;
其中,标识符的计算公式如下:
Figure PCTCN2018082731-appb-000103
其中,
Figure PCTCN2018082731-appb-000104
表示由0,1构成的字符串,可以截断成多个标识符,
Figure PCTCN2018082731-appb-000105
表示匹配结果,t i表示系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000106
表示关键词。
在本发明实施例中,提出一种支持分层搜索的加密健康记录的获取方法。通过向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主根据健康记录划分的访问等级构造的访问策略树。又由于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,即得到符合用户属性集的访问等级。因此,基于该访问权限验证结果进行一系列的步骤后,得到的标识符是与用户的访问等级相匹配的,因此,对于不同的用户,得到的加密健康记录是与其访问等级相关的,有效的针对用户的搜索级别返回不同的搜索结果,保障了数据的隐私性。
请参阅图5,为本发明第二实施例所提供的一种支持分层搜索的加密健康记录的获取系统的结构示意图。该系统包括第三方公证客户端501、用户客户端502、服务器503和数据属主客户端504,其中箭头的指向表示信息的发送方向。具体的:
用户客户端502,用于向服务器503发送健康记录的搜索请求,并接收服务器503发送的搜索权限控制密文,搜索权限控制密文包括由数据属主客户端504根据健康记录划分的访问等级构造的访问策略树;
用户客户端502,还用于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,用户属性集为预先设定的全局属性集中的元素集合;
用户客户端502,还用于获取用户输入的关键词,利用关键词及访问权限验证结果生成陷门并将陷门发送给服务器503;
用户客户端502,还用于接收服务器503反馈的基于陷门和关键词密文匹配生成的匹配结果,根据匹配结果生成标识符并发送给服务器503,获取服务器503基于标识符匹配的加密健康记录,关键词密文是由数据属主客户端504基于关键词对应的二进制长度构造的加密二值树得到的。
进一步的,用户客户端502向服务器503发送健康记录的搜索请求之前还包括:
第三方公证客户端501,用于获取第三方公证客体输入的安全参数和全局属性集,生成系统公钥和主密钥,并根据系统公钥和主密钥以及用户属性集生成用户密钥;
数据属主客户端504,用于利用对称加密算法对上传的健康记录进行加密,并利用公钥加密算法对从健康记录中提取到的关键词建立索引密文,索引密文包括搜索权限控制密文和关键词密文;
其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ、第三哈希函数H 3:{0,1} *→{0,1} κ、第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中λ和κ表示安全参数;
其中,系统公钥与主密钥及用户密钥的计算公式如下:
Figure PCTCN2018082731-appb-000107
MSK={α,g β,{v j|a j∈N}}
Figure PCTCN2018082731-appb-000108
其中,PK表示系统公钥,α、β、r、和v j均属于系统集合Z p中的元素,MSK表示主密钥,SK表示用户密钥,D表示第一密钥,a j表示用户属性集N'中的元素,其中,用户属性集N'为全局属性集N中的元素集合,D j表示第二密钥;
其中,索引密文的计算公式如下:
CI={SCC,EBT}
其中,CI表示索引密文,SCC表示搜索权限控制密文,EBT表示关键词密文;
其中,搜索权限控制密文的计算公式如下:
Figure PCTCN2018082731-appb-000109
其中:
Figure PCTCN2018082731-appb-000110
Figure PCTCN2018082731-appb-000111
Figure PCTCN2018082731-appb-000112
Figure PCTCN2018082731-appb-000113
其中,SCC表示搜索权限控制密文,T表示访问策略树,
Figure PCTCN2018082731-appb-000114
表示第一节点密文,C i表示第二节点密文,k i表示第三节点密文,η表示访问等级的个数,C att(x)表示叶子节点x密文,att(x)表示在访问策略树中,与叶子节点x相对应的属性构成的集合Y中的任一个元素,t i、β和s i表示系统集合Z p中的元素,k表示集合{0,1} λ中的元素,v att(x)表示访问策略树中的节点x对应的属性值的指数,q x(0)表示访问策略树中的节点x对应的多项式q x常数项的取值;
其中,关键词密文的计算公式如下:
Figure PCTCN2018082731-appb-000115
U=g u
Figure PCTCN2018082731-appb-000116
Figure PCTCN2018082731-appb-000117
其中,EBT表示关键词密文,U表示第一加密元素,S i表示第二加密元素,η表示访问等级的个数,C lh表示第三加密元素,M表示下标为(l,h)对的密文集合,其中(l,h)对表示加密二值树中第l层的第h个节点,u、t i、y 00和y lh属于系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000118
表示0,1构成的字符串,可以截断成多个标识符,w j表示多个关键词中的一个。
进一步的,用户客户端502,还用于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,按照如下公式得到满足用户属性集的访问权限验证结果:
VR={k i,A i}
其中,VR表示访问权限验证结果,k i表示第三节点密文,A i表示验证元素;
其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1};
其中,验证元素A i的计算公式如下:
Figure PCTCN2018082731-appb-000119
Figure PCTCN2018082731-appb-000120
其中,F i表示递归结果值,DecValNode(SCC,SK,x i)表示预设递归算法,SCC表示搜索权限控制密文,SK表示用户密钥,x i表示访问策略树中的第i个 等级节点,α、β、r、t i和s i均属于系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000121
表示第i个等级节点所对应的多项式常数项的取值,
Figure PCTCN2018082731-appb-000122
表示第一节点密文,D表示第一密钥,C i表示第二节点密文。
进一步的,用户客户端502,还用于获取用户输入的关键词,生成与关键词对应的桶元素集合;
用户客户端502,还用于利用桶元素集合和访问权限验证结果,生成陷门,陷门包括第一陷门元素、第二陷门元素、第三陷门元素和第四陷门元素;
其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ及第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d,其中λ表示安全参数;
其中,桶元素集合的计算公式如下:
Figure PCTCN2018082731-appb-000123
Figure PCTCN2018082731-appb-000124
j=1,2,…,d
其中,k表示集合{0,1} λ中的元素,k i表示第三节点密文,t i表示系统集合Z p中的元素,
Figure PCTCN2018082731-appb-000125
表示桶元素的集合,
Figure PCTCN2018082731-appb-000126
表示桶元素,
Figure PCTCN2018082731-appb-000127
表示关键词,d表示关键词对应的二进制长度;
其中,陷门的计算公式如下:
Figure PCTCN2018082731-appb-000128
其中:
Figure PCTCN2018082731-appb-000129
Figure PCTCN2018082731-appb-000130
Figure PCTCN2018082731-appb-000131
Figure PCTCN2018082731-appb-000132
其中,TD表示陷门,
Figure PCTCN2018082731-appb-000133
表示第一陷门元素,S'表示第二陷门元素,
Figure PCTCN2018082731-appb-000134
表示第三陷门元素,
Figure PCTCN2018082731-appb-000135
表示第四陷门元素,d表示关键词对应的二进制长度,t i、τ j和α表示系统集合Z p中的元素且τ 1为τ j中的一个元素,
Figure PCTCN2018082731-appb-000136
表示桶元素。
进一步的,用户客户端502,还用于接收服务器503反馈的基于陷门和关键词密文匹配生成的匹配结果,根据匹配结果生成标识符并发送给服务器503;
用户客户端502,还用于获取服务器503基于标识符匹配的加密健康记录;
其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第三哈希函数H 3:{0,1} *→{0,1} κ及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中κ表示安全参数;
其中,匹配结果的计算公式如下:
Figure PCTCN2018082731-appb-000137
其中,
Figure PCTCN2018082731-appb-000138
表示匹配结果,h表示构造的加密二值树中第d层中的一个节点,i表示用户客户端满足的访问等级;
其中,标识符的计算公式如下:
Figure PCTCN2018082731-appb-000139
其中,
Figure PCTCN2018082731-appb-000140
表示由0,1构成的字符串,可以截断成多个标识符,
Figure PCTCN2018082731-appb-000141
表示匹配结果,t i表示系统集合Z p中的元素, 表示关键词。
需要说明的是,有关对第二实施的说明可参阅对第一实施例的相关说明,这里不再赘述。
在本发明实施例中,提出一种支持分层搜索的加密健康记录的获取系统。通过向服务器发送健康记录的搜索请求,并接收服务器发送的搜索权限控制密文,搜索权限控制密文包括由数据属主根据健康记录划分的访问等级构造的访问策略树。又由于根据预设递归算法,利用用户属性集与访问策略树进行访问权限验证,得到满足用户属性集的访问权限验证结果,即得到符合用户属性集 的访问等级。因此,基于该访问权限验证结果进行一系列的步骤后,得到的标识符是与用户的访问等级相匹配的,因此,对于不同的用户,得到的加密健康记录是与其访问等级相关的,有效的针对用户的搜索级别返回不同的搜索结果,保障了数据的隐私性。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
以上为对本发明所提供的一种支持分层搜索的加密健康记录的获取方法和系统的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。

Claims (10)

  1. 一种支持分层搜索的加密健康记录的获取方法,其特征在于,所述方法包括:
    用户客户端向服务器发送健康记录的搜索请求,并接收所述服务器发送的搜索权限控制密文,所述搜索权限控制密文包括由数据属主客户端根据所述健康记录划分的访问等级构造的访问策略树;
    所述用户客户端根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,得到满足所述用户属性集的访问权限验证结果,所述用户属性集为预先设定的全局属性集中的元素集合;
    所述用户客户端获取用户输入的关键词,利用所述关键词及所述访问权限验证结果生成陷门并将所述陷门发送给所述服务器;
    所述用户客户端接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器,获取所述服务器基于所述标识符匹配的加密健康记录,所述关键词密文是由所述数据属主客户端基于所述关键词对应的二进制长度构造的加密二值树得到的。
  2. 根据权利要求1所述的方法,其特征在于,所述用户客户端向服务器发送健康记录的搜索请求的步骤之前还包括:
    第三方公证客户端获取第三方公证客体输入的安全参数和所述全局属性集,生成系统公钥和主密钥,并根据所述系统公钥和所述主密钥以及所述用户属性集生成用户密钥;
    数据属主客户端利用对称加密算法对上传的健康记录进行加密,并利用公钥加密算法对从健康记录中提取到的关键词建立索引密文,所述索引密文包括所述搜索权限控制密文和所述关键词密文;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希 函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ、第三哈希函数H 3:{0,1} *→{0,1} κ、第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中λ和κ表示安全参数;
    其中,所述系统公钥与所述主密钥及所述用户密钥的计算公式如下:
    Figure PCTCN2018082731-appb-100001
    MSK={α,g β,{v j|a j∈N}}
    Figure PCTCN2018082731-appb-100002
    其中,PK表示所述系统公钥,α、β、r、和v j均属于所述系统集合Z p中的元素,MSK表示所述主密钥,SK表示所述用户密钥,D表示第一密钥,a j表示用户属性集N'中的元素,其中,用户属性集N'为全局属性集N中的元素集合,D j表示第二密钥;
    其中,所述索引密文的计算公式如下:
    CI={SCC,EBT}
    其中,CI表示所述索引密文,SCC表示所述搜索权限控制密文,EBT表示所述关键词密文;
    其中,所述搜索权限控制密文的计算公式如下:
    Figure PCTCN2018082731-appb-100003
    其中:
    Figure PCTCN2018082731-appb-100004
    Figure PCTCN2018082731-appb-100005
    Figure PCTCN2018082731-appb-100006
    Figure PCTCN2018082731-appb-100007
    其中,SCC表示所述搜索权限控制密文,T表示所述访问策略树,
    Figure PCTCN2018082731-appb-100008
    表示第一节点密文,C i表示第二节点密文,k i表示第三节点密文,η表示访问等级的个数,C att(x)表示叶子节点x密文,att(x)表示在所述访问策略树中,与叶子 节点x相对应的属性构成的集合Y中的任一个元素,t i、β和s i表示所述系统集合Z p中的元素,k表示集合{0,1} λ中的元素,v att(x)表示所述访问策略树中的节点x对应的属性值的指数,q x(0)表示所述访问策略树中的节点x对应的多项式q x常数项的取值;
    其中,所述关键词密文的计算公式如下:
    Figure PCTCN2018082731-appb-100009
    U=g u
    Figure PCTCN2018082731-appb-100010
    Figure PCTCN2018082731-appb-100011
    其中,EBT表示所述关键词密文,U表示第一加密元素,S i表示第二加密元素,η表示访问等级的个数,C lh表示第三加密元素,M表示下标为(l,h)对的密文集合,其中(l,h)对表示所述加密二值树中第l层的第h个节点,u、t i、y 00和y lh属于所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100012
    表示0,1构成的字符串,可以截断成多个标识符,w j表示多个关键词中的一个。
  3. 根据权利要求1所述的方法,其特征在于,所述用户客户端根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,得到满足所述用户属性集的访问权限验证结果的步骤包括:
    所述用户客户端根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,按照如下公式得到满足所述用户属性集的访问权限验证结果:
    VR={k i,A i}
    其中,VR表示所述访问权限验证结果,k i表示第三节点密文,A i表示验证元素;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立 e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1};
    其中,验证元素A i的计算公式如下:
    Figure PCTCN2018082731-appb-100013
    Figure PCTCN2018082731-appb-100014
    其中,F i表示递归结果值,DecValNode(SCC,SK,x i)表示所述预设递归算法,SCC表示所述搜索权限控制密文,SK表示用户密钥,x i表示所述访问策略树中的第i个等级节点,α、β、r、t i和s i均属于所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100015
    表示第i个等级节点所对应的多项式常数项的取值,
    Figure PCTCN2018082731-appb-100016
    表示第一节点密文,D表示第一密钥,C i表示第二节点密文。
  4. 根据权利要求1所述的方法,其特征在于,所述用户客户端获取用户输入的关键词,利用所述关键词及所述访问权限验证结果生成陷门并将所述陷门发送给所述服务器的步骤包括:
    所述用户客户端获取用户输入的关键词,生成与所述关键词对应的桶元素集合;
    所述用户客户端利用所述桶元素集合和所述访问权限验证结果,生成所述陷门,所述陷门包括第一陷门元素、第二陷门元素、第三陷门元素和第四陷门元素;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G0、第二哈希函数H 2:{0,1} *→{0,1} λ及第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d,其中λ表示安全参数;
    其中,所述桶元素集合的计算公式如下:
    Figure PCTCN2018082731-appb-100017
    Figure PCTCN2018082731-appb-100018
    j=1,2,…,d
    其中,k表示集合{0,1} λ中的元素,k i表示第三节点密文,t i表示所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100019
    表示所述桶元素的集合,
    Figure PCTCN2018082731-appb-100020
    表示所述桶元素,
    Figure PCTCN2018082731-appb-100021
    表示所述关键词,d表示所述关键词对应的二进制长度;
    其中,所述陷门的计算公式如下:
    Figure PCTCN2018082731-appb-100022
    其中:
    Figure PCTCN2018082731-appb-100023
    Figure PCTCN2018082731-appb-100024
    Figure PCTCN2018082731-appb-100025
    Figure PCTCN2018082731-appb-100026
    其中,TD表示所述陷门,
    Figure PCTCN2018082731-appb-100027
    表示所述第一陷门元素,S'表示所述第二陷门元素,
    Figure PCTCN2018082731-appb-100028
    表示所述第三陷门元素,
    Figure PCTCN2018082731-appb-100029
    表示所述第四陷门元素,d表示所述关键词对应的二进制长度,t i、τ j和α表示系统集合Z p中的元素且τ 1为τ j中的一个元素,
    Figure PCTCN2018082731-appb-100030
    表示所述桶元素。
  5. 根据权利要求1所述的方法,其特征在于,所述用户客户端接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器,获取所述服务器基于所述标识符匹配的加密健康记录的步骤包括:
    所述用户客户端接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器;
    所述用户客户端获取所述服务器基于所述标识符匹配的加密健康记录;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第三哈希函数H 3:{0,1} *→{0,1} κ及第二伪随机函数 PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中κ表示安全参数;
    其中,所述匹配结果的计算公式如下:
    Figure PCTCN2018082731-appb-100031
    其中,
    Figure PCTCN2018082731-appb-100032
    表示所述匹配结果,h表示构造的加密二值树中第d层中的一个节点,i表示所述用户客户端满足的访问等级;
    其中,所述标识符的计算公式如下:
    Figure PCTCN2018082731-appb-100033
    其中,
    Figure PCTCN2018082731-appb-100034
    表示由0,1构成的字符串,可以截断成多个标识符,
    Figure PCTCN2018082731-appb-100035
    表示所述匹配结果,t i表示系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100036
    表示所述关键词。
  6. 一种支持分层搜索的加密健康记录的获取系统,其特征在于,所述系统包括:
    用户客户端,用于向服务器发送健康记录的搜索请求,并接收所述服务器发送的搜索权限控制密文,所述搜索权限控制密文包括由数据属主客户端根据所述健康记录划分的访问等级构造的访问策略树;
    所述用户客户端,还用于根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,得到满足所述用户属性集的访问权限验证结果,所述用户属性集为预先设定的全局属性集中的元素集合;
    所述用户客户端,还用于获取用户输入的关键词,利用所述关键词及所述访问权限验证结果生成陷门并将所述陷门发送给所述服务器;
    所述用户客户端,还用于接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器,获取所述服务器基于所述标识符匹配的加密健康记录,所述关键词密文是由所述数据属主客户端基于所述关键词对应的二进制长度构造的加密二值树得到的。
  7. 根据权利要求6所述的系统,其特征在于,
    所述用户客户端向服务器发送健康记录的搜索请求之前还包括:
    第三方公证客户端,用于获取第三方公证客体输入的安全参数和所述全局属性集,生成系统公钥和主密钥,并根据所述系统公钥和所述主密钥以及所述用户属性集生成用户密钥;
    数据属主客户端,用于利用对称加密算法对上传的健康记录进行加密,并利用公钥加密算法对从健康记录中提取到的关键词建立索引密文,所述索引密文包括所述搜索权限控制密文和所述关键词密文;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ、第三哈希函数H 3:{0,1} *→{0,1} κ、第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中λ和κ表示安全参数;
    其中,所述系统公钥与所述主密钥及所述用户密钥的计算公式如下:
    Figure PCTCN2018082731-appb-100037
    MSK={α,g β,{v j|a j∈N}}
    Figure PCTCN2018082731-appb-100038
    其中,PK表示所述系统公钥,α、β、r、和v j均属于所述系统集合Z p中的元素,MSK表示所述主密钥,SK表示所述用户密钥,D表示第一密钥,a j表示用户属性集N'中的元素,其中,用户属性集N'为全局属性集N中的元素集合,D j表示第二密钥;
    其中,所述索引密文的计算公式如下:
    CI={SCC,EBT}
    其中,CI表示所述索引密文,SCC表示所述搜索权限控制密文,EBT表示所述关键词密文;
    其中,所述搜索权限控制密文的计算公式如下:
    Figure PCTCN2018082731-appb-100039
    其中:
    Figure PCTCN2018082731-appb-100040
    Figure PCTCN2018082731-appb-100041
    Figure PCTCN2018082731-appb-100042
    Figure PCTCN2018082731-appb-100043
    其中,SCC表示所述搜索权限控制密文,T表示所述访问策略树,
    Figure PCTCN2018082731-appb-100044
    表示第一节点密文,C i表示第二节点密文,k i表示第三节点密文,η表示访问等级的个数,C att(x)表示叶子节点x密文,att(x)表示在所述访问策略树中,与叶子节点x相对应的属性构成的集合Y中的任一个元素,t i、β和s i表示所述系统集合Z p中的元素,k表示集合{0,1} λ中的元素,v att(x)表示所述访问策略树中的节点x对应的属性值的指数,q x(0)表示所述访问策略树中的节点x对应的多项式q x常数项的取值;
    其中,所述关键词密文的计算公式如下:
    Figure PCTCN2018082731-appb-100045
    U=g u
    Figure PCTCN2018082731-appb-100046
    Figure PCTCN2018082731-appb-100047
    其中,EBT表示所述关键词密文,U表示第一加密元素,S i表示第二加密元素,η表示访问等级的个数,C lh表示第三加密元素,M表示下标为(l,h)对的密文集合,其中(l,h)对表示所述加密二值树中第l层的第h个节点,u、t i、y 00和y lh属于所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100048
    表示0,1构成的字符串,可以截断成多个标识符,w j表示多个关键词中的一个。
  8. 根据权利要求6所述的系统,其特征在于,
    所述用户客户端,还用于根据预设递归算法,利用用户属性集与所述访问策略树进行访问权限验证,按照如下公式得到满足所述用户属性集的访问权限验证结果:
    VR={k i,A i}
    其中,VR表示所述访问权限验证结果,k i表示第三节点密文,A i表示验证元素;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1};
    其中,验证元素A i的计算公式如下:
    Figure PCTCN2018082731-appb-100049
    Figure PCTCN2018082731-appb-100050
    其中,F i表示递归结果值,DecValNode(SCC,SK,x i)表示所述预设递归算法,SCC表示所述搜索权限控制密文,SK表示用户密钥,x i表示所述访问策略树中的第i个等级节点,α、β、r、t i和s i均属于所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100051
    表示第i个等级节点所对应的多项式常数项的取值,
    Figure PCTCN2018082731-appb-100052
    表示第一节点密文,D表示第一密钥,C i表示第二节点密文。
  9. 根据权利要求6所述的系统,其特征在于,
    所述用户客户端,还用于获取用户输入的关键词,生成与所述关键词对应的桶元素集合;
    所述用户客户端,还用于利用所述桶元素集合和所述访问权限验证结果,生成所述陷门,所述陷门包括第一陷门元素、第二陷门元素、第三陷门元素和第四陷门元素;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立 e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第二哈希函数H 2:{0,1} *→{0,1} λ及第一伪随机函数PRF 1:{0,1} λ×{0,1} d→{0,1} d,其中λ表示安全参数;
    其中,所述桶元素集合的计算公式如下:
    Figure PCTCN2018082731-appb-100053
    Figure PCTCN2018082731-appb-100054
    j=1,2,…,d
    其中,k表示集合{0,1} λ中的元素,k i表示第三节点密文,t i表示所述系统集合Z p中的元素,
    Figure PCTCN2018082731-appb-100055
    表示所述桶元素的集合,
    Figure PCTCN2018082731-appb-100056
    表示所述桶元素,
    Figure PCTCN2018082731-appb-100057
    表示所述关键词,d表示所述关键词对应的二进制长度;
    其中,所述陷门的计算公式如下:
    Figure PCTCN2018082731-appb-100058
    其中:
    Figure PCTCN2018082731-appb-100059
    Figure PCTCN2018082731-appb-100060
    Figure PCTCN2018082731-appb-100061
    Figure PCTCN2018082731-appb-100062
    其中,TD表示所述陷门,
    Figure PCTCN2018082731-appb-100063
    表示所述第一陷门元素,S'表示所述第二陷门元素,
    Figure PCTCN2018082731-appb-100064
    表示所述第三陷门元素,
    Figure PCTCN2018082731-appb-100065
    表示所述第四陷门元素,d表示所述关键词对应的二进制长度,t i、τ j和α表示系统集合Z p中的元素且τ 1为τ j中的一个元素,
    Figure PCTCN2018082731-appb-100066
    表示所述桶元素。
  10. 根据权利要求6所述的系统,其特征在于,
    所述用户客户端,还用于接收所述服务器反馈的基于所述陷门和关键词密文匹配生成的匹配结果,根据所述匹配结果生成标识符并发送给所述服务器;
    所述用户客户端,还用于获取所述服务器基于所述标识符匹配的加密健康 记录;
    其中,预先设置一个阶为素数p、生成元为g的双线性群G 0,建立e:G 0×G 0→G T的双线性映射e,并建立系统集合Z p={0,1,2,…,p-1}、第一哈希函数H 1:{0,1} *→G 0、第三哈希函数H 3:{0,1} *→{0,1} κ及第二伪随机函数PRF 2:{0,1} κ×{0,1} *→{0,1} κ,其中κ表示安全参数;
    其中,所述匹配结果的计算公式如下:
    Figure PCTCN2018082731-appb-100067
    其中,
    Figure PCTCN2018082731-appb-100068
    表示所述匹配结果,h表示构造的加密二值树中第d层中的一个节点,i表示所述用户客户端满足的访问等级;
    其中,所述标识符的计算公式如下:
    Figure PCTCN2018082731-appb-100069
    其中,
    Figure PCTCN2018082731-appb-100070
    表示由0,1构成的字符串,可以截断成多个标识符,
    Figure PCTCN2018082731-appb-100071
    表示所述匹配结果,t i表示系统集合Z p中的元素,w~表示所述关键词。
PCT/CN2018/082731 2018-04-12 2018-04-12 支持分层搜索的加密健康记录的获取方法和系统 WO2019196042A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/082731 WO2019196042A1 (zh) 2018-04-12 2018-04-12 支持分层搜索的加密健康记录的获取方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/082731 WO2019196042A1 (zh) 2018-04-12 2018-04-12 支持分层搜索的加密健康记录的获取方法和系统

Publications (1)

Publication Number Publication Date
WO2019196042A1 true WO2019196042A1 (zh) 2019-10-17

Family

ID=68163462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082731 WO2019196042A1 (zh) 2018-04-12 2018-04-12 支持分层搜索的加密健康记录的获取方法和系统

Country Status (1)

Country Link
WO (1) WO2019196042A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645206A (zh) * 2021-07-28 2021-11-12 上海纽盾网安科技有限公司 用于不同用户需求的云存储数据访问控制方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542130A (zh) * 2010-12-09 2012-07-04 东莞广州中医药大学中医药数理工程研究院 一种可分层授权的私密型居民健康档案卡及读卡装置
CN103618729A (zh) * 2013-09-03 2014-03-05 南京邮电大学 一种应用于云存储的多机构层次化属性基加密方法
US20140229736A1 (en) * 2011-09-28 2014-08-14 Koninklijke Philips N.V. Hierarchical attribute-based encryption and decryption
CN107634829A (zh) * 2017-09-12 2018-01-26 南京理工大学 基于属性的可搜索加密电子病历系统及加密方法
CN107682353A (zh) * 2017-10-25 2018-02-09 西安邮电大学 一种电子医疗云中的健康档案访问控制系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542130A (zh) * 2010-12-09 2012-07-04 东莞广州中医药大学中医药数理工程研究院 一种可分层授权的私密型居民健康档案卡及读卡装置
US20140229736A1 (en) * 2011-09-28 2014-08-14 Koninklijke Philips N.V. Hierarchical attribute-based encryption and decryption
CN103618729A (zh) * 2013-09-03 2014-03-05 南京邮电大学 一种应用于云存储的多机构层次化属性基加密方法
CN107634829A (zh) * 2017-09-12 2018-01-26 南京理工大学 基于属性的可搜索加密电子病历系统及加密方法
CN107682353A (zh) * 2017-10-25 2018-02-09 西安邮电大学 一种电子医疗云中的健康档案访问控制系统及方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645206A (zh) * 2021-07-28 2021-11-12 上海纽盾网安科技有限公司 用于不同用户需求的云存储数据访问控制方法及系统

Similar Documents

Publication Publication Date Title
WO2022007889A1 (zh) 基于区块链与同态加密的可搜索加密数据共享方法及系统
CN110224986A (zh) 一种基于隐藏策略cp-abe的高效可搜索访问控制方法
WO2016197769A1 (zh) 一种基于表格属性的云存储密文访问控制系统
CN107359998B (zh) 一种便携式智能口令管理体制的建立与操作方法
CN108092766B (zh) 一种密文搜索权限验证方法及其系统
KR20100068042A (ko) 데이터 암호화 방법 및 암호화된 데이터의 결합 키워드 검색방법
CN109714157B (zh) 一种抗密钥暴露属性加密的sdn跨域访问控制方法
CN112532650A (zh) 一种基于区块链的多备份安全删除方法、系统
CN112543099B (zh) 一种基于边缘计算的无证书可搜索加密方法
CN114239046A (zh) 数据共享方法
CN115037556B (zh) 一种智慧城市系统中加密数据可授权共享方法
Ma et al. CP-ABE-based secure and verifiable data deletion in cloud
JP2013156675A (ja) 暗号文検索システム、検索情報生成装置、検索実行装置、検索要求装置、暗号文検索方法、検索情報生成方法、検索実行方法、検索要求方法、およびプログラム
CN115473703A (zh) 认证的基于身份的密文等值测试方法、装置、系统及介质
CN108632257B (zh) 支持分层搜索的加密健康记录的获取方法和系统
CN105553661B (zh) 密钥管理方法和装置
WO2019196042A1 (zh) 支持分层搜索的加密健康记录的获取方法和系统
Shinde et al. Privacy preserving using data partitioning technique for secure cloud storage
CN109462581B (zh) 能够抵御暴力字典敌手持续攻击的密文去重方法
US11405195B2 (en) Device authentication
WO2019104674A1 (zh) 一种密文搜索权限验证方法及其系统
KR20100003093A (ko) 암호문 크기를 줄이기 위한 공개키 기반의 검색가능암호문생성 방법과, 그에 따른 공개키 기반의 데이터 검색 방법
Ali et al. An Effective Blockchain Based Secure Searchable Encryption System.
Li et al. Achieving forward unforgeability in keyword-field-free conjunctive search
Sabry et al. ArchiveSafe LT: Secure Long-term Archiving System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18914630

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/01/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18914630

Country of ref document: EP

Kind code of ref document: A1