Searchable encryption method for label type data, electronic equipment and storage medium

By introducing tower-type Bloom filters and asymmetric encryption in searchable encryption, the problem of high false positive rate of standard Bloom filters is solved, query accuracy and efficiency are improved, and massive data processing is supported.

CN119740261AActive Publication Date: 2025-04-01SHENZHEN GENJOY TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411607499.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-01
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The standard Bloom filter has a false positive rate in searchable encryption, resulting in inaccurate query results.

Method used

The tower-type Bloom filter is used to reduce the overall false positive rate through a multi-level structure and enhance the confidentiality of the index through asymmetric encryption.

Benefits of technology

It improves the accuracy and query efficiency of query results, and at the same time reduces the false positive rate and supports the storage and query of massive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740261A_ABST
    Figure CN119740261A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a searchable encryption method for label type data, electronic equipment and a storage medium, firstly, a public key and a private key are generated, a plaintext document is encrypted by using the public key to generate a ciphertext document, a label set of the plaintext document is respectively inserted into each layer of a tower Bloom filter to obtain a first index, and the first index is used for encrypting the plaintext document; inserting the queried tag data into the first trap door matrix through the hash function of each layer of the tower-type bloom filter to obtain a second trap door matrix, matching the second trap door matrix with the first index, returning a ciphertext document corresponding to the matched first index, and decrypting the ciphertext document by using the private key to obtain a plaintext document. Through the hierarchical structure of the tower-type bloom filter, the final false positive rate is obtained by multiplying the false positive rate of each layer, so that the total false positive rate can be reduced, and the accuracy of a query result is improved. And in most cases, whether the queried label data exists or not can be judged without matching the last layer of the tower-type Bloom filter, so that the query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data privacy protection, and in particular to a searchable encryption method for tag-type data, an electronic device, and a storage medium. Background Art

[0002] Searchable encryption allows users to perform keyword searches on encrypted data without having to decrypt the data first. By combining Bloom Filters, users can efficiently query and use data while ensuring data privacy, reducing the risk of sensitive information being leaked. For searchable encryption mechanisms based on standard Bloom filters, this mechanism uses standard Bloom filters to store and query keyword sets for encrypted data. Bloom filters can quickly determine whether a keyword exists in a document with a small space overhead. However, standard Bloom filters have a certain false positive rate, that is, a document that does not actually contain the keyword may be mistakenly judged to contain the keyword. Although this misjudgment will not leak the real content, it will lead to inaccurate query results. Summary of the invention

[0003] The following is a summary of the subject matter of the detailed description of the present disclosure. This summary is not intended to limit the scope of the claims.

[0004] The disclosed embodiments provide a searchable encryption method for label-type data, an electronic device, and a storage medium, which can reduce the overall false positive rate, improve the accuracy of query results, and enhance query efficiency.

[0005] An embodiment of the first aspect of the present disclosure provides a searchable encryption method for tag-type data, comprising:

[0006] The authoritative center generates a public key and sends the public key to the data owner; the authoritative center generates a private key and sends the private key to the data user;

[0007] The data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, and sends the ciphertext document to the data storage server;

[0008] The data owner obtains a tag set of the plaintext document, inserts the tag set into each layer of the tower bloom filter respectively, obtains a first index, and sends the first index to the data storage server;

[0009] The data user constructs a first trapdoor matrix according to the number of levels and the size of the bit array of the pyramid Bloom filter, inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the pyramid Bloom filter to obtain a second trapdoor matrix, and sends the private key and the second trapdoor matrix to the data storage server;

[0010] After receiving the query request from the data user, the data storage server matches the second trapdoor matrix with the first index, and returns the ciphertext document corresponding to the matched first index to the data user;

[0011] The data user uses the private key to decrypt the ciphertext document to obtain the plaintext document;

[0012] The tower Bloom filter includes a plurality of levels, each of which is a standard Bloom filter structure, and the standard Bloom filter includes the bit array and the hash function.

[0013] According to some embodiments of the first aspect of the present disclosure, the authoritative center generates a public key, including:

[0014] The authoritative center selects a bilinear pairing, the bilinear pairing comprising a first cyclic group and a second cyclic group;

[0015] Randomly selecting a first generator of the first cyclic group, and constructing a first random number and a second random number through a random seed;

