Data search and query method and system based on searchable encryption and homomorphic encryption

By generating search credentials based on searchable encryption and homomorphic encryption, and using a data entry index mapping table to retrieve and decrypt encrypted data, the security deficiencies and resource waste problems in access control in sensitive data protection are solved, and efficient encrypted data search and query are achieved.

CN116266180BActive Publication Date: 2026-02-27STATE GRID INFORMATION & TELECOMM BRANCH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210167538.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-12-17
Filing Date
2022-02-23
Publication Date
2026-02-27
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

Existing technologies have security flaws in access control and permission management when protecting and using sensitive data, and the search and query efficiency of encrypted data is low, resulting in serious waste of resources.

Method used

This paper adopts a method based on searchable encryption and homomorphic encryption. By generating search credentials, it uses a data entry index mapping table to retrieve and decrypt encrypted data, supports the query of text and numerical data, and designs a credential generation module, an index mapping module, and a data download module. It combines word segmentation technology and the double trapdoor property of the BCP cryptosystem to process encrypted data.

Benefits of technology

It enables efficient retrieval and download of required data under encrypted conditions, avoiding resource waste, ensuring data security and privacy, and improving the efficiency of using sensitive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116266180B_ABST
    Figure CN116266180B_ABST
Patent Text Reader

Abstract

The application provides a data search and query method and system based on searchable encryption and homomorphic encryption, which comprises the following steps: generating a search voucher of a keyword based on the keyword of a data item required to be obtained by a data visitor; retrieving a data item index mapping table containing the keyword corresponding to the search voucher from a pre-constructed data item index mapping table based on the search voucher; decrypting the data item index mapping table to obtain a data item index, and downloading the data item required to be obtained based on the data item index; wherein the data item index mapping table is constructed by extracting the keyword from the text data through a word segmentation technique. The application converts the keyword required to be obtained into a data item index mapping table through a search voucher, and downloads the data item required based on the data item index mapping table, so that the data is searched and downloaded in an encrypted state, and the waste of downloaded resources is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information security, and particularly relates to a data search and query method and system based on searchable encryption and homomorphic encryption. BACKGROUND

[0002] With the continuous deployment of "digital new infrastructure" decisions, the data source, form and scale are increasing, and the demand for data management capabilities is also increasing. At present, the storage and management of massive power data cannot be undertaken by local devices, so data middle platforms are widely used to store and manage data. At the same time, these data often contain some sensitive data, such as user personal privacy information, expert database data, etc. Such data has confidentiality requirements and is not suitable for storage in data middle platforms directly operated and maintained by operators. At present, data owners often use data encryption to ensure data security, but this will result in the need for decryption, encryption operation and other processes for encrypted data before use, which will increase the time cost and system resource consumption, and is low in efficiency and high in cost.

[0003] For the security processing technology of sensitive data, there are currently three main schemes: secure multi-party computation (SMPC), trusted hardware (Trusted Execution Environment, TEE), and fully homomorphic encryption (FHE).

[0004] Secure multi-party computation refers to the joint computation of a joint function by distributed multi-participants. Each participant provides their own input information and obtains the corresponding output result. The security of secure multi-party computation ensures that the input and output of each participant will not be leaked to other participants. This source language can be used to construct a secure query of data. The database maintainer and the customer can be participants in secure multi-party computation; the joint function can be designed to take the customer's input as its query condition and obtain the output as the ciphertext of the query result.

[0005] Fully homomorphic encryption is a special encryption scheme. Data encrypted by this scheme can be directly operated on the ciphertext without decryption, and the ciphertext of the operation result is obtained. After decryption, the expected calculation result can be obtained. Fully homomorphic encryption can also be used to construct a query function on encrypted data.

[0006] In recent years, the hardware-based trusted computing technology commonly equipped in new processors provides another way for encrypted data processing, which can provide three features to ensure the security and privacy during data processing: complete isolation execution, data encapsulation and remote attestation. The implementation of these features will be different according to the products of different manufacturers. Specifically, "isolation execution" divides a specific area in the memory, and limits that only a specific process can access the memory space; other processes, even system processes, hypervisor and system management module cannot access the data of this memory space. "Data encapsulation" is to encrypt and authenticate, so that only a specific process can perform decryption operation to get the original data. "Remote attestation" proves to the user that all the codes are executed in a safe and unmodified manner. The three features work together, and the effect is equivalent to that the user divides a "hidden area" on the server. Any operation in this space cannot be observed, modified and controlled by the server. This technology can also be used to build a trusted database query, and the cloud server installs trusted hardware, encrypts the data, and puts the required data and operations into the "hidden area". It is worth mentioning that even if the data is decrypted in the "hidden area", the decrypted plaintext is still invisible to the cloud server. The search and query function of the data can be realized.

