Searchable encryption method for tag-type data, electronic device, and storage medium

Through the tower Bloom filter and the public key and private key encryption method generated by the authoritative center, the problem of high false positive rate of the standard Bloom filter is solved, and efficient and accurate data query and storage are achieved.

CN119740261BActive Publication Date: 2025-09-16SHENZHEN GENJOY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing searchable encryption mechanisms based on standard Bloom filters suffer from a high false positive rate, leading to inaccurate query results.

Method used

A tower Bloom filter structure is adopted to construct a trapdoor matrix through multi-level Bloom filters and hash functions. The public key and private key generated by the authoritative center are combined for encryption and decryption to reduce the false positive rate and improve the accuracy of the query results.

Benefits of technology

The multi-level structure of the tower bloom filter reduces the overall false positive rate, improves the accuracy of the query results, and enhances the query efficiency, supporting the storage and query of massive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740261B_ABST
    Figure CN119740261B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a searchable encryption method, electronic device and storage medium for label-type data. First, a public key and a private key are generated. The public key is used to encrypt a plaintext document to generate a ciphertext document. The label set of the plaintext document is respectively inserted into each layer of the tower bloom filter to obtain a first index. The queried label data is inserted into the first trapdoor matrix through the hash function of each layer of the tower bloom filter to obtain a second trapdoor matrix. The second trapdoor matrix is ​​matched with the first index, and the ciphertext document corresponding to the matched first index is returned. The ciphertext document is decrypted using the private key to obtain the plaintext document. Through the hierarchical structure of the tower bloom filter, the final false positive rate is the multiplication 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, thereby improving the query efficiency.
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 first decrypting it. By combining this with a Bloom filter, users can efficiently query and use data while ensuring data privacy, reducing the risk of sensitive information being leaked. Standard Bloom filter-based searchable encryption utilizes a standard Bloom filter to store and query keyword sets within encrypted data. A Bloom filter can quickly determine whether a keyword exists in a document with minimal space overhead. However, standard Bloom filters have a certain false positive rate, meaning documents that do not actually contain the keyword may be mistakenly identified as containing the keyword. While this misjudgment does not reveal the actual content, it can lead to inaccurate query results. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail in this disclosure. This overview is not intended to limit the scope of the claims.

[0004] The embodiments of the present disclosure provide a searchable encryption method for tag-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 encrypts the plaintext document using the public key 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 Pyramid Bloom filter to obtain 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 bit array size of the pyramidal Bloom filter, inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the pyramidal 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 level is a standard Bloom filter structure, and the standard Bloom filter includes the bit array and the hash function.

[0013] According to certain 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, wherein the bilinear pairing includes 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 using 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, and is expressed as

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

[0020] Wherein, 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 certain 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] Selecting a corresponding first random value for each attribute in the attribute set of the data user;