[0016] Using the first generator as a base and the first random number as an exponent to obtain a second generator;

[0017] Using the first generator as a base and the second random number as an exponent to obtain a third generator;

[0018] The public key is obtained according to the first cyclic group, the first generator, the second generator, and the third generator, expressed as

[0019] PK=(G0,g,g1,g2,e(g,g)),

[0020] In the formula, G0 is the first cyclic group, g is the first generator, g1 is the second generator, g2 is the third generator, and e(·,·) is the bilinear pairing.

[0021] According to some embodiments of the first aspect of the present disclosure, the authoritative center generates a private key, including:

[0022] The authoritative center obtains a master key according to the second random number and the second generator;

[0023] For each attribute in the attribute set of the data user, select a corresponding first random value;

[0024] The private key is generated by calculating the master key and the attribute set of the data user through a formula, which is expressed as follows:

[0025]

[0026] SK s =(D′,{D x} x∈S ),

[0027] Wherein, h(·) is the hash function, x is the attribute in the attribute set of the data user, g2 is the third generator, r x is the first random value, β is the second random number, g1 is the second generator, and S is the attribute set of the data user.

[0028] According to certain embodiments of the first aspect of the present disclosure, the data owner uses the public key to encrypt a plaintext document to generate a ciphertext document, including:

[0029] The data owner selects a second random value;

[0030] For each of the attributes in the access policy, select a corresponding third random value;

[0031] The data owner generates the ciphertext document by calculating the formula based on the public key, the access policy and the plaintext document. The formula is expressed as:

[0032] C=M·e(g1,g2) r ,

[0033] C′=g r ,

[0034]

[0035] CT D =(C,C′,{C x ,C′ x} x∈A ),

[0036] Wherein, M is the plaintext document, g1 is the second generator, g2 is the third generator, r is the second random value, g is the first generator, t x is the third random value, H(·) is the hash function, x is the attribute in the access policy, and A is the access policy.

[0037] According to certain embodiments of the first aspect of the present disclosure, as the number of levels of the tower Bloom filter increases, the number of hash functions in each layer increases; as the number of levels of the tower Bloom filter increases, the size of the bit array in each layer increases.

[0038] According to certain embodiments of the first aspect of the present disclosure, inserting the tag set into each layer of the tower bloom filter to obtain the first index includes:

[0039] Initialize each bit of the bit array of each layer of the tower Bloom filter to 0, calculate each tag in the tag set through the hash function of each layer of the tower Bloom filter to obtain an index value, set the bit array position corresponding to the index value to 1, and obtain the first index.

[0040] According to certain embodiments of the first aspect of the present disclosure, the data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the tower bloom filter to obtain a second trapdoor matrix, including:

[0041] Initialize each bit of the first trapdoor matrix to 0, calculate the index value by using the hash function of each layer of the tower bloom filter to obtain the queried tag data, set the position of the first trapdoor matrix corresponding to the index value to 1, and obtain the second trapdoor matrix.

[0042] According to certain embodiments of the first aspect of the present disclosure, the data owner obtains a tag set of the plaintext document, inserts the tag set into each layer of the tower bloom filter respectively, and obtains a first index. The searchable encryption method of the tag type data further includes:

[0043] The first index is asymmetrically encrypted using the public key to generate a second index, and the second index is sent to the data storage server;

[0044] After the data storage server receives the query request from the data user, the searchable encryption method for tag-type data further includes:

[0045] The second index is decrypted using the private key to obtain the first index, the second trapdoor matrix is ​​matched with the first index, and the ciphertext document corresponding to the matched first index is returned to the data user.

[0046] According to certain embodiments of the first aspect of the present disclosure, matching the second trapdoor matrix with the first index and returning the ciphertext document corresponding to the matched first index to the data user includes:

[0047] In the process of matching the second trapdoor matrix with the first index, the top layer of the first index is matched first, and if the match is successful, the next layer is entered, and the matching is performed layer by layer until the final result is output; if any layer of the first index fails to match, the matching is terminated and the final result is output; the final result includes whether the queried label data exists or not;

[0048] If the last layer of the first index is matched and the last layer of the first index matches successfully, the queried label data exists; if any layer of the first index fails to match, the queried label data does not exist;

[0049] The final result is the first index where the queried label data exists as the matched first index, and the ciphertext document corresponding to the first index is returned to the data user.