[0007] Currently, the protection and use of sensitive power data mainly adopt the idea of permission management and access control, store sensitive data in a negative list space, and protect sensitive data security through user permission approval and secure zone operation. However, for highly sensitive data such as expert database, this simple protection measure still has the possibility of being broken, and once data leakage occurs, it will cause great harm, and it is not enough to meet the needs of business departments, so it is necessary to store such highly sensitive data in an encrypted form to fully protect its security.

[0008] After the data is encrypted and saved, if you want to directly use these data, you need to download and decrypt, which is very costly. In order to make it still have certain usability, it is necessary to design search, query and other technologies for encrypted data, but the existing encrypted data search technology cannot meet the actual needs. SUMMARY

[0009] In order to solve the problems of the security defects of the traditional sensitive data protection method depending on permission management and access control and the waste of downloading resources in the encrypted case, the present application provides a data search and query method based on searchable encryption and homomorphic encryption, comprising:

[0010] Generating a search credential of the keyword based on the keyword of the data item required to be obtained by a data visitor;

[0011] retrieving, based on the search credential, a data entry index mapping table corresponding to the search credential from a pre-constructed data entry index mapping table, the data entry index mapping table containing the keyword;

[0012] decrypting the data entry index mapping table to obtain a data entry index, and downloading a data item to be acquired based on the data entry index;

[0013] Preferably, the data entry index mapping table is constructed by segmenting text-form data by using a segmentation technique, and extracting a keyword from the segmented data.

[0014] Preferably, the construction of the data entry index mapping table comprises:

[0015] segmenting the text-form data by using a segmentation technique;

[0016] extracting a keyword from the segmented data;

[0017] constructing a data entry index mapping table from the keyword and the segmented data corresponding to the keyword.

[0018] Preferably, the search credential of the keyword is generated based on a data item to be acquired by a data accessor, and the method comprises:

[0019] verifying whether the data accessor has access rights based on a keyword query application sent by the data accessor, and generating the search credential corresponding to the keyword for the data accessor when the data accessor has the access rights.

[0020] Preferably, the method further comprises:

[0021] querying the numerical data based on a query instruction sent by the data accessor.

[0022] Preferably, the querying the numerical data based on the query instruction sent by the data accessor comprises:

[0023] parsing the query instruction sent by the data accessor, and directly calculating an encrypted column of homomorphic encryption to obtain a ciphertext corresponding to the numerical data to be queried when the parsing result contains only an addition operation;

[0024] when the parsing result contains an addition operation and a non-addition operation, blinding the operands by using a generated random number, decrypting the blinded operands by using a double trapdoor of a BCP cryptosystem to obtain plaintext of the blinded data, calculating the plaintext of the blinded data, encrypting the calculation result to obtain ciphertext with a blinding factor, and de-blinding the ciphertext with the blinding factor to obtain the ciphertext corresponding to the numerical data to be queried.

[0025] The application also provides a data search and query system based on searchable encryption and homomorphic encryption, comprising:

[0026] A credential generation module for generating a search credential of a keyword based on the keyword of a data item required by a data visitor;

[0027] An index mapping module for retrieving a data item index mapping table containing the keyword corresponding to the search credential from a pre-constructed data item index mapping table based on the search credential;

[0028] A data download module for decrypting the data item index mapping table to obtain a data item index and downloading the data item required based on the data item index;

[0029] The data item index mapping table is constructed by extracting the keyword from the data in text form through a word segmentation technique.

[0030] Preferably, the construction of the data item index mapping table comprises:

[0031] Segmenting the data in text form through a word segmentation technique;

[0032] Extracting the keyword from the segmented data;

[0033] Constructing the data item index mapping table from the keyword and the segmented data corresponding to the keyword.

[0034] Preferably, the application further comprises a numerical data query module.

[0035] The numerical data query module is used for querying numerical data based on a query instruction issued by the data visitor.

