Block chain-based spatial text data searchable encryption system

Through a blockchain-based spatial text data searchable encryption system, combined with Blon filter and unsequence encryption technology, the problem of low spatial text data query efficiency in large-scale data is solved, and efficient and secure query and dynamic updates are achieved , supports complex query modes, improving system performance and security.

CN119128919APending Publication Date: 2024-12-13杨旸
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311759333.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art cannot efficiently and securely query the encrypted spatial text data in large-scale data processing, and the query efficiency is low and the calculation overhead is large, which cannot meet the user's complex needs for spatial text data.

Method used

Adopt a blockchain-based spatial text data searchable encryption system, combining Bloom filter, unsequence encryption technology and sliding window index to achieve efficient search and dynamic update of ciphertext data, support scope query and nearest neighbor query, and pass the zone The security of blockchain and the authorization mechanism of the alliance chain ensure data security and query flexibility.

Benefits of technology

It realizes efficient and secure query of encrypted spatial text data, reduces the risk of information leakage, improves query efficiency and system performance, and is suitable for large-scale data processing and frequent update scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128919A_ABST
    Figure CN119128919A_ABST
Patent Text Reader

Abstract

The invention discloses a spatial text data searchable encryption system based on a block chain, and relates to the technical field of big data. The spatial text data searchable encryption system based on the block chain comprises a central processing unit, and the central processing unit comprises an initialization unit used for generating a secret key, a data updating unit used for updating data and a query unit used for searching the data; the initialization unit comprises a generation module used for generating a secret key and an initialization module used for initializing a Bloom filter, and the signal output end of the generation module is connected with the signal receiving end of the initialization module; according to the technical scheme, malicious users or servers can be prevented from tampering or falsifying data, data information can be queried more quickly and more safely, more flexible search operation can be executed according to the content of encrypted data so as to meet different query requirements, updating of new data can be processed more effectively, and needed information can be obtained more quickly during query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a searchable encryption system for spatial text data based on blockchain. Background Art

[0002] With the rapid development of emerging technologies such as the Internet of Things, cloud computing, and mobile Internet, the amount of data has exploded, and the total amount of global information has reached the ZB level. Big data has become the most important resource and tool for human society, and has had a profound impact on traditional fields such as medicine and trade. However, just like hiding a tree in a forest, the useful information expected by users is often submerged in massive, irrelevant data. Therefore, how to efficiently store and analyze big data has become an urgent issue.

[0003] The rise of cloud servers provides an answer to this problem. With its powerful computing power and large storage capacity, cloud servers have become the main platform for big data applications and are widely used in government, business, and medical fields. However, the data storage method of cloud servers has brought new challenges, namely how to protect the security of data. Attackers may gain unauthorized access to cloud servers through system vulnerabilities, or malicious administrators may abuse their permissions to spy on sensitive data. In order to maintain data privacy, searchable encryption technology has emerged.

[0004] Symmetric searchable encryption is a searchable encryption technology that has attracted much attention. It allows users to perform keyword searches in the ciphertext domain without leaking relevant information about the plaintext data. SSE uses a symmetric encryption algorithm to encrypt data and store it on a cloud server. Users can make full use of the computing power of the cloud server to perform keyword searches on the ciphertext, while the server cannot obtain meaningful information. This method effectively protects user privacy and improves search efficiency. More and more data owners choose to outsource their encrypted data to cloud servers, including spatial text data.

[0005] As time goes by and technology develops, traditional keyword-based searches no longer fully meet user needs. In the query of spatial text data, users are not only concerned with the keywords themselves, but also with the results of the keywords and geographic locations. For example, users only want to know which hospital is closest to them, or which restaurants are within a few hundred meters of them. In this case, searching only by keywords cannot meet the needs of users. The server must calculate the spatial distance between encrypted data, and most searchable encryption schemes do not have the ability to calculate distances.