[0050] An embodiment of the second aspect of the present disclosure is an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a searchable encryption method for tag-type data as described above is implemented.

[0051] An embodiment of the third aspect of the present disclosure is a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the searchable encryption method for tag-type data as described above is implemented.

[0052] The disclosed embodiments include at least the following beneficial effects: the authority center generates a public key and sends the public key to the data owner; the authority center generates a private key and sends the private key to the data user; the data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, and sends the ciphertext document to the data storage server; the data owner obtains a tag set of the plaintext document, inserts the tag set into each layer of the tower Bloom filter respectively, obtains a first index, and sends the first index to the data storage server; the data user constructs a first trapdoor matrix according to the number of levels and the size of the bit array of the tower Bloom filter, the data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the tower Bloom filter, obtains a second trapdoor matrix, and sends the private key and the second trapdoor matrix to the data storage server; after receiving the query request of the data user, the data storage server matches the second trapdoor matrix with the first index, and returns the ciphertext document corresponding to the matched first index to the data user; the data user decrypts the ciphertext document using the private key to obtain the plaintext document; wherein, the tower Bloom filter includes multiple levels, each level is a standard Bloom filter structure, and the standard Bloom filter includes a bit array and a hash function. Through the hierarchical structure of the tower Bloom filter, the final false positive rate is the product of the false positive rates of each layer, which can reduce the overall false positive rate and improve the accuracy of the query results. In most cases, it is not necessary to match the last layer of the tower Bloom filter to determine that the queried label data does not exist, which improves the query efficiency. In addition, the multi-level structure of the tower Bloom filter can support the storage and query of massive data.

[0053] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be apparent from the description, or may be learned by practicing the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings are used to provide further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.

[0055] Figure 1 An optional flow chart of a searchable encryption method for tag-type data provided by an embodiment of the present disclosure;

[0056] Figure 2 An optional flow chart of generating a public key for an authority center provided in an embodiment of the present disclosure;

[0057] Figure 3 An optional flow chart of generating a private key for an authority center provided in an embodiment of the present disclosure;

[0058] Figure 4An optional flow chart of a data owner using a public key to encrypt a plaintext document to generate a ciphertext document provided in an embodiment of the present disclosure;

[0059] Figure 5 An optional flow chart of obtaining a first index according to a tag set of a plaintext document provided in an embodiment of the present disclosure;

[0060] Figure 6 An optional flow chart of obtaining a second trapdoor matrix according to the queried label data provided in an embodiment of the present disclosure;

[0061] Figure 7 A schematic diagram of the structure of a tower Bloom filter provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0063] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.

[0065] The embodiments of the present disclosure are further described below in conjunction with the accompanying drawings.

[0066] Reference Figure 1 As shown, Figure 1 An optional flowchart of a searchable encryption method for tag-type data provided in an embodiment of the present disclosure, the searchable encryption method for tag-type data includes but is not limited to steps 101 to 106, and each step is introduced in turn below.

[0067] Step 101: The authoritative center generates a public key and sends the public key to the data owner; the authoritative center generates a private key and sends the private key to the data user.

[0068] Specifically, the Certificate Authority (CA) is responsible for key generation. The certificate authority generates a public key and sends the public key to the data owner. The certificate authority generates a private key and sends the private key to the data user.

[0069] Reference Figure 2 As shown, Figure 2 An optional flowchart of an authoritative center generating a public key provided in an embodiment of the present disclosure, wherein the authoritative center generating a public key includes but is not limited to the following steps 201 to 204.

[0070] Step 201: The authority selects a bilinear pairing.

[0071] Step 202: randomly select a first generator of the first cyclic group, and construct a first random number and a second random number through a random seed.

[0072] Step 203: Using the first generator as a base and the first random number as an exponent to obtain a second generator, and using the first generator as a base and the second random number as an exponent to obtain a third generator.

[0073] Step 204: Obtain a public key according to the first cyclic group, the first generator, the second generator, and the third generator.

[0074] Specifically, the bilinear pairing includes the first cyclic group and the second cyclic group. The public key is obtained according to the first cyclic group, the first generator, the second generator, and the third generator, which is expressed as

[0075] PK=(G0,g,g1,g2,e(g,g)),