[0036] Preferably, the numerical data query module comprises:

[0037] An addition operation sub-module for directly calculating the homomorphic encryption column to obtain the ciphertext corresponding to the numerical data to be queried when the query instruction issued by the data visitor is parsed and the result is only an addition operation;

[0038] A mixed operation sub-module for blinding the operation data with a generated random number when the parsed result contains an addition operation and a non-addition operation, decrypting the blinded operation data using a double trapdoor of the BCP cryptosystem to obtain the plaintext of the blinded data, calculating the plaintext of the blinded data, encrypting the result of the calculation to obtain the ciphertext with a blinding factor, and de-blinding the ciphertext with the blinding factor to obtain the ciphertext corresponding to the numerical data to be queried.

[0039] Compared with the prior art, the present application has the following advantages:

[0040] The present application provides a data search and query method based on searchable encryption and homomorphic encryption, comprising: generating a search credential of a keyword based on a keyword of a data item required to be obtained by a data visitor; retrieving a data item index mapping table containing the keyword corresponding to the search credential from a pre-constructed data item index mapping table based on the search credential; decrypting the data item index mapping table to obtain a data item index, and downloading the data item required to be obtained based on the data item index; wherein the data item index mapping table is constructed by extracting the keyword from the data in text form by using a word segmentation technique. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 The flow chart of the data search and query method based on searchable encryption and homomorphic encryption of the present application;

[0042] Figure 2 The schematic diagram of the data search and query method of the present application;

[0043] Figure 3 The schematic diagram of the deployment architecture and workflow of the present application. DETAILED DESCRIPTION

[0044] In order to better understand the present application, the content of the present application will be further described below in combination with the drawings and examples. The present application provides a data search and query method based on searchable encryption and homomorphic encryption, which uses efficient searchable encryption and designs a cryptography protocol to design a query scheme for numerical data by using an efficient password source. In addition to file keyword search, the present application also supports SQL statement query on a relational database. Specifically, for a query statement that can be expressed only by addition, the present application uses homomorphic encryption technology to directly obtain a query result by calculating on encrypted data; for a complex query requiring both addition and multiplication, the present application uses an auxiliary server to construct a complete database query mechanism.

[0045] Embodiment 1:

[0046] The present application provides a data search and query method based on searchable encryption and homomorphic encryption, as shown in Figure 1 , comprising:

[0047] Step 1: generating search credentials of the keyword based on the keyword of the data item required to be acquired by the data visitor;

[0048] Step 2: retrieving the data item index mapping table containing the keyword corresponding to the search credentials from the pre-constructed data item index mapping table based on the search credentials;

[0049] Step 3: decrypting the data item index mapping table to obtain a data item index, and downloading the data item required to be acquired based on the data item index;

[0050] Wherein, the data item index mapping table is constructed by extracting the keyword from the text data by using the word segmentation technology.

[0051] Before Step 1, it also includes:

[0052] The construction of the data item index mapping table includes:

[0053] Segmenting the text data by using the word segmentation technology;

[0054] Extracting the keyword from the segmentation;

[0055] Constructing the data item index mapping table from the keyword and the segmentation corresponding to the keyword.

[0056] The construction of the data item index mapping table is described in detail as follows:

[0057] For the confidential data in the form of text, the data owner first segments the multiple fields in the data table by using the word segmentation technology, and extracts the keyword therefrom. The keyword is usually an important real word representing the information of the data item.

[0058] Based on the above extracted keyword set, the data owner establishes a keyword-based search index for the text file. The index is in the form of a mapping table of [keyword A, index of the data item containing keyword A in all items in the file].

[0059] The data owner encrypts all data in the text file row by row by using the mainstream encryption algorithm (such as AES), and also encrypts each extracted keyword respectively. For the established index structure, it is permuted by using the cryptography method (such as bilinear pair), so as to avoid that others cannot know the corresponding relationship between the keyword and the data item according to the index when they have the index; but when a specific search credential is obtained, the corresponding part of information in the index can be obtained by using the search credential.

[0060] The present application is directed to a character type field, and a ciphertext search scheme is designed, so that when a user wants to find a data item containing a keyword w, a search credential [w] about the keyword can be generated, [w] is sent to the data storage server, and the data storage server performs a search using [w] and sends the data item containing the keyword w (in an encrypted state) to the user.