[0006] Therefore, efficient and secure query of encrypted spatial text data on cloud servers remains an urgent problem, which motivates us to study a blockchain-based searchable encryption system for spatial text data. Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention provides a searchable encryption system for spatial text data based on blockchain, which solves two problems existing in the existing solutions: first, some methods are not suitable for large-scale data, and second, some methods have the problems of low query efficiency and high computational overhead.

[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions: a searchable encryption system for spatial text data based on blockchain, comprising a central processor, wherein the central processor includes an initialization unit for generating a key, a data update unit for updating data, and a query unit for searching data;

[0009] The initialization unit includes a generation module for generating a key and an initialization module for initializing a Bloom filter, and the signal output end of the generation module is connected to the signal receiving end of the initialization module;

[0010] The data update unit includes a data update module for updating existing data in the database, a backup module for backing up the updated data in the cloud, and an index update module for updating the index directory. The signal output end of the data update module is connected to the signal receiving end of the backup module, and the signal output end of the backup module is connected to the signal receiving end of the index update module.

[0011] Preferably, the query unit includes a trapdoor module, a search module, a decryption and verification module, and an output module, the signal output end of the trapdoor module is connected to the signal receiving end of the search module, the signal output end of the search module is connected to the signal receiving end of the decryption and verification module, and the signal output end of the decryption and verification module is connected to the signal receiving end of the output module.

[0012] Preferably, the algorithm used in the generation module is the KeyGen algorithm, and the algorithm formula is KeyGen(λ, ε, n)→(sk AES ,sk ORE BF), where λ is the safety parameter, ε is the maximum allowed false positive rate, n is the maximum number of elements, sk AES The key used by the AES algorithm, sk oRE The key used by the ORE algorithm.

[0013] Preferably, the algorithms used in the data update unit include Enc algorithm and SWUpdate algorithm, and the formula of Enc algorithm includes Enc(DB, sk AES ,sk ORE ,BF)→EDB,QTUpdate(EDB,QT)→QT *, where EDB is the ciphertext data set, DB is the plaintext data set, and QT is the latest quadtree.

[0014] Preferably, the formula of the SWUpdate algorithm is SWUpdate(block,id)→SWNode, where block is the block and id is the block height.

[0015] Preferably, the algorithms used in the query unit include TrapGen algorithm, Search algorithm and Dec, and the formula used in the TrapGen algorithm is TrapGen(q, sk ORE , BF)→τ where τ is the trapdoor.

[0016] Preferably, the formula used in the Search algorithm is Search(τ,block,SWIndex)→res, and the formula used in the Dec algorithm is Dec(res,sk AES )→DB res , where res is the result set.

[0017] Preferably, SWIndex is used to quickly retrieve which blocks need to be accessed, and finally these blocks are queried, and the results res are returned to the querying user, and the latest records in the same coordinates are returned.

[0018] The present invention provides a searchable encryption system for spatial text data based on blockchain. Compared with the prior art, it has the following beneficial effects:

[0019] (1) This blockchain-based spatial text data can search for encryption systems, using blockchain to store encrypted data and build a secure index. After the user completes the construction of a new index node, the node can be submitted to the blockchain for on-chain. By giving full play to its tamper-proof and traceability features, malicious users or servers are prevented from tampering with or forging data. In addition, by choosing to use a consortium chain, the consortium chain can ensure that only authorized users can create new blocks and save the correct nodes to the blockchain. This provides security for the solution.

[0020] (2) The blockchain-based spatial text data searchable encryption system. Most of the existing searchable encryption schemes can only support text keyword searches, but cannot realize the search of spatial text keywords. To make up for this deficiency, this application proposes an innovative solution BSTD, which introduces a spatial text quadtree index structure that supports dynamic data updates. Compared with the traditional index structure, this new spatial quadtree can not only meet the user's needs for ciphertext search of spatial text keywords, but also allow data to be updated effectively without rebuilding the entire index. This feature is of great value for application scenarios that require frequent data updates and avoids unnecessary performance overhead. It provides an innovative solution for achieving more flexible and efficient spatial text keyword searches.

[0021] (3) This blockchain-based spatial text data searchable encryption system adopts a sequence-revealing encryption technology with left and right frames. Compared with the traditional sequence-revealing encryption method, this technology is more secure and can effectively reduce the risk of information leakage about the plaintext. By combining the application of Bloom filters, the risk of information leakage caused by attacks such as statistical analysis is successfully reduced. The organic combination of these two technologies enables this solution to achieve efficient and secure queries.

[0022] (4) This blockchain-based spatial text data searchable encryption system proposes two query modes, namely range query and neighbor query. This design enables users to perform more flexible search operations based on the content of encrypted data to meet different query requirements. This design that integrates multiple technologies not only improves query efficiency, but also ensures data security, making this solution more competitive while addressing existing challenges. In addition, BSTD introduces the concept of sliding windows. This allows users to quickly skip unmatched quadtrees when querying, thereby significantly reducing the number of comparisons of spatial ranges. Through such a design and construction, BSTD can handle the update of new data more efficiently and obtain the required information more quickly when querying, thereby improving the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a system diagram of the present invention;

[0024] Figure 2 It is a schematic diagram of the relationship between entities of the present invention;

[0025] Figure 3 It is a schematic diagram of a quadtree and a block of the present invention;

[0026] Figure 4 This is a schematic diagram of the sliding window index of the present invention;

[0027] Figure 5This is an example diagram of sliding window matching of the present invention;

[0028] Figure 6 This is an example diagram of quadtree matching of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Table 1: Symbolic variables

[0031]

[0032]

[0033] See also Figure 1-Figure 6 And Table 1, the present invention provides the following technical solutions:

[0034] ①Data Owner (DO)

[0035] DO is the individual who owns the document set containing spatial data and is responsible for generating encryption keys. DO encrypts and encodes the data using ORE and Bloom filter (BF). The encrypted data is then inserted into a quadtree to build index nodes, which are then sent to the blockchain. DO is also responsible for sharing the key with authorized query users.

[0036] ②Blockchain

[0037] The present invention uses a consortium chain, in which only authorized nodes are allowed to generate blocks or access data. In the system designed by the present invention, only DO can generate new blocks, and the rest of the entities in the system can only access data. The blockchain is responsible for receiving the quadtree and uploading it as the content of the block, that is, each block contains a quadtree. This structure makes the entire blockchain a quadtree index.

[0038] ③Cloud Server (CS)

[0039] Responsible for building the sliding window index (SWIndex) and processing query requests. CS matches the trapdoor with the SWIndex for spatial location and keywords, then accesses the relevant blocks at the corresponding height, and finally returns the results to the query user.

[0040] ④Query User (QU)

[0041] Generate a trapdoor and wait for CS to return the result, then decrypt the result using the key shared by DO.

[0042] Embodiment 1: A searchable encryption system for spatial text data based on blockchain includes a central processing unit, wherein the central processing unit includes an initialization unit for generating a key, a data updating unit for updating data, and a query unit for searching data;

[0043] The initialization unit includes a generation module for generating a key and an initialization module for initializing a Bloom filter, and a signal output end of the generation module is connected to a signal receiving end of the initialization module;

[0044] The data update unit includes a data update module for updating existing data in the database, a backup module for backing up the updated data in the cloud, and an index update module for updating the index directory. The signal output of the data update module is connected to the signal receiving end of the backup module, and the signal output end of the backup module is connected to the signal receiving end of the index update module.

[0045] The query unit includes a trapdoor module, a search module, a decryption and verification module, and an output module. The signal output end of the trapdoor module is connected to the signal receiving end of the search module, the signal output end of the search module is connected to the signal receiving end of the decryption and verification module, and the signal output end of the decryption and verification module is connected to the signal receiving end of the output module.

[0046] At the data initialization node, DO first executes the KeyGen algorithm. The algorithm formula is KeyGen(λ,ε,n)→(sk AES ,sk ORE , BF), generate keys for AES and decryption, and initialize a Bloom filter.

[0047] DO inputs the security parameter λ and uses the pseudo-random function PRF(1 λ )→(sk AES ,sk ORE ), generate the key sk for the AES algorithm and the decryption encryption algorithm AES and sk ORE DO initializes a Bloom filter by inputting the maximum allowed false positive rate ε and the maximum number of elements n. After that, DO shares the key and BF with QU through a secure channel.

[0048] In the data update phase, DO uses the Enc algorithm to encrypt the data, and then uses the QTUpdate algorithm to insert the ciphertext data into the quadtree. The specific construction of the quadtree is as follows: Figure 3 As shown, non-leaf nodes all contain attributes: the right ciphertext R of the rectangular space range t, bitmap bw, temporary coordinate axis origin o t , node hash value hash, and the deepest non-leaf node o t Empty. The root node contains additional leaf nodes num t and number id, the leaf node is a ciphertext data E i .

[0049] ·Enc(DB,sk AES ,sk ORE ,BF)→EDB. DO inputs the plaintext data set DB, and for each element DB in DB i ={m,(x,y),w}, all composed of data m, coordinates (x,y), keyword w. DO first uses the ORE algorithm to encrypt the coordinate values ​​of the data on the left ORE.EncryptL(x), ORE.EncryptL(y) and on the right ORE.EncryptR(x), ORE.EncryptR(y), and obtain the left and right ciphertexts of the coordinates ct L (x), ct L (y), ct R (x), ct R (y); add w to BF for encoding, and obtain the bitmap bw = {0 / 1} M , M is the length of the binary string of BF; use the AES algorithm to encode DB i All elements of DB are encrypted together to obtain the ciphertext c = AES.Encrypt (DB i ). Final ciphertext E i ={c,ct L (x),ct L (y),ct R (x),ct R (y),bw}. EDB={E1,E2,…,E N}, N is the total number of data.

[0050] QTUpdate(EDB,QT)→QT * DO inserts the ciphertext data set EDB into the quadtree, and finally obtains the updated quadtree. In this process, if the quadtree is full, it will be sent to the blockchain and deleted. The incomplete quadtree after the algorithm is completed will be sent to CS.

[0051] The algorithm consists of the following steps:

[0052] (1) When DO creates a quadtree, it will apply for an additional space S to store the left ciphertext of the root node space range. When inserting encrypted data E, DO first searches locally for an unfilled quadtree. If not, a new quadtree is generated: a quadtree with a height of 3 is initialized. At this time, all leaf nodes are virtual nodes; if an unfilled tree exists, E is directly inserted into the tree. The number of leaf nodes in the root node is num t =num t +1.

[0053] (2) DO visits the quadtree from the root. If the node visited is the root node or other non-leaf nodes and R t and t If it is empty, fill in the right ciphertext of the horizontal and vertical coordinates of E and insert E into the first child node; if it is not empty, use the comparison function in the ORE algorithm to calculate ORE.Compare(E.ct L (x),o t .ct R (x)) and ORE.Compare(E.ct L (y),o t .ct R (y)). According to the comparison result, determine the quadrant of the temporary coordinate axis where E is located, and insert E into the corresponding child node. If the spatial position of E is on the coordinate axis, it is considered to be in a smaller quadrant. For example, if E is on the negative half of the x-axis, it is considered to be a point in the second quadrant; if E is on the origin, it is considered to be a point in the first quadrant. Finally, update the node's bw t and R t After taking the union of the original bitmap of the node and the bitmap in the data, we get the updated For the spatial range R t ={ct R (x min ),ct R (x max ),ct R (y min ),ct R (y max )}, then four comparisons are required ORE.Compare(E.ct L (x),R t .ct R (x min )),ORE.Compare(E.ct L (x),R t .ct R (x max )),ORE.Compare(E.ct L (y),Rt .ct R (y min )),ORE.Compare(E.ct L (y),R t .ct R (y max )). If the coordinate of E is smaller than R t The minimum value or greater than R t If the access is to the root node, the left ciphertext R stored in S must also be replaced. L .

[0054] (3) When the node visited by DO is the deepest non-leaf node, check whether the node has any empty child nodes. If it is full, split the node and create four deepest non-leaf nodes as the child nodes of the node. Use the coordinates of E as the temporary coordinate axis origin of the node, and then reinsert E and the original four leaf nodes (a total of 5 ciphertext data) into the node with reference to step (2); if it is not full, directly insert the node.

[0055] (4) When E is successfully inserted, its hash is sent back to the parent node. The parent node updates its own hash and sends it to its parent node until the root node. If the quadtree is full after the insertion, the tree is sent to the blockchain, S is sent to CS, and CS uses a length of K w The circular queue stores S, and then DO deletes the tree and generates a new quadtree; when all data are updated, the incomplete quadtree will be saved locally and sent to CS to prevent missing results during the search.

[0056] When the blockchain is uploaded, CS is notified to execute the SWUpdate algorithm to generate a new sliding window index node SWnode. The index is constructed as follows: Figure 4 shown.

[0057] ·SWUpdate(block,id)→SWNode. The sliding window index is a single linked list. CS starts from the latest block height id and reads K w The data of the blocks are collected, and the data of these blocks are integrated to generate a sliding window node SWnode. Finally, the new node is inserted into the end of the linked list. The specific steps are as follows:

[0058] (1) CS starts from the latest block and obtains K w R of the root node in the block t and bw t , and the block height id. Generate K wleaf nodes, each of which stores a root node information and sets a flag that defaults to True. At this point, each leaf node can be regarded as a tree with only a root node, K w leaf nodes constitute a w of three trees.

[0059] (2) Select the first tree in the forest. If flag = false, execute (3); if flag = true, CS takes the tree (denoted as tree1) out of the forest and sets flag to false. Then CS traverses the forest again to find the tree R that matches the tree. t Another tree that intersects. If there is no tree that meets the conditions, put the tree back to the end of the forest and re-execute (2). We use Corollary 2 in Section 3.2 to determine whether two rectangular space ranges intersect.

[0060] (3) If a tree that meets the conditions is found, the tree (referred to as tree2) is taken out of the forest, a node without an id field and with a flag of false is generated, and the two trees are used as its child nodes to form a new tree, and the bw of the new tree is t =bw tree1 ∪bw tree2 . Use the left ciphertext R stored in the circular queue or temporary variable L , compare the R of the two trees t , get the minimum value of the horizontal axis ORE.Compare(tree1.R L .ct L (x min ),tree2.R t .ct R (x min )) to get the maximum value of the horizontal axis ORE.Compare(tree1.R L .ct L (x max ),tree2.R t .ct R (x max )) to get the minimum value of the vertical coordinate ORE.Compare(tree1.R L .ct L (y min ),tree2.R t .ct R (y min )) to get the maximum value of the vertical coordinate ORE.Compare(tree1.R L .ct L (y max ),tree2.R t .ctR (y max )), thereby determining the R of the new tree t At the same time, create a temporary variable to store the left ciphertext of the new tree. Re-traverse the forest to find out if there is a tree with the R of the newly generated tree. t If there is an intersection, re-execute this step; otherwise, put the new tree back to the end of the forest and re-execute (2).

[0061] (4) At this point, the forest contains several R t CS generates a root node, inserts all the trees in the forest into the root node, and uses the above method to update the root node R t and b w , complete the generation of the new node of the sliding window index. Insert the new node to the end of the index.

[0062] Before QU performs a query, it needs to execute the TrapGen algorithm to generate a trapdoor τ.

[0063] ·TrapGen(q,sk ORE ,BF)→τ. If QU wants to perform a Boolean range query, then q={R * ,w *},w * is the keyword set to be queried, R * is the query range and Output Trapdoor By R * Each element in is calculated using ORE's left encryption algorithm, bw * is the bitmap obtained after w is encoded by BF. If QU wants to perform Boolean neighbor query, then q={(x * ,y * ),w * ,d,k},(x * ,y * ) is the query coordinate, d is the range of the first query, k is the number of returned results, and the output trapdoor bw * It is the bitmap obtained after w is encoded by BF.

[0064] CS executes the Search algorithm and returns the results to QU.

[0065] Search(τ,block,SWIndex)→res. CS inputs the trapdoor τ, first retrieves the sliding window index SWIndex, and obtains the set Q to be accessed. The elements in Q are the heights of the blocks to be accessed. Query the quadtree information stored in the corresponding height block, and add the leaf nodes that meet the query conditions to the result set res. According to the requirements of QU, the query is a range query.

[0066] Range query means the server will query the range All the results that meet the query conditions are returned to the user. After receiving τ, if there is an unfilled quadtree node in CS, the server first queries the node, and then accesses the latest node of SWIndex. Accessing a SWIndex node is actually a deep traversal. For each node in the tree, the server performs two matches, first matching bw. If each position in bw* is 1, bw t If the value is 1, the match is considered successful. Then use Corollary 2 in Section 3.2 to judge With R t If they intersect, the match is successful. Only when both matches are successful, CS will continue to traverse its child nodes, such as Figure 5 As shown. CS adds the id of the leaf node that matches successfully to Q. After completing the traversal, CS skips K w The above process is repeated until the first node of SWIndex is visited and the complete Q is obtained. Next, CS reads the data of the corresponding height block in the blockchain according to the size order of the id in Q. Figure 6 As shown, for the quadtree in each block, CS performs the same traversal and matching operations. The difference is that when accessing a leaf node, CS uses Corollary 1 in Section 3.2 to determine whether the coordinates of the leaf node are in If a leaf node meets the query conditions and its coordinates appear for the first time, then the leaf node and the height id of the block it is in are added to the result set res. Finally, res is returned to the user.

[0067] QU executes Dec, decrypts the encrypted data, obtains the plaintext, and verifies whether the coordinates and keywords in the plaintext meet the query conditions.

[0068] ·Dec(res,sk AES )→DB res For each encrypted data E in res, QU uses the key sk shared by DO AES Decryption, DB i =AES.Decrypt(E)={m,(x,y),w}. QU can determine whether the data is within the query range or calculate the distance based on the coordinates in the plain text. In addition, users can also use keyword sets to further screen the returned results, because keyword sets are encoded through BF, and BF allows a certain degree of false positives. In addition, users can access the blocks of the corresponding height and use the Merkle tree to determine whether the returned data actually exists.

[0069] Embodiment 2: The technical solution of this embodiment, which is different from that of Embodiment 1, includes:

[0070] The query is a neighbor query.

[0071] Neighbor query means the user provides a coordinate (x * ,y * ) and a keyword set, the server will retrieve the k document data that contains all the keywords and is closest to the coordinate. After receiving τ, the server first performs a special range query and stops the range query in advance when res contains k elements. If the first query is terminated early, CS sends res to the user. For each encrypted data E in res, the user decrypts and calculates the distance between E and the query coordinate (rounded up) Select the farthest distance D and generate the range R for the second query * ={x * -D,x * +D,y * -D,y * +D}, execute the TrapGen algorithm, generate a new trapdoor and send it to CS. CS performs a second range query and sends R * All results within are returned to the user. After the user decrypts the query results, the distance between each data and the query coordinates is calculated. And sort them, and finally get k nearest neighbor results; if the first range query is not stopped in advance, the server directly sends the query results to the user and completes the query.

[0072] The Revealed Order Encryption (ORE) algorithm is a searchable encryption algorithm based on symmetric cryptography. ORE only allows the ciphertext to be compared with the corresponding token in their numerical order, which greatly reduces the public information. The comparison result can derive the size relationship of the corresponding plaintext, so that the encrypted data can be effectively range-queried, sorted, or threshold-filtered. In this paper, we use the most advanced ORE scheme with left / right ciphertext

[17] . Each plaintext m is encrypted into a left ciphertext ct L (m) and the right ciphertext ct R (m). For two plaintexts m1 and m2, only (ct L (m1),ct R (m2)) or (ct L (m2),ct R(m1)) Two ciphertext pairs can be compared. They are semantically secure if only the right ciphertext of the two messages is exposed to the server or the adversary. The ORE scheme with left / right ciphertext consists of 4 PPT algorithms:

[0073] ORE.Setup(1λ)→k: The user inputs the security parameter λ, and the algorithm outputs the key k.

[0074] ORE.Enc L (k,m)→ct L (m): Input key k and plaintext m, the algorithm outputs the left ciphertext ct L (m).

[0075] ORE.Enc R (k,m)→ct R (m): Input key k and plaintext m, the algorithm outputs the left ciphertext ct R (m).

[0076] ORE.Compare(ct L (m1),ct R (m2))→b: Input the left ciphertext of m1 and the right ciphertext of m2, and output the comparison result b; if m1<m2, then b=1; if m1=m2, then b=0; if m1>m2, then b=-1.

[0077] According to the sequence encryption algorithm, we can derive two inferences:

[0078] Corollary 1: A point p = (x, y) and a spatial rectangular range R = {x min ,x max ,y min ,y max}, we can compare:

[0079] b1←ORE.Compare(ct L (x),ct R (x min ))

[0080] b2←ORE.Compare(ct L (x),ct R (x max ))

[0081] b3←ORE.Compare(ct L (y),ct R (y min ))

[0082] b4←ORE.Compare(ct L (y),ctR (y max ))

[0083] Point p is within the spatial range R if and only if b1=1, b2=-1, b3=1, b4=-1 are not true.

[0084] Corollary 2: For two spatial rectangular ranges R * and R, we can compare:

[0085]

[0086]

[0087]

[0088]

[0089] The two spatial ranges intersect if and only if b1=1, b2=-1, b3=1, b4=-1 are not true.

[0090] The present invention proposes an efficient, secure, dynamically updated, dynamically searchable encryption scheme that supports spatial text queries. This scheme processes spatial positions through a de-ordering encryption algorithm and uses a Bloom filter to encode keywords. These two help us to safely insert data into a spatial quadtree and safely search for data in a quadtree. At the same time, the entire scheme is based on blockchain technology. Each tree is stored in the chain as a block. All users on the chain jointly supervise the data, eliminating the possibility of malicious third parties tampering with the data, while retaining a way for users to verify the query data. On the basis of using blockchain to link multiple spatial quadtrees, we introduced a sliding window index to integrate multiple blocks, that is, the information of multiple quadtrees. This index helps the server quickly skip blocks that do not meet the query conditions during the search process, saving a lot of time and improving search efficiency. In addition, this scheme supports two search modes, which increases the flexibility of the scheme and meets the different needs of users.

[0091] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.

[0092] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0093] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A searchable encryption system for spatial text data based on blockchain, characterized in that: include: A central processing unit, used for performing encrypted search on spatial text, generating a key through an initialization unit, updating encrypted data through a data update unit, issuing a query request through a query unit and searching the encrypted data; The data owner is used to provide keys to authorized query users. The data owner is responsible for generating encryption keys and inserting encrypted data into the quadtree to construct index nodes, and sending the constructed nodes to the blockchain; Blockchain, used to receive the quadtree and upload it to the chain; Cloud servers, used to build sliding window indexes and process query requests; Query the user, generate the trapdoor, wait for the query request to return, and use the key to decrypt the result.