[0076] In the formula, G0 is the first cyclic group, g is the first generator, g1 is the second generator, g2 is the third generator, and e(·,·) is the bilinear pairing.

[0077] Specifically, the authority selects a bilinear pairing e:G0×G0→G1, where the bilinear pairing includes the first cyclic group G0 and the second cyclic group G1. The first generator g of the first cyclic group G0 is randomly selected, and the first random number α and the second random number β are constructed through the random seed λ. The first generator g is used as the base and the first random number α is used as the exponent to calculate the second generator g1, that is, g1=g α . The first generator g is used as the base and the second random number β is used as the exponent to calculate the third generator g2, that is, g2 = g β Thus, the public key PK is obtained according to the first cyclic group G0, the first generator g, the second generator g1, and the third generator g2. The public key PK = (G0, g, g1, g2, e(g, g)).

[0078] Reference Figure 3 As shown, Figure 3 An optional flowchart of an authoritative center generating a private key provided in an embodiment of the present disclosure, where the authoritative center generating a private key includes but is not limited to the following steps 301 to 303.

[0079] Step 301: The authoritative center obtains the master key according to the second random number and the second generator.

[0080] Step 302: For each attribute in the attribute set of the data user, a corresponding first random value is selected.

[0081] Step 303: Generate a private key through formula calculation based on the master key and the attribute set of the data user.

[0082] Specifically, according to the master key and the attribute set of the data user, the private key is generated by calculation through the formula, which is expressed as:

[0083]

[0084] SK s =(D′,{D x} x∈s ),

[0085] In the formula, H(·) is a hash function, x is an attribute in the attribute set of the data user, g2 is the third generator, and r x is the first random value, β is the second random number, g1 is the second generator, and S is the attribute set of the data user.

[0086] Specifically, the authority center obtains the master key MK based on the second random number β and the second generator g1. The master key MK is (β, g1). For each attribute x∈S in the attribute set S of the data user, a corresponding first random value r is selected. x , and calculate Recalculate Finally, the private key SK is calculated s =(D′,{D x} x∈s ).

[0087] Step 102: The data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, and sends the ciphertext document to the data storage server.

[0088] Reference Figure 4 As shown, Figure 4 An optional flowchart for the data owner to encrypt a plaintext document using a public key to generate a ciphertext document provided in the embodiment of the present disclosure includes but is not limited to the following steps 401 to 403.

[0089] Step 401: The data owner selects a second random value.

[0090] Step 402: For each attribute in the access policy, select a corresponding third random value.

[0091] Step 403: The data owner generates a ciphertext document through formula calculation based on the public key, access policy and plaintext document.

[0092] Specifically, the data owner generates a ciphertext document based on the public key, access policy, and plaintext document through a formula calculation, which is expressed as:

[0093] C=M·e(g1,g2) r ,

[0094] C′=g r ,

[0095]

[0096] CT D =(C,C′,{C x ,C′ x} x∈A ),

[0097] Where M is the plaintext document, g1 is the second generator, g2 is the third generator, r is the second random value, g is the first generator, and t x is the third random value, H(·) is the hash function, x is the attribute in the access policy, and A is the access policy.

[0098] Specifically, the data owner selects a second random value r and selects a corresponding third random value t for each attribute x in the access policy A. x , thus calculating C = M·e(g1,g2) for the plaintext document M r and C′=g r . Then calculate for each attribute x in access policy A and Finally, the ciphertext document CT is calculated D =(C,C′,{C x ,C′ x} x∈A ).

[0099] Specifically, a private key is generated by formula calculation based on the master key and the attribute set of the data user, where the attribute set of the data user is for a data user. The attributes of the data user are used to generate the private key, and the attributes in the access policy are used to generate the ciphertext document. When the attributes of the two correspond, the private key can decrypt the ciphertext document. This can protect the data and improve confidentiality by setting access rights for the data using attributes.

[0100] Step 103: The data owner obtains the tag set of the plaintext document, inserts the tag set into each layer of the tower bloom filter respectively, obtains the first index, and sends the first index to the data storage server.

[0101] Reference Figure 7 As shown, Figure 7 A schematic diagram of a tower Bloom filter structure provided in an embodiment of the present disclosure. Specifically, the tower Bloom filter includes multiple levels, each level is a standard Bloom filter structure, and the standard Bloom filter BT i Including bit arrays and hash functions. Initialize the tower Bloom filter, and determine the number of levels of the tower Bloom filter, the size of the bit array of each layer, and the number of hash functions of each layer according to the data scale.