[0061] In step 1, a search credential of the keyword is generated based on the keyword of the data item required by the data visitor, and specifically includes:

[0062] Based on the keyword query application sent by the data visitor, it is verified whether the data visitor has access permission, and when the data visitor has access permission, a search credential corresponding to the keyword is generated for the data visitor. The permission management party in the embodiment is used to judge whether the data visitor has access permission, and the data storage party is used to store and manage data.

[0063] According to the permission separation management mechanism, when a user (data visitor) wants to search and obtain a data item containing a keyword, the user needs to first send a query application to the permission management party. The permission management party generates a search credential corresponding to the keyword for the user and sends it to the data storage party after verifying that the user has query permission.

[0064] In step 2, the data item index mapping table containing the keyword corresponding to the search credential is retrieved from the pre-constructed data item index mapping table based on the search credential, and specifically includes:

[0065] After receiving the search credential about a keyword, the data storage party retrieves the data item index mapping table containing the keyword corresponding to the search credential in the encrypted index according to the search credential, and returns the encrypted mapping table to the visitor.

[0066] In step 3, the data item index is obtained by decrypting the data item index mapping table, and the data item required to be obtained is downloaded based on the data item index, and specifically includes:

[0067] The visitor decrypts the obtained result, downloads the corresponding encrypted data according to the obtained data item index, and decrypts the data.

[0068] The present application also includes querying numerical data based on the query instruction issued by the data visitor.

[0069] Data format and privacy protection requirements:

[0070] Data is stored in a two-dimensional table format. Each column in the database table is a field, also called an attribute, and each row is a record, also called a tuple. Attributes in the database table have two types: numeric and character. Furthermore, each attribute includes both numeric and character data, which may be sensitive or non-sensitive. Sensitive character data is encrypted using a searchable encryption scheme to ensure search functionality for character data. Sensitive numeric data is encrypted using the BCP encryption algorithm, which is an encryption algorithm with homomorphic addition, homomorphic key, and double trapdoor properties to ensure linear and non-linear operations on numeric data. Homomorphic addition means that the ciphertext of two data encrypted with the same key can be directly obtained by performing a certain operation on the ciphertext without decryption, i.e., Enc. pk (m1)+Enc pk (m2)=Enc pk (m1+m2); Homomorphic keys refer to data that can be encrypted using the sum of two public keys as the public key, and decrypted using a private key corresponding to one of the two public keys. Double trapdoor refers to a method that allows for PK with any public key. i Encrypted data In addition to its corresponding private key sk, i In addition to decryption, there is a "privileged key" mk that can decrypt any ciphertext encrypted with a private key, which is the second trapdoor; linear and nonlinear operations are important components of SQL query statements.

[0071] Specifically, for query operations targeting numerical data, three scenarios may arise: 1. The query statement involves only non-sensitive data; 2. The query statement involves only sensitive data; 3. The query statement involves both sensitive and non-sensitive data. For scenario 1, the query function in the existing database management system can handle the task.

[0072] For case 2 and case 3, in the application, structured database, also known as data table, is used for storage according to the characteristics of power data, each record contains several fields, also known as attributes, the record here refers to a row of the database table, also known as a tuple, and part of the fields are character type and part are numerical type, the numerical type here includes integer or floating point data. Part of the attributes are sensitive data and part are regular data. In order to protect the safety and privacy of data and at the same time ensure that the data storage service provider can perform necessary operations on the data, the necessary operations include search and query, the application uses a homomorphic encryption scheme to encrypt the sensitive data; for non-sensitive data, plaintext storage is used to improve the efficiency of data query operation. At the same time, the application designs a corresponding scheme to complete specific operations on the data. In particular, considering the actual application scenario of power grid data, the query operation of multi-column data often occurs, and the application makes special design for the cross-column query statement execution mode for the data query scheme.

[0073] The numerical type data is queried based on the query instruction issued by the data visitor, and the numerical type data is queried based on the query instruction issued by the data visitor.

[0074] The query instruction issued by the data visitor is parsed, and when the parsing result contains only addition operation, the encrypted column of the homomorphic encryption is directly calculated to obtain the ciphertext corresponding to the numerical type data to be queried.