2. The blockchain-based spatial text data searchable encryption system according to claim 1 is characterized by: The initialization unit includes a generation module for generating a key and an initialization module for initializing a Bloom filter, and the signal output end of the generation module is connected to the signal receiving end of the initialization module; The data update unit includes a data update module for updating existing data in the database, a backup module for backing up the updated data in the cloud, and an index update module for updating the index directory. The signal output terminal of the data update module is connected to the signal receiving terminal of the backup module, and the signal output terminal of the backup module is connected to the signal receiving terminal of the index update module. The query unit includes a trapdoor module, a search module, a decryption and verification module, and an output module. The signal output end of the trapdoor module is connected to the signal receiving end of the search module, the signal output end of the search module is connected to the signal receiving end of the decryption and verification module, and the signal output end of the decryption and verification module is connected to the signal receiving end of the output module.

3. The blockchain-based spatial text data searchable encryption system according to claim 2 is characterized in that: The algorithm used in the generation module is the KeyGen algorithm, and the algorithm formula is KeyGen(λ, ε, n)→(sk AES ,sk ORE , BF), where λ is the safety parameter, ε is the maximum allowed false positive rate, n is the maximum number of elements, sk AES The key used by the AES algorithm, sk ORE The key used by the ORE algorithm. The data owner executes the KeyGen algorithm through the generation module to generate the key for AES and decryption. Then the data owner inputs the security parameters and uses the pseudo-random function PRF (1 λ )→(sk AES ,sk ORE ), generate the key sk for the AES algorithm and the decryption encryption algorithm AES and sk ORE , and initialize a Bloom filter by inputting the maximum false positive rate and the maximum number of elements, and share the key and Bloom filter with the query user through a secure channel.