[0102] Reference Figure 5 As shown, Figure 5 An optional flowchart for obtaining a first index based on a tag set of a plaintext document provided in an embodiment of the present disclosure, wherein the tag set is inserted into each layer of a tower bloom filter respectively, and obtaining the first index includes but is not limited to the following steps 501 to 503.

[0103] Step 501: Initialize each bit array of each layer of the tower bloom filter to 0.

[0104] Step 502: Calculate each tag in the tag set through the hash function of each layer of the tower bloom filter to obtain an index value.

[0105] Step 503: Set the bit array position corresponding to the index value to 1 to obtain the first index.

[0106] Specifically, the data owner obtains the label set W of the plaintext document M D ={w1,w2,…,w n}, the label set W D Insert each layer of the tower bloom filter separately to get the first index TBF D . In which, each bit array of each layer of the tower bloom filter is initialized to 0, and each label w in the label set is iThe index value is calculated by the hash function of each layer of the tower bloom filter, and the bit array position corresponding to the index value is set to 1 to obtain the first index TBF D .

[0107] Step 104: The data user constructs a first trapdoor matrix according to the number of levels and the bit array size of the tower Bloom filter. The data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the tower Bloom filter to obtain a second trapdoor matrix, and sends the private key and the second trapdoor matrix to the data storage server.

[0108] Specifically, the queried tag data may be one or more.

[0109] Reference Figure 6 As shown, Figure 6 An optional flowchart for obtaining a second trapdoor matrix based on queried label data provided in an embodiment of the present disclosure is provided. A data user inserts the queried label data into the first trapdoor matrix through the hash function of each layer of the tower bloom filter to obtain a second trapdoor matrix including but not limited to the following steps 601 to 603.

[0110] Step 601: Initialize each bit of the first trapdoor matrix to 0.

[0111] Step 602: The queried tag data is calculated through the hash function of each layer of the tower bloom filter to obtain an index value.

[0112] Step 603: Set the position of the first trapdoor matrix corresponding to the index value to 1 to obtain a second trapdoor matrix.

[0113] Specifically, the data user constructs the first trapdoor matrix according to the number of levels and the size of the bit array of the tower Bloom filter, and initializes each bit of the first trapdoor matrix to 0. The data user calculates the index value of the queried label data through the hash function of each layer of the tower Bloom filter, sets the first trapdoor matrix position corresponding to the index value to 1, and obtains the second trapdoor matrix T w .

[0114] Step 105: After receiving the query request from the data user, the data storage server matches the second trapdoor matrix with the first index, and returns the ciphertext document corresponding to the matched first index to the data user.

[0115] In some embodiments, the data owner obtains a tag set of a plaintext document, inserts the tag set into each layer of the tower bloom filter, and obtains a first index. The searchable encryption method for tag-type data further includes:

[0116] The first index is encrypted asymmetrically using a public key to generate a second index, and the second index is sent to a data storage server;

[0117] After the data storage server receives the query request from the data user, the searchable encryption method for the tag data further includes:

[0118] The second index is decrypted using the private key to obtain the first index, the second trapdoor matrix is ​​matched with the first index, and the ciphertext document corresponding to the matched first index is returned to the data user.

[0119] Specifically, the data owner obtains the label set of the plaintext document, inserts the label set into each layer of the tower bloom filter, and obtains the first index TBF D , the first index TBF D Generate the second index CT using asymmetric encryption using the public key PK TBF , the second index CT TBF After receiving the query request from the data user, the data storage server uses the private key SK s Decrypt the second index CT TBF , get the first index TBF D , the second trapdoor matrix T w With the first index TBF D Perform a match and return the first index TBF that matches D The corresponding ciphertext document CT D To the data user. Encrypting the first index with the public key can enhance data security and improve the confidentiality and security of the first index.

[0120] In some embodiments, matching the second trapdoor matrix with the first index and returning the ciphertext document corresponding to the matched first index to the data user includes:

[0121] In the process of matching the second trapdoor matrix with the first index, the top layer of the first index is matched first. If the match is successful, the next layer is entered, and the matching is performed layer by layer until the final result is output; if any layer of the first index fails to match, the matching is terminated and the final result is output; the final result includes whether the queried label data exists or not;