[0075] When the parsing result contains addition operation and non-addition operation, the operation number is blinded with the generated random number, the blinded operation data is decrypted by using the double trapdoor of the BCP cryptosystem to obtain the plaintext of the blinded data, and the plaintext of the blinded data is calculated, and the result of the calculation is encrypted to obtain the ciphertext with the blind factor. The ciphertext with the blind factor is deblinded to obtain the ciphertext corresponding to the numerical type data to be queried.

[0076] For the query statement of the numerical type data, the application designs a query analysis scheme to parse the query instruction of the user into the basic algebraic operation between each data item of the database table.

[0077] For each basic operation after parsing, according to the operation type and the data involved, the application designs different operation execution schemes. First, for linear operations involving only a single encrypted column, the linear operations here include addition and multiplication, the application uses the additive homomorphism property of the BCP encryption system, that is, the ciphertext encrypted with the same key can directly obtain the ciphertext of the sum of two plaintexts after addition, and directly obtain the operation result without decryption. Secondly, for the addition and multiplication operations involving two encrypted columns, the application designs the interaction protocol between the storage server and the auxiliary operation server to complete the operation. Specifically, the storage server first generates a random number, blinds the operation number with the random number, and sends the blinded operation number to the auxiliary calculation server; the auxiliary calculation server uses the double trapdoor property of the BCP encryption system to obtain the plaintext of the blinded data, and completes the calculation and encryption, and sends the ciphertext of the operation result with the blind factor to the storage server; the storage server deblinds to obtain the final operation result. Finally, for the numerical comparison operation between multiple encrypted columns, the comparison operation here is to judge the size of two numerical values or whether two numerical values are equal, the application designs a similar interaction protocol between the storage server and the auxiliary operation server to complete the operation, as shown in Figure 2

[0078] Considering the current widely used deployment scenarios, the application adopts the deployment architecture as shown in Figure 3 : the data middle platform is responsible for data storage and maintenance, at the same time, we use the computing cloud server which belongs to different service providers with the data storage cloud, in this embodiment, the storage cloud and the auxiliary computing cloud server are used, and the interaction protocol between the storage cloud and the auxiliary computing cloud server is designed to complete the nonlinear operation. The design only needs the computing cloud server to be responsible for extremely light calculation, so economic deployment can be realized.

[0079] If the parsed result only contains addition operation, the homomorphic encryption property is directly used to operate on the ciphertext, the query is completed, and the query result is returned to the user, the query result here refers to the numerical result that meets the condition and the data item that meets the condition.

[0080] Embodiment 2:

[0081] The query operation of numerical data is as follows:

[0082] ​In order to be compatible with other database systems and user habits, the query of numerical data is in the form of SQL statement. When executing the SQL statement, the query condition statement in the SQL statement needs to be calculated first, which is usually an algebraic operation statement and a logical operation statement. The algebraic operation statement is, for example, addition, subtraction, multiplication and power operation, and the logical operation statement is, for example, whether the values on both sides of the operator are equal, whether the value before the operator is greater than the value after the operator. Then the results meeting the query condition statement are output. Since part of the data has been encrypted, the application designs a special calculation scheme under ciphertext. After obtaining the calculation result of the query condition statement, the application directly uses the mature scheme in the existing database management system to output the query result.

[0083] Scenario one: when performing operations such as SELECT * WHERE A+B = 6, two operations need to be performed, which are the addition operation of A+B and the equality judgment operation of the result of A+B operation and c. The addition operation is a linear operation, and the equality comparison is a nonlinear operation.

[0084] Scenario two: when performing operations such as SELECT * WHERE A>5; or SELECT * WHERE A = B, comparison and equality test operations need to be performed, which are both nonlinear operations.

[0085] Scenario three: when performing operations such as SELECT COUNT(*) WHERE A>5 or SELECT SUM(*) WHERE 2*B>C, COUNT (counting), SUM (summing) and multiplication operations need to be performed, which are all linear operations.

[0086] Scenario four: when performing operations such as SELECT * WHERE A X B>15, A×B multiplication operation needs to be performed.

[0087] Processing type one: only involving single addition attribute operation:

[0088] For A+B, A×B and other algebraic operations involving multiple attributes, when the attribute A is data stored in ciphertext, the key pk A is used to encrypt the attribute B, which is data stored in plaintext, according to the property of BCP homomorphic encryption. The data center first encrypts each element of attribute B using pk A , and obtains the ciphertext of the operation result under the ciphertext. For operations involving multiple data items of the same attribute, such as SUM and AVE, the data center can also directly complete the operation using the property of homomorphic encryption. For number multiplication operations such as α×A, where α is an integer, the ciphertext of the number multiplication result can be obtained using the mathematical property of BCP encryption.