4. The blockchain-based spatial text data searchable encryption system according to claim 1 is characterized by: The algorithms used in the data update unit include Enc algorithm and SWUpdate algorithm. The formula of Enc algorithm includes Enc(DB, sk AES ,sk ORE ,BF)→EDB,QTUpdate(EDB,QT)→QT * , where EDB is the ciphertext data set, DB is the plaintext data set, QT is the latest quadtree, the data owner executes the Enc algorithm to encrypt the data through the data update module, and then uses the QTUpdate algorithm to insert the ciphertext data into the quadtree. If the quadtree is full, the quadtree is sent to the blockchain and then deleted. The incomplete quadtree after the algorithm is completed is sent to the cloud server.

5. The blockchain-based spatial text data searchable encryption system according to claim 4 is characterized in that: The formula of the SWUpdate algorithm is SWUpdate(block, id)→SWNode, where block is the block and id is the block height. After the blockchain is uploaded, the index update module notifies the cloud server to execute the SWUpdate algorithm to generate a new sliding window index node SWnode.

6. The blockchain-based spatial text data searchable encryption system according to claim 1 is characterized by: The algorithms used in the query unit include TrapGen algorithm, Search algorithm and Dec. The formula used in the TrapGen algorithm is TrapGen(q, sk ORE , BF)→τ, where τ is the trapdoor. When the query user performs the query through the query unit, the trapdoor module first executes the TrapGen algorithm to generate the trapdoor.

7. The blockchain-based spatial text data searchable encryption system according to claim 6 is characterized by: The formula used in the Search algorithm is Search(τ, block, SWIndex)→res, and the formula used in the Dec algorithm is Dec(res, sk AES )→DB res , where res is the result set. The Search algorithm is executed through the search module in the query unit to query the quadtree information stored in the corresponding height block, and the leaf nodes that meet the query conditions are added to the result set res. The query method is range query or neighbor query, and the obtained results are sent to the query user.

8. The blockchain-based spatial text data searchable encryption system according to claim 7 is characterized by: The decryption and verification module executes the Dec algorithm to decrypt the received encrypted data, obtain the plain text, and verify whether the coordinates and keywords in the text meet the query conditions. After confirmation, the query results are output through the output module.

Citation Information

Cited By

  • Data element ciphertext sorting method and device, equipment, medium and product

    CN121644091A