[0122] If the last layer of the first index is matched and the last layer of the first index matches successfully, the queried label data exists; if any layer of the first index fails to match, the queried label data does not exist;

[0123] The first index where the final result of the queried label data exists is taken as the matched first index, and the ciphertext document corresponding to the first index is returned to the data user.

[0124] Specifically, the first index is actually a tower Bloom filter. The second trapdoor matrix Tw With the first index TBT D Matching is performed, wherein the first index TBT is first matched D The top layer is matched, and if the match is successful, it enters the next layer and matches layer by layer until the first index TBT is matched. D The last layer and first index TBT D If the last layer of matching passes, the final result is output as the existence of the queried label data, and the final result is the first index TBT where the queried label data exists. D As the first matched index, return the first index TBT D The corresponding ciphertext document CT D To the data user. If in the second trapdoor matrix T w With the first index TBF D During the matching process, the first index TBF D If any layer of the matching fails, the matching ends and the final result is output as the queried label data does not exist. In most cases, it is not necessary to match the last layer of the first index to determine that the queried label data does not exist, which can improve query efficiency.

[0125] Step 106: The data user uses the private key to decrypt the ciphertext document to obtain the plaintext document.

[0126] Specifically, the data user receives the ciphertext document CT D =(C,C′,{C x ,C′ x} x∈A ), calculate the intermediate value Calculate M=C / V to obtain the plaintext document M.

[0127] In some embodiments, as the number of levels of the pyramid Bloom filter increases, the number of hash functions in each level increases; as the number of levels of the pyramid Bloom filter increases, the size of the bit array in each level increases.

[0128] Specifically, as the number of tower Bloom filter levels increases, the number of hash functions in each layer increases, and as the number of tower Bloom filter levels increases, the size of the bit array in each layer increases. Through such a design, the higher layers of the tower Bloom filter are responsible for preliminary filtering, quickly eliminating most of the unmatched first indexes, and improving query efficiency; while the lower layers of the tower Bloom filter provide more precise filtering, further reducing false positives.

[0129] It can be seen that the authoritative center generates a public key and sends the public key to the data owner; the authoritative center generates a private key and sends the private key to the data user; the data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, and sends the ciphertext document to the data storage server; the data owner obtains the label set of the plaintext document, inserts the label set into each layer of the tower Bloom filter respectively, obtains the first index, and sends the first index to the data storage server; the data user constructs a first trapdoor matrix according to the number of levels and the size of the bit array of the tower Bloom filter, and the data user inserts the queried label data into the first trapdoor matrix through the hash function of each layer of the tower Bloom filter to obtain the second trapdoor matrix, and sends the private key and the second trapdoor matrix to the data storage server; after receiving the query request from the data user, the data storage server matches the second trapdoor matrix with the first index, and returns the ciphertext document corresponding to the matched first index to the data user; the data user uses the private key to decrypt the ciphertext document to obtain the plaintext document; wherein, the tower Bloom filter includes multiple levels, each level is a standard Bloom filter structure, and the standard Bloom filter includes a bit array and a hash function. Through the hierarchical structure of the tower Bloom filter, the final false positive rate is the product of the false positive rates of each layer, which can reduce the overall false positive rate and improve the accuracy of the query results. In most cases, it is not necessary to match the last layer of the tower Bloom filter to determine that the queried label data does not exist, which improves the query efficiency. In addition, the multi-level structure of the tower Bloom filter can support the storage and query of massive data.

[0130] In some embodiments, a searchable encryption method for tagged data is provided for a smart community, wherein an authoritative center is responsible for key generation, data owners refer to community residents, data users refer to community managers, and data storage servers refer to public clouds or private clouds.

[0131] The authoritative center selects a bilinear pairing e:G0×G0→G1, where the bilinear pairing includes the first cyclic group G0 and the second cyclic group G1. The first generator g of the first cyclic group G0 is randomly selected, and the first random number α and the second random number β are constructed through the random seed λ. The first generator g is used as the base and the first random number α is used as the exponent to calculate the second generator g1, that is, g1=g α . The first generator g is used as the base and the second random number β is used as the exponent to calculate the third generator g2, that is, g2 = g β Thus, the public key PK is obtained according to the first cyclic group G0, the first generator g, the second generator g1, and the third generator g2. The public key PK = (G0, g, g1, g2, e(g, g)), and the public key PK is sent to the data owner.