[0089] Processing type two: algebraic operation involving multiple columns of encrypted data

[0090] For A+B, AxB, etc. involving algebraic operation on multiple attributes, when attributes A, B are both stored as encrypted data, respectively use the key pk A , pk B , the data center cannot independently perform the calculation on the ciphertext. Therefore, the application designs a special interactive protocol to complete the operation process with the assistance of the auxiliary calculation server.

[0091] Taking addition operation as an example, when calculating A+B, the sum of each group of data items in the attribute, i.e. a+b, needs to be calculated, and the operation result is recorded as c. First, the data center generates two random numbers r1 and r2, and obtains the ciphertext of a+r1 and b+r2 according to the homomorphism of the BCP encryption algorithm and and sends them to the auxiliary calculation server. The auxiliary calculation server has the key mk, which can be decrypted to obtain a+r1 and b+r2, and then the sum operation is performed to obtain (a+b)+(r1+r2), and the encryption is obtained and sends it back to the data center; wherein the encryption key pk c is calculated according to the key homomorphism property of the BCP encryption system, using pk a and pk b . The data center obtains After that, because it retains r1 and r2, according to the homomorphism property of the encryption system, (r1+r2) can be subtracted from the ciphertext to obtain Other algebraic operations involving multiple columns of encrypted data, such as multiplication, etc., can also obtain the ciphertext of the calculation result through similar interactive protocol ideas.

[0092] Processing type three: non-algebraic operation involving multiple columns of encrypted data

[0093] Non-algebraic operation is mainly comparison operation, including judging the size of two numerical values and judging whether two numerical values are equal. In the database management system, according to different inputs, X types of processing are needed: (1) comparing a ciphertext data and a plaintext data; (2) comparing two data encrypted by the same key; (3) comparing two data encrypted by different keys. Because of the homomorphism of the BCP encryption system, case (1) can be converted to case (2) for processing.

[0094] Similarly, the comparison result, also called output, should also have two types-ciphertext output and plaintext output. When a query such as SELECT COUNT(*) WHERE A>B is executed, the result of each comparison is an intermediate data of the execution of the query, and the data center needs to be kept secret, so the comparison result should be in the form of ciphertext; if a query such as SELECT * WHERE A>B is executed, because the query is executed, and it is directly determined whether to output the tuple after each comparison, there is no need to keep the data center secret, and the comparison result is output in the form of plaintext. Therefore, the present application designs a comparison protocol as shown in Table 1. In particular, according to the current research progress, it is easier to design a protocol to obtain the comparison result of the Goldwasser-Micali encryption system, also known as QR encryption. The present application follows the current results, that is, the existing scheme is used to design the encrypted result of the QR encryption scheme, and the encryption mode is changed to convert the QR encrypted data into BCP encrypted data, as shown in Table 1.

[0095] Table 1

[0096]

[0097] So far, the present application designs a method for solving SQL query condition statements in ciphertext, and then uses the method in the mature database management system to output the corresponding content.

[0098] Embodiment 3:

[0099] The present application based on the same inventive concept also provides a data search and query system based on searchable encryption and homomorphic encryption, comprising:

[0100] A credential generation module for generating a search credential of a keyword based on the keyword of a data item required to be obtained by a data visitor;

[0101] An index mapping module for retrieving a data item index mapping table containing the keyword corresponding to the search credential from a pre-constructed data item index mapping table based on the search credential;

[0102] A data download module for decrypting the data item index mapping table to obtain a data item index, and downloading the data item required to be obtained based on the data item index;

[0103] Wherein, the data item index mapping table is constructed by extracting the keyword from the text data by using the word segmentation technology.

[0104] A data search and query system based on searchable encryption and homomorphic encryption also comprises a table construction module for constructing the data item index mapping table.

[0105] The table construction module is specifically used for:

[0106] adopting a word segmentation technique to segment the data in text form;

[0107] extracting keywords from the segmented words;

[0108] constructing a data entry index mapping table from the keywords and the segmented words corresponding to the keywords.

[0109] The table construction module will be described in detail as follows:

[0110] For confidential data in text form, the data owner first segments a plurality of fields existing in a data table through a word segmentation technique to extract keywords therefrom. The keywords are usually important real words representing information of the data entry.

[0111] Based on the extracted keyword set, the data owner establishes a keyword-based search index for the text file. The index is in the form of a mapping table of [keyword A, index of the data item containing keyword A in all items in the file].

[0112] The data owner encrypts all data in the text file row by row using a mainstream encryption algorithm (such as AES), and also encrypts each extracted keyword. For the previously established index structure, the index structure is permuted through a cryptographic method (such as a bilinear pair) to avoid the fact that others cannot know the correspondence between the keywords and the data items according to the index when the index is possessed; but when a specific search credential is obtained, the corresponding part of information in the index can be obtained.

[0113] The present application designs a ciphertext search scheme for character-type fields, so that when a user wants to find a data item containing a keyword w, a search credential [w] about the keyword can be generated, and [w] is sent to a data storage server. The data storage server performs a search using [w] and sends the data item containing the keyword w to the user in an encrypted state.

[0114] The credential generation module is specifically used for:

[0115] verifying whether the data accesser has access rights based on the keyword query application sent by the data accesser, and generating a search credential corresponding to the keyword for the data accesser when the data accesser has the access rights. The right management party in the embodiment is used to determine whether the data accesser has the access rights, and the data storage party is used to store and manage data.

[0116] According to the permission separation management mechanism, when a user, also referred to as a data visitor, wants to search and acquire a data item containing a keyword, the user needs to first send a query application to a permission management party.

[0117] The index mapping module retrieves, based on the search credential, a data item index mapping table containing the keyword corresponding to the search credential from a pre-constructed data item index mapping table, and specifically includes the following steps.

[0118] After receiving the search credential for a keyword, the data storage party retrieves, based on the search credential, a data item index mapping table containing the keyword corresponding to the search credential from the encrypted index, and returns the encrypted mapping table to the visitor.

[0119] The data downloading module specifically includes the following steps.

[0120] The visitor decrypts the obtained result, downloads the corresponding encrypted data according to the obtained data item index, and decrypts the data.

[0121] The application also includes a numerical data query module.

[0122] The numerical data query module is used to query numerical data based on a query instruction issued by the data visitor.

[0123] The numerical data query module includes the following steps.

[0124] The addition operation submodule is used to parse the query instruction issued by the data visitor, and when the parsing result contains only an addition operation, the encrypted column of the homomorphic encryption is directly calculated to obtain the ciphertext corresponding to the numerical data to be queried.

[0125] The mixed operation submodule is used to blind the operation data with a generated random number when the parsing result contains an addition operation and a non-addition operation, decrypt the blinded operation data using a double trapdoor of the BCP cryptographic system to obtain the plaintext of the blinded data, calculate the plaintext of the blinded data, encrypt the calculation result to obtain ciphertext with a blinding factor, and de-blind the ciphertext with the blinding factor to obtain the ciphertext corresponding to the numerical data to be queried.

[0126] For a query statement for numerical data, the application designs a query parsing scheme to parse the query instruction of the user into basic algebraic operations between data items in a database table.

[0127] For each basic operation after parsing, different operation execution schemes are designed according to the operation type and the data involved. First, for linear (addition and scalar multiplication) operations involving only a single encrypted column, the addition operation submodule of this invention uses the homomorphic property of the BCP cryptosystem, that is, ciphertext encrypted with the same key, to directly obtain the ciphertext of the sum of the two plaintexts without decryption, and directly obtain the operation result. Second, for addition and multiplication operations involving two encrypted columns, the hybrid operation submodule of this invention designs an interaction protocol between the storage server and the auxiliary computing server to complete the operation. Specifically, the storage server first generates a random number, uses this random number to blind the operands, and sends the blinded operands to the auxiliary computing server; the auxiliary computing server uses the double trapdoor property of the BCP cryptosystem to obtain the plaintext of the blinded data, completes the calculation and encryption, and sends the ciphertext of the operation result with the blinding factor to the storage server; the storage server deblinds it to obtain the final operation result. Finally, for numerical comparison operations involving multiple encrypted columns, including determining the size of two values ​​or whether two values ​​are equal, this invention designs an interaction protocol between a storage server and an auxiliary computing server to complete the operation.