[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:

[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 the 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 based on the public key, the access policy, and the plaintext document through a formula calculation, which 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 pyramidal Bloom filter increases, the number of hash functions in each layer increases; as the number of levels of the pyramidal 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 Tall Bloom filter to obtain the first index includes:

[0039] Initialize each bit of the bit array of each layer of the pyramid Bloom filter to 0, calculate each tag in the tag set through the hash function of each layer of the pyramid 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 the hash function of each layer of the pyramid Bloom filter for 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, and obtains a first index. The searchable encryption method for tag-based data further includes:

[0043] Using the public key to asymmetric encrypt the first index to generate a second index, and sending the second index 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. If the match is successful, the next layer is entered, and the matching is performed layer by layer until a final result is output; if the match fails at any layer of the first index, the matching is terminated and the final result is output; the final result includes whether the queried label data exists or does not exist;

[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, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the searchable encryption method for tag-type data as described above.

[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: an authority center generates a public key and sends the public key to a data owner; the authority center generates a private key and sends the private key to a data user; the data owner uses the public key to encrypt a plaintext document to generate a ciphertext document, and sends the ciphertext document to a data storage server; the data owner obtains a tag set for the plaintext document, inserts the tag set into each layer of a tower Bloom filter, obtains a first index, and sends the first index to the data storage server; the data user constructs a first trapdoor matrix based on the number of levels and the size of the bit array of the tower Bloom filter, inserts the queried tag data into the first trapdoor matrix through a 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 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 decrypts the ciphertext document using the private key to obtain a 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 a Pyramid 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 query results. In most cases, it is not necessary to match the last layer of the Pyramid Bloom filter to determine that the queried label data does not exist, improving query efficiency. Furthermore, the multi-layered structure of the Pyramid Bloom filter can support the storage and query of massive amounts of data.

[0053] Other features and advantages of the present disclosure will be set forth in the description which follows, 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 a 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 to the technical solution of the present disclosure.

[0055] Figure 1 An optional flowchart 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 by an authority center provided in an embodiment of the present disclosure;

[0057] Figure 3 An optional flow chart of generating a private key by 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 flowchart 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 queried tag 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 solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to 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 intended 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 that has 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 commonly understood by those skilled in the art in the art of the present disclosure. 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 with reference to the accompanying drawings.

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

[0067] Step 101: 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.

[0068] Specifically, the Certificate Authority (CA) is responsible for key generation. The CA generates a public key and sends it to the data owner. The CA generates a private key and sends it 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 center 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 using 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] Wherein, 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 center selects a bilinear pair e:G0×G0→G1, where the bilinear pair 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 using 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, wherein 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: Select a corresponding first random value for each attribute in the attribute set of the data user.

[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, based on the master key and the attribute set of the data user, the private key is generated by calculation using 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, 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 provided in an embodiment of the present disclosure is for a data owner to use a public key to encrypt a plaintext document to generate a ciphertext document. The data owner uses a public key to encrypt a plaintext document to generate a ciphertext document, including but 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. The formula 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 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 using a formula based on the master key and the data user's attribute set. The data user's attribute set refers to a single data user. The data user's attributes are used to generate the private key, and the attributes in the access policy are used to generate the ciphertext document. When the two attributes match, the private key can decrypt the ciphertext document. This uses attributes to set access permissions for data, protecting data and improving confidentiality.

[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, obtains a first index, and sends the first index to the data storage server.

[0101] Reference Figure 7 As shown, Figure 7 The schematic diagram of the tower Bloom filter structure provided by the embodiment of the present disclosure is as follows. 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 Pyramid Bloom filter and determine the number of layers, the size of the bit array at each layer, and the number of hash functions at each layer based on the data size.

[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 includes inserting the tag set into each layer of the tower bloom filter respectively to obtain the first index, including but not limited to the following steps 501 to 503.

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

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

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

[0106] Specifically, the data owner obtains the tag set W of the plaintext document M D ={w1,w2,…,w n}, the tag set W D Insert each layer of the tower bloom filter separately to get the first index TBF D . Among them, each bit 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 based on the number of levels and bit array size of the pyramidal Bloom filter. The data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the pyramidal 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 the 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: Calculate the index value by using the hash function of each layer of the pyramid bloom filter on the queried tag data.

[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 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, and sets the position of the first trapdoor matrix corresponding to the index value to 1 to obtain 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 Pyramid Bloom filter, and obtains a first index. The searchable encryption method for tagged data further includes:

[0116] The first index is asymmetrically encrypted 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-type 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 Decrypted second index CT TBF , get the first index TBF D , the second trapdoor matrix T w With the first index TBF D Perform matching and return the first index TBF that matches D Corresponding ciphertext document CT D To data users. Using the public key to encrypt the first index strengthens data security and can 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 matched 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 is the queried label data is found 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 If the match is successful, it will go to the next layer and match 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 is passed, the final result is output as the existence of the queried label data, and the final result is the first index TBT of the queried label data. D As the first index matched, return the first index TBT D 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 non-existence of the queried label data. 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 pyramidal Bloom filter levels increases, the number of hash functions in each level increases; and as the number of pyramidal Bloom filter levels increases, the size of the bit array in each level increases.

[0128] Specifically, as the number of Pyramid Bloom filter layers increases, the number of hash functions in each layer increases, and the bit array size in each layer increases. This design allows the higher layers of the Pyramid Bloom filter to perform preliminary filtering, quickly eliminating most mismatched first indices and improving query efficiency; while the lower layers of the Pyramid 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 bit array size 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 a Pyramid 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 query results. In most cases, it is not necessary to match the last layer of the Pyramid Bloom filter to determine that the queried label data does not exist, improving query efficiency. Furthermore, the multi-layered structure of the Pyramid Bloom filter can support the storage and query of massive amounts of data.

[0130] In some embodiments, a searchable encryption method for tagged data is aimed at smart communities, 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 pair e:G0×G0→G1, where the bilinear pair 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 using 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 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 ), 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 tag set W D Insert each layer of the tower bloom filter separately to get the first index TBF D . Among them, each bit 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, and sets the position of the first trapdoor matrix corresponding to the index value to 1 to obtain 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 Decrypted second index CT TBF , get the first index TBF D , the second trapdoor matrix T w With the first index TBF D Perform matching and return the first index TBF that matches D 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 present disclosure also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the aforementioned searchable encryption method for tag-type data. The electronic device can be any intelligent terminal, such as 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," and the like (if any) in the specification of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate to describe embodiments of the present disclosure, e.g., capable of being implemented in orders 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, e.g., a process, method, system, product, or apparatus comprising a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0140] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to 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 previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items 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 exclude the number itself, and above, below, within, etc. are understood to include the number itself.

[0142] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be arbitrarily combined 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 art can also make various equivalent modifications or substitutions under the shared conditions that do not violate the spirit of the present disclosure. These equivalent modifications 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 it to the data owner; The authoritative center generates a private key and sends the private key to the data user; The data owner encrypts the plaintext document using the public key 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 Pyramid Bloom filter to obtain a first index, and sends the first index to the data storage server; The data user constructs a first trapdoor matrix based on the number of levels and the bit array size of the pyramidal Bloom filter. The data user inserts the queried tag data into the first trapdoor matrix through the hash function of each layer of the pyramidal 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 level is a standard Bloom filter structure, and the standard Bloom filter includes the bit array and the hash function; In addition, 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. If the match is successful, the next layer is entered, and the matching is performed layer by layer until a final result is output; if the match fails at any layer of the first index, the matching is terminated and the final result is output; the final result includes whether the queried label data exists or does not exist; 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.

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, wherein the bilinear pairing includes 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 using 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, which is expressed as: , Wherein, 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; Selecting a corresponding first random value for each attribute in the attribute set of the data user; 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: , , , 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 based on the public key, the access policy, and the plaintext document through a formula calculation, which is expressed as: , , , , , 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. The searchable encryption method for tag-type data according to claim 1, characterized in that: As the number of levels of the pyramidal Bloom filter increases, the number of hash functions in each level increases; and as the number of levels of the pyramidal Bloom filter increases, the size of the bit array in each level increases.

6. The 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 pyramid Bloom filter to 0, calculate each tag in the tag set through the hash function of each layer of the pyramid 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 the hash function of each layer of the pyramid Bloom filter for 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. The searchable encryption method for tag-type data according to claim 1, characterized in that: The data owner obtains a tag set of the plaintext document, inserts the tag set into each layer of the Pyramid Bloom filter, and obtains a first index. The searchable encryption method for tag-type data further includes: Using the public key to asymmetric encrypt the first index to generate a second index, and sending the second index 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. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the searchable encryption method for tag-type data according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Searchable encryption method based on Chinese in cloud environment

    CN105681280A

  • Anti-leakage ciphertext keyword Boolean query method and system

    CN118646589A