[0132] The authority center obtains the master key MK based on the second random number β and the second generator g1. The master key MK is (β, g1). For each attribute x∈S in the attribute set S of the data user, a corresponding first random value r is selected. x , and calculate Recalculate Finally, the private key SK is calculated s =(D′,{D x} x∈S ), the private key SK s Sent to data users.

[0133] The data owner selects a second random value r and a corresponding third random value t for each attribute x in access policy A. x , thus calculating C = M·e(g1,g2) for the plaintext document M r and C′=g r . Then calculate for each attribute x in access policy A and Finally, the ciphertext document CT is calculated D =(C,C′,{C x ,C′ x} x∈A ), the ciphertext document CT D Sent to the data storage server.

[0134] The data owner obtains the label set W of the plaintext document M D ={w1,w2,…,w n}, the label set W D Insert each layer of the tower bloom filter separately to get the first index TBF D . In which, each bit array of each layer of the tower bloom filter is initialized to 0, and each label w in the label set is i The index value is calculated by the hash function of each layer of the tower bloom filter, and the bit array position corresponding to the index value is set to 1 to obtain the first index TBF D . Set the first index TBF D Generate the second index CT using asymmetric encryption using the public key PK TBF , the second index CT TBF Sent to the data storage server.

[0135] The data user constructs the first trapdoor matrix according to the number of levels and bit array size of the tower Bloom filter, and initializes each bit of the first trapdoor matrix to 0. The data user calculates the index value of the queried label data through the hash function of each layer of the tower Bloom filter, sets the first trapdoor matrix position corresponding to the index value to 1, and obtains the second trapdoor matrix Tw . The private key SK s and the second trapdoor matrix T w Sent to the data storage server.

[0136] After receiving the query request from the data user, the data storage server uses the private key SK s Decrypt the second index CT TBF , get the first index TBF D , the second trapdoor matrix T w With the first index TBF D Perform a match and return the first index TBF that matches D The corresponding ciphertext document CT D To the data user. The data user receives the ciphertext document CT D =(C,C′,{C x ,C′ x} x∈A ), calculate the intermediate value Calculate M=C / V to obtain the plaintext document M.

[0137] The disclosed embodiment also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned searchable encryption method for tag-type data when executing the computer program. The electronic device can be any intelligent terminal including a computer.

[0138] The embodiment of the present disclosure further provides a storage medium storing a computer program, which implements the above-mentioned searchable encryption method for tag-type data when executed by a processor.

[0139] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate to describe the embodiments of the present disclosure, such as being able to be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0140] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0141] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0142] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0143] The above is a specific description of the preferred implementation of the present disclosure, but the present disclosure is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present disclosure. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A searchable encryption method for tag-type data, characterized in that: include: The authoritative center generates a public key and sends the public key to the data owner; the authoritative center generates a private key and sends the private key to the data user; The data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, and sends the ciphertext document to the data storage server; The data owner obtains a tag set of the plaintext document, inserts the tag set into each layer of the tower bloom filter respectively, obtains a first index, and sends the first index to the data storage server; The data user constructs a first trapdoor matrix according to the number of levels and the size of the bit array of the pyramid Bloom filter, inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the pyramid Bloom filter to obtain a second trapdoor matrix, and sends the private key and the second trapdoor matrix to the data storage server; After receiving the query request from the data user, the data storage server matches the second trapdoor matrix with the first index, and returns the ciphertext document corresponding to the matched first index to the data user; The data user uses the private key to decrypt the ciphertext document to obtain the plaintext document; The tower Bloom filter includes a plurality of levels, each of which is a standard Bloom filter structure, and the standard Bloom filter includes the bit array and the hash function.

2. A searchable encryption method for tag-type data according to claim 1, characterized in that: The authoritative center generates a public key, including: The authoritative center selects a bilinear pairing, the bilinear pairing comprising a first cyclic group and a second cyclic group; Randomly selecting a first generator of the first cyclic group, and constructing a first random number and a second random number through a random seed; Using the first generator as a base and the first random number as an exponent to obtain a second generator; Using the first generator as a base and the second random number as an exponent to obtain a third generator; The public key is obtained according to the first cyclic group, the first generator, the second generator, and the third generator, expressed as PK=(G0,g,g1,g2,e(g,g)), In the formula, G0 is the first cyclic group, g is the first generator, g1 is the second generator, g2 is the third generator, and e(·,·) is the bilinear pairing.