[0128] We employ computing cloud servers belonging to different service providers than the data storage cloud. Here, we use storage cloud servers and auxiliary computing cloud servers, and design an interaction protocol between them to complete nonlinear operations. This design requires only the computing cloud servers to handle extremely lightweight computations, thus enabling economical deployment.

[0129] If the parsed result contains only addition operations, the addition operation submodule directly uses the properties of homomorphic encryption to operate on the ciphertext, completes the query, and returns the query result to the user. The query result here is the numerical result that meets the conditions and the data item that meets the conditions.

[0130] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0131] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0132] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0133] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0134] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0135] The above merely provides an embodiment of the present application, but is not intended to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall fall within the scope of the present application.

Claims

1. A data search and query method based on searchable encryption and homomorphic encryption, characterized in that, include: Generate search credentials for the keywords based on the keywords of the data items that the data visitor needs to obtain; Based on the search credentials, retrieve the data entry index mapping table containing the keywords corresponding to the search credentials from the pre-built data entry index mapping table; The data entry index mapping table is decrypted to obtain the data entry index, and the required data items are downloaded based on the data entry index. The data entry index mapping table is constructed by segmenting text data using word segmentation technology and extracting keywords from the segmented data. The process of generating search credentials for keywords based on the keywords of the data items that the data visitor needs to obtain includes: Based on the keyword query request sent by the data visitor, verify whether the data visitor has access rights. When the data visitor has access rights, generate a search credential corresponding to the keyword for the data visitor. The method further includes: querying numerical data based on the query instructions issued by the data visitor; The querying of numerical data based on the query command issued by the data visitor includes: Parse the query command issued by the data visitor. When the parsing result contains only addition operations, directly calculate the ciphertext corresponding to the numerical data to be queried by the homomorphically encrypted column. When the parsing result contains addition and non-addition operations, the operands are blinded using generated random numbers. The blinded operation data is then decrypted using a double trapdoor of the BCP cryptosystem to obtain the plaintext of the blinded data. The plaintext of the blinded data is then used for calculation, and the result is encrypted to obtain ciphertext with a blinding factor. Finally, the ciphertext with the blinding factor is deblinded to obtain the ciphertext corresponding to the numerical data to be queried.

2. The method as described in claim 1, characterized in that, The construction of the data entry index mapping table includes: The text data is segmented using word segmentation technology; Extract the content words that represent the information of this data entry from the data obtained by word segmentation as keywords; A data entry index mapping table is constructed using the keyword and the index of the data item containing the keyword in all items of the file.

3. A data search and query system based on searchable encryption and homomorphic encryption, employing the method described in claim 1, characterized in that: include: The voucher generation module is used to generate search vouchers for the keywords based on the keywords of the data items that the data accesser needs to obtain; The index mapping module is used to retrieve, based on the search credentials, a pre-built data entry index mapping table containing the keywords corresponding to the search credentials; The data download module is used to decrypt the data entry index mapping table to obtain the data entry index, and download the required data items based on the data entry index; The data entry index mapping table is constructed by segmenting text data using word segmentation technology and extracting keywords from the segmented words. It also includes: a numerical data query module; The numerical data query module is used to query numerical data based on the query instructions issued by the data visitor. The numerical data query module includes: The addition operation submodule is used to parse the query command issued by the data visitor. When the parsing result contains only addition operations, it directly calculates the ciphertext corresponding to the numerical data to be queried by the homomorphically encrypted column. The mixed operation submodule is used to blind the operands with generated random numbers when the parsing result contains addition and non-addition operations, and to decrypt the blinded operation data using the double trapdoor of the BCP cryptosystem to obtain the plaintext of the blinded data; to perform calculations on the plaintext of the blinded data and encrypt the calculation result to obtain ciphertext with a blinding factor; and to perform a deblinding operation on the ciphertext with the blinding factor to obtain the ciphertext corresponding to the numerical data to be queried.

4. The system as described in claim 3, characterized in that, The construction of the data entry index mapping table includes: The text data is segmented using word segmentation technology; Extract the content words that represent the information of this data entry from the data obtained by word segmentation as keywords; A data entry index mapping table is constructed using the keyword and the index of the data item containing the keyword in all items of the file.

Citation Information

Patent Citations

  • Method and device for generating indexes and retrieval method and device

    CN101739400A

  • Hybrid ciphertext retrieval method based on double trapdoors

    CN107622212A