3. A searchable encryption method for tag-type data according to claim 2, characterized in that: The authoritative center generates a private key, including: The authoritative center obtains a master key according to the second random number and the second generator; For each attribute in the attribute set of the data user, select a corresponding first random value; The private key is generated by calculating the master key and the attribute set of the data user through a formula, which is expressed as follows: SK s =(D′,{D x } x∈S ), Wherein, H(·) is the hash function, x is the attribute in the attribute set of the data user, g2 is the third generator, r x is the first random value, β is the second random number, g1 is the second generator, and S is the attribute set of the data user.

4. A searchable encryption method for tag-type data according to claim 3, characterized in that: The data owner uses the public key to encrypt the plaintext document to generate a ciphertext document, including: The data owner selects a second random value; For each of the attributes in the access policy, select a corresponding third random value; The data owner generates the ciphertext document by calculating the formula based on the public key, the access policy and the plaintext document. The formula is expressed as: C=M·e(g1,g2) r , C′=g r , CT D =(C,C′,{C x ,C′ x } x∈A ), Wherein, M is the plaintext document, g1 is the second generator, g2 is the third generator, r is the second random value, g is the first generator, t x is the third random value, H(·) is the hash function, x is the attribute in the access policy, and A is the access policy.

5. A searchable encryption method for tag-type data according to claim 1, characterized in that: As the number of levels of the pyramid Bloom filter increases, the number of hash functions in each layer increases; as the number of levels of the pyramid Bloom filter increases, the size of the bit array in each layer increases.

6. A searchable encryption method for tag-type data according to claim 1, characterized in that: Inserting the tag set into each layer of the tower bloom filter to obtain a first index includes: Initialize each bit of the bit array of each layer of the tower Bloom filter to 0, calculate each tag in the tag set through the hash function of each layer of the tower Bloom filter to obtain an index value, set the bit array position corresponding to the index value to 1, and obtain the first index.

7. A searchable encryption method for tag-type data according to claim 6, characterized in that: The data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the tower bloom filter to obtain a second trapdoor matrix, including: Initialize each bit of the first trapdoor matrix to 0, calculate the index value by using the hash function of each layer of the tower bloom filter to obtain the queried tag data, set the position of the first trapdoor matrix corresponding to the index value to 1, and obtain the second trapdoor matrix.

8. A searchable encryption method for tag-type data according to claim 1, characterized in that: The data owner obtains the tag set of the plaintext document, inserts the tag set into each layer of the tower bloom filter respectively, and obtains the first index. The searchable encryption method of the tag type data also includes: The first index is asymmetrically encrypted using the public key to generate a second index, and the second index is sent to the data storage server; After the data storage server receives the query request from the data user, the searchable encryption method for tag-type data further includes: The second index is decrypted using the private key to obtain the first index, the second trapdoor matrix is ​​matched with the first index, and the ciphertext document corresponding to the matched first index is returned to the data user.

9. A searchable encryption method for tag-type data according to claim 1, characterized in that: The matching the second trapdoor matrix with the first index and returning the ciphertext document corresponding to the matched first index to the data user includes: In the process of matching the second trapdoor matrix with the first index, the top layer of the first index is matched first, and if the match is successful, the next layer is entered, and the matching is performed layer by layer until the final result is output; if any layer of the first index fails to match, the matching is terminated and the final result is output; the final result includes whether the queried label data exists or not; If the last layer of the first index is matched and the last layer of the first index matches successfully, the queried label data exists; if any layer of the first index fails to match, the queried label data does not exist; The final result is the first index where the queried label data exists as the matched first index, and the ciphertext document corresponding to the first index is returned to the data user.

10. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the searchable encryption method for tag-type data described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Searchable encryption method based on Chinese in cloud environment

    CN105681280A

  • Anti-leakage ciphertext keyword Boolean query method and system

    CN118646589A

  • Method and apparatus for secure storage and retrieval of encrypted files in public cloud-computing platforms

    US20170372094A1

  • Multi-user ciphertext search method capable of preventing forgery

    WO2020133032A1