A static connection keyword ciphertext retrieval method and system based on XOR filter and OXT protocol
Through the statically connected keyword ciphertext retrieval method of XOR filter and OXT protocol, the problems of low retrieval efficiency and privacy leakage of traditional encryption solutions are solved, and the ability to efficiently identify fraudulent text messages in the encrypted state is realized, ensuring data security and privacy protection.
Patent Information
- Application Number
- CN202410796959.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Traditional encryption solutions are inefficient in data retrieval and may leak data confidentiality, making it difficult to identify and filter text messages or voices of fraudulent content without decryption.
Using the static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol, the ciphertext index and query verification index are constructed in the encryption state through key encryption and blind processing between the client and the server. Effective search of multiple keywords.
It improves retrieval efficiency and accuracy, ensures data security and privacy protection, avoids plain text contact, and meets the needs of telecom companies to identify fraudulent text messages.
Smart Images

Figure CN118673518B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of privacy protection and encryption technology, and in particular relates to a static connection keyword ciphertext retrieval method and system based on XOR filter and OXT protocol. Background Art
[0002] With the continuous development of information technology, information security issues have become increasingly prominent. In today's digital age, privacy protection and data security have become top priorities in the design of the Internet and information systems. In this context, encryption technology, as one of the key means of protecting data security, has been widely used in various information systems to protect the confidentiality and integrity of data.
[0003] In today's digital information age, with the rapid growth of data and the improvement of informatization, data security and privacy protection issues have become increasingly prominent. Especially in the fields of cloud computing, big data analysis, medical health, etc., the demand for data security and privacy protection is more urgent. In order to meet these needs, searchable encryption technology came into being and became one of the important means to protect data security and privacy.
[0004] Searchable encryption technology is a technology that implements data search and retrieval functions based on encrypted data. Unlike traditional encryption methods, searchable encryption technology allows users to perform keyword searches while encrypting data without decrypting the data into plaintext. This feature enables efficient data retrieval operations while protecting data privacy, providing a new solution for data security and privacy protection. However, traditional encryption schemes often bring about the problem of low retrieval efficiency while achieving security. In particular, due to the characteristics of ciphertext when retrieving encrypted data, traditional retrieval methods usually need to decrypt the ciphertext into plaintext before matching, which not only increases the computational overhead, but may also expose the confidentiality of the data.
[0005] In the current digital age, telecommunications companies are facing a growing challenge: how to effectively identify and filter text messages or voice messages containing fraudulent content without infringing customer privacy. To solve this problem, telecommunications companies decided to outsource this task to professional information processing companies. However, due to the sensitivity and confidentiality requirements of customer text messages and voice messages, information processing companies must screen and retrieve fraudulent keywords without decrypting the text messages or voice messages. However, the current screening and retrieval solutions have low retrieval efficiency, are prone to leaking customer privacy, and cannot guarantee the security of data during the retrieval process. Summary of the invention
[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a static connection keyword ciphertext retrieval method and system based on XOR filter and OXT protocol, which can effectively retrieve multiple keywords while maintaining the ciphertext form of file information, thereby improving the retrieval efficiency and accuracy, ensuring the data security of the retrieval process, and strengthening the privacy protection of customers.
[0007] According to one aspect of the present invention, the present invention provides a static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol, the method comprising the following steps:
[0008] S1: The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index;
[0009] S2: The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier;
[0010] S3: The client constructs an intermediate array to store the encrypted value of the key-value pair and fills it with an XOR filter to obtain the ciphertext index and query verification index;
[0011] S4: The client constructs a decryption key and a query token using the keyword, and sends the decryption key and the query token to the server for query;
[0012] S5: The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client;
[0013] S6: The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result.
[0014] Preferably, constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index comprises:
[0015] Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of .
[0016] Preferably, the step of blinding the encryption result in combination with the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier includes:
[0017] y=xv·z k -1
[0018]
[0019] z k =F p (K Z ,key i ||j)
[0020] Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade.
[0021] Preferably, the client constructs an intermediate array to store encrypted values of key-value pairs including:
[0022] Create intermediate arrays xitem and YMM:
[0023]
[0024] Among them, g represents the exponentiation operation, and the result is the F of xv P (K X ,key i ) power, K x is the key.
[0025] Preferably, the obtaining of the ciphertext index and the query verification index by XOR filter filling includes:
[0026] The ciphertext index EMM is:
[0027]
[0028] EMM[j]←{0,1} |C|
[0029] The query verification index XMM is:
[0030]
[0031] XMM[j]←{0,1} |C|
[0032] Where h′ and h″ are hash functions, z represents the primary position of each keyword in the index, and C represents the length of the binary ciphertext. represents the bitwise XOR operation, and t represents the identification number of three different hash functions, with values of 0, 1, and 2, corresponding to the hash function h respectively. 1 ,h 2 ,h 3 .
[0033] Preferably, the client constructs a decryption key and a query token using keywords, including:
[0034] The client uses the key K D The pseudo-random function F p Keyword key 1 Perform encryption calculations to obtain the decryption key
[0035]
[0036] The query token Xtoken is:
[0037]
[0038] η key1 =F p (K z ,key 1 ||j).
[0039] According to another aspect of the present invention, the present invention also provides a static connection keyword ciphertext retrieval system based on XOR filter and OXT protocol, the system comprising a client and a server, wherein:
[0040] The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index;
[0041] The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier.
[0042] The client constructs an intermediate array to store the encrypted value of the key-value pair, and fills it with an XOR filter to obtain the ciphertext index and query verification index;
[0043] The client constructs a decryption key and a query token using keywords, and sends the decryption key and the query token to the server for query;
[0044] The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client;
[0045] The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result.
[0046] Preferably, constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index comprises:
[0047] Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of .
[0048] Preferably, the step of blinding the encryption result in combination with the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier includes:
[0049] y=xv·z k -1
[0050]
[0051] z k =F p (K Z ,key i ||j)
[0052] Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade.
[0053] Preferably, the client constructs an intermediate array to store encrypted values of key-value pairs including:
[0054] Create intermediate arrays xitem and YMM:
[0055]
[0056]
[0057] Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key.
[0058] Beneficial effects: The static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol proposed in the present invention can not only effectively protect the confidentiality and integrity of data, but also improve the retrieval efficiency, and provide a new solution for the secure storage and retrieval of encrypted data. It enables telecommunications companies to effectively identify and block fraudulent text messages without accessing plain text text messages, thereby protecting customers from fraud, while also ensuring the compliance and security of the information processing process.
[0059] The features and advantages of the present invention will become clear through reference to the following drawings and detailed description of specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flow chart of a static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol;
[0061] Figure 2 It is a schematic diagram of the construction of the ciphertext index EMM;
[0062] Figure 3 It is a schematic diagram of the query verification index XMM construction;
[0063] Figure 4 It is a schematic diagram of the flow chart of the query phase;
[0064] Figure 5 It is a schematic diagram of a statically connected keyword ciphertext retrieval system based on XOR filter and OXT protocol. DETAILED DESCRIPTION
[0065] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings 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.
[0066] Example 1
[0067] Figure 1 This is a flow chart of a static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol. Figure 1 As shown, this embodiment provides a static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol, and the method includes the following steps:
[0068] S1: The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index.
[0069] Preferably, constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index comprises:
[0070] Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of .
[0071] Specifically, the professional terms involved in this embodiment are as follows:
[0072] OXT (Oblivious Cross-Tags): This protocol is a security protocol based on searchable encryption technology, which aims to achieve privacy-preserving data query across tags. The core principle of this protocol is to allow users to effectively query encrypted data without exposing its content or identification information, while protecting user privacy.
[0073] XOR: Exclusive OR operation is a basic logical operator, commonly used in information and data processing. The definition is as follows: for two input bits, if the two are different, the output result is 1; if the two are the same, the output result is 0. The XOR operation can also be extended to the case of multiple input bits, and its result satisfies the following property: the output result is 1 if and only if an odd number of bits in the input bits are 1; otherwise, the output result is 0.
[0074] XOR Filter Algorithm: An efficient data structure used to quickly determine whether an element belongs to a set. The core idea of the algorithm is to use the exclusive OR operation (XOR) in bit operations to build a data filter. It hashes the elements through multiple hash functions, then performs an XOR operation on the bits of the mapping results, and stores the results in a bit array. When it is necessary to query whether an element exists, the algorithm calculates the position in the bit array based on the same hash function, and then performs an XOR operation on the values of the corresponding positions of multiple hash functions to restore the result.
[0075] Volume-hiding: is a privacy protection technique that aims to protect sensitive information from unauthorized access by hiding or obscuring the data volumes in the storage medium. This technique usually involves modifying or manipulating the storage medium to physically or logically hide the existence of the data volumes.
[0076] SKS Protocol: is an encryption technology designed to allow data owners to encrypt and store their data on cloud servers, while allowing users to perform single-keyword searches in encrypted data sets without revealing the plaintext content of the data.
[0077] Pseudo-random function: A pseudo-random function is a function that applies randomness to input data. It takes a key and an input and generates a pseudo-random output. A pseudo-random function generally has the following properties: given the same key and input, it generates the same output. For different keys and inputs, the output should appear random and unpredictable.
[0078] The client, that is, the data owner, sets the key K, K d ,K Z ,K X ,KH ←{0,1} λ , λ represents the length of the {0, 1} ciphertext. These key values are used to encrypt sensitive keywords in the document to achieve privacy protection. To improve search efficiency, the client first extracts all keywords contained in each file and constructs a key-value pair tuple for each keyword and each file identifier containing it.
[0079] Based on the key-value pair tuples in the above steps, the client creates an array named MM as a plaintext index. Each position of this array contains a key-value pair: The key i Represents the i-th sensitive keyword, vector Indicates that it contains the keyword key i The jth file identifier of , where i ranges from 1 to m, m represents the total number of search keywords in the file collection, and the total number of all key-value pairs contained in MM is d. The MM array is constructed to facilitate the creation of another array called ciphertext index EMM. Once the ciphertext index EMM is constructed, all the encrypted values of the key-value pairs stored in it can be calculated on the server side.
[0080] S2: The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier.
[0081] Preferably, the step of blinding the encryption result in combination with the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier includes:
[0082] y=xv·z k -1
[0083]
[0084] z k =F p (K Z ,key i ||j)
[0085] Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade.
[0086] Specifically, the client calculates the keyword trapdoor using the private key K I The pseudo-random function F p File Identifier Perform encryption calculation and assign the calculated ciphertext to xv. At the same time, assign the keyword key i After cascading with the corresponding file identifier j, use the private key K z The pseudo-random function F p Perform encryption calculation and assign the calculated ciphertext to the blind factor z k This step calculates each keyword and all corresponding file identifiers one by one. After the file identifier of each keyword is calculated, it proceeds to the next keyword, and the operation is repeated until the trapdoor calculation is completed for all keywords and file identifiers.
[0087] The client uses the blinding factor z obtained in the above steps k The blind operation is performed with xv, and the result is assigned to the blind value y. The key is K d Encryption algorithm Enc for file identifier Encryption is performed to obtain the ciphertext e. The ciphertext e represents the encrypted value of the file identifier corresponding to the keyword.
[0088] S3: The client constructs an intermediate array to store the encrypted value of the key-value pair and fills it with an XOR filter to obtain the ciphertext index and query verification index;
[0089] Preferably, the client constructs an intermediate array to store encrypted values of key-value pairs including:
[0090] Create intermediate arrays xitem and YMM:
[0091]
[0092] Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key.
[0093] Specifically, the entire connection keyword ciphertext retrieval is divided into two stages. The first stage is to perform a single keyword ciphertext search to find all the file identifier ciphertexts containing the keyword with the lowest frequency. In the second stage, these file identifiers are screened one by one to see if they still contain all the remaining query keywords, so as to finally obtain the connection keyword ciphertext retrieval results. In order to support the server to implement the above two-stage retrieval without decryption, the client first constructs two intermediate arrays YMM and xitem based on MM to store the encrypted values of key-value pairs, and then fills them into the target ciphertext index EMM and the query verification index XMM through the XOR filter algorithm. The XOR filter algorithm is used to ensure that the number of retrieval results is hidden during the retrieval process, further avoiding privacy issues caused by the leakage of the number of retrieval results. The client calculates each keyword and all corresponding file identifiers one by one. After the file identifier calculation of each keyword is completed, it enters the next keyword, and the operation is repeated until all keywords and file identifiers complete the trapdoor calculation.
[0094] The client uses the obtained blinding factor z k and xv to perform blinding operations, and the result will be assigned to the blind value y. Then use the private key K X The pseudo-random function F p Keyword key i Perform encryption calculation, perform blind exponentiation operation on the result and xv, and finally assign the result to the two-dimensional array xitem[i][j].
[0095] The client will obtain the ciphertext e and blind value y and the key-value pair Combine to form a tuple and assign the tuple to the YMM array. YMM is now a one-dimensional array, with each position storing This tuple includes the key-value pair itself and the corresponding file identifier ciphertext e and blind value y.
[0096] Preferably, the obtaining of the ciphertext index and the query verification index by XOR filter filling includes:
[0097] The ciphertext index EMM is:
[0098]
[0099] EMM[j]←{0,1} |C|
[0100] The query verification index XMM is:
[0101]
[0102] XMM[j]←{0,1} |C|
[0103] Where h′ and h″ are hash functions, z represents the primary position of each keyword in the index, and C represents the length of the binary ciphertext. represents the bitwise XOR operation, and t represents the identification number of three different hash functions, with values of 0, 1, and 2, corresponding to the hash function h respectively. 1 ,h 2 ,h 3 .
[0104] Specifically, see Figure 2 , the client starts to build the ciphertext index EMM, inserts YMM into the ciphertext index EMM through the XOR filter algorithm, and then performs ciphertext search of the keyword with the lowest frequency in the search file to hide the number of search results. The specific implementation steps are as follows:
[0105] First, a pre-filling step is performed to construct a temporary one-dimensional array B, which is composed of three segments of the same size. To perform the search, three different hash functions (h 1 、h 2 、h 3 ) maps the element to a position within each segment, i.e., for h 1 , it will be mapped in segment 1, for h 2 , it will be mapped in segment 2, and so on. In the ciphertext filling of this step, three different hash function calculation operations are performed for each cascade of keywords and corresponding file identifiers, and the (e, y) values corresponding to each keyword calculated in step S5 are placed in the corresponding three different positions in array B, that is, Repeat the operation until all key-value pairs are executed. At this time, the t in the three hash functions concatenated with the keyword and the corresponding file identifier represents the distinguishing number of the three different hash functions, and the values are 0, 1, and 2 corresponding to h 1 ,h 2 ,h 3 , the t that appears in the subsequent steps all represents this meaning.
[0106]
[0107] In order to determine the main position z of each keyword in the ciphertext index EMM, a Stack is constructed. When constructing the Stack, select the value e that contains only one element in the same position in the three segments from the B array and insert it into the Stack. The position corresponding to this element is the main position z of the key-value pair. Then delete all positions of the element in the three segments in the B array, and then continue to look for the next tuple of the key-value pair. Repeat the above insertion operation, and continuously insert elements into the Stack from top to bottom until all elements in array B are deleted.
[0108] Stack=(e,z)
[0109] The client fills the ciphertext index EMM according to the insertion order in the Stack. The three hash operation values are XORed and assigned to the position of EMM[z]. The first of the three values included in the XOR operation is the value (e, y) corresponding to the main position, and the other two are the values corresponding to the positions of two different hash functions h′ and h″ outside the main position in the ciphertext index EMM (when the main position value is h 1 When calculated, h′ and h″ represent h 2 and h 3 ; When the main value is h 2 When calculated, h′ and h″ represent h 1 and h 3 , and so on). When performing an XOR operation, if the other two position values in the ciphertext index EMM except the main position value are empty, first randomly encrypt the empty value with the ciphertext {0,1} |c| After all keywords are filled, the position j that is still unencrypted in the ciphertext index EMM is filled with random encrypted ciphertext, {0,1} |c| The C in it represents the length of the 0 and 1 binary ciphertext.
[0110]
[0111] EMM[j]←{0,1} |c|
[0112] The client starts to build the query verification index XMM, and constructs it with the calculated xitem[i][j], so as to realize the second stage of the connection keyword search. After XMM is filled, the number of search results can be hidden as in the first stage. For t = [0,1,2], xitem[i][j]||t is operated with three different hash functions, and the three results are assigned to pos. pos represents the position in the temporary array Q. Each time the hash function is calculated, the corresponding position of the Q array is filled with ciphertext. The filled ciphertext is the key-value pair cascade file identifier followed by the key K H Hash operation For the above operation, a loop operation is performed when i does not exceed the total number of keywords m and j is within the range of 1 to the maximum keyword frequency l.
[0113] pos=h 1 (xitem[i][j]||t)
[0114] pos=h 2 (xitem[i][j]||t)
[0115] pos=h 3 (xitem[i][j]||t)
[0116]
[0117] See also Figure 3 , for the ciphertext that needs to be padded in XMM, a stack is constructed to determine the main position z: Hash is keyed by K H A hash function, different from the previous h 1 ,h 2 ,h 3 , is used to encrypt the concatenation of the keyword and the corresponding file identifier in XMM. Then the three hash operation values are XORed and assigned to the position of XMM[z]. The first of the three values included in the XOR operation is the ciphertext corresponding to the main position z. The other two are to calculate the values of two different hash functions h′ and h″ outside the main position in the query verification index XMM (when the main position value is h 1 When calculated, h′ and h′′ represent h 2 and h 3 ; When the main value is h 2 When calculated, h′ and h″ represent h 1 and h 3 , and so on). When performing an XOR operation, if the other two position values in the query verification index XMM except the main position value are empty, first randomly encrypt the empty value with the ciphertext {0,1}|C| After all keywords are filled, the unencrypted empty position j in the query verification index XMM is filled with random encrypted ciphertext.
[0118]
[0119] XMM[j]←{0,1} |C|
[0120] The client merges the keys K,K d ,K Z ,K X ,K H K T . At the same time, merge the ciphertext index EMM and the query verification index XMM arrays to construct the EXMM joint array. Return K T to the client, EXMM to the server.
[0121] S4: The client constructs a decryption key and a query token using the keyword, and sends the decryption key and the query token to the server for query;
[0122] Preferably, the client constructs a decryption key and a query token using keywords, including:
[0123] The client uses the key K D The pseudo-random function F p Keyword key 1 Perform encryption calculations to obtain the decryption key
[0124]
[0125] The query token Xtoken is:
[0126]
[0127] η key =F p (K Z ,key 1 ||j).
[0128] Specifically, the client initiates a key query through the preset SKS security protocol. 1 After the retrieval is completed, the key 1 Constructing a key And query token Xtoken, specifically:
[0129] The client first returns the total key K returned in the initialization step T Decompose into K,K d ,K Z,K X ,K H Then connect the keyword search requirement key 1 ∧key 2 ∧key 3 ∧...∧key s Decompose into keys 1 ,key 2 ,...,key s Finally, the key K is decomposed into K E ,K D Two separate keys.
[0130] K e ,K D ←K
[0131] The client detects the keyword key with the lowest frequency in the search file through the SKS protocol. 1 .
[0132] The client uses the key K D The pseudo-random function F p Keyword key 1 Perform encryption calculations and assign the calculation results to the key This step is for the subsequent server to use the key Perform position decryption to obtain the key in the ciphertext index EMM.
[0133]
[0134] The client initializes the query token Xtoken, which is a two-dimensional array used for subsequent keyword detection.
[0135] When j is in the range of 1 to the maximum frequency of the keyword l, in order to hide the number of search results, the client concatenates all subscripts from 1 to l with the keyword with the lowest frequency, thereby achieving the effect of hiding the number of search results. Z The pseudo-random function F p Right 1 ||j) performs encryption calculation and assigns it to η key1 .
[0136] η key1 =F p (K Z ,key 1 ||j)
[0137] When k is in the range of 2 to s, the client calculates This encrypted value, and according to the j in the above step and the k value of this step, the encrypted value Assign to the corresponding position of the query token Xtoken[j][k]. At this time, there are (s-1)*l query conditions in the entire query token Xtoken.
[0138]
[0139] Client sends And query token Xtoken to the server.
[0140] S5: The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client;
[0141] Specifically, the server-side array Initialize, Used to store the value at the ciphertext index EMM position. Used to store the encrypted file identifier after query; K T Decompose into K,K d ,K Z ,K X ,K H ; EXMM is decomposed into ciphertext index EMM and query verification index XMM; decomposed query keyword subscript is key 1 ,key 2 ,...,key s .
[0142] The server constructs the XORF verification filter and initializes it, and then uses the keyword verification link of the client.
[0143] When the file identifier j is in the range from 1 to the maximum keyword frequency l and t = [0,1,2], the key Combine j||t to calculate the key in the ciphertext index EMM 1 The three positions corresponding to the ciphertext.
[0144]
[0145] The server will and The three different hash function values are XORed and output to at this time The key is stored in 1 The value at the corresponding position in the ciphertext index EMM, that is, (e, y).
[0146] When the file identifier j is within the range of the keyword maximum frequency l, The value of the position is assigned to (e,y), and e is assigned to
[0147] When k is in the range of 2 to s and t′ = [0, 1, 2], combined with xv, z in step S4 of the initialization retrieval structure stage k and y in step S11 of the query phase to calculate Xtoken[j][k] y And assign it to xflap. At this time, y is the value xv·z composed of the file identifier corresponding to the keyword key1 k and XOR the three hash values of XMM[h(xflap||t′)] and assign them to pos t′ At this time, pos t′ Contains the key 2 to key s All keywords are cascaded to the keyword key 1 Hash value corresponding to the file identifier
[0148] The server assigns 1 to the three hashed positions in XORF[H 1 (XMM[pos t′ ])],XORF[H 2 (XMM[pos t′ ])],XORF[H 3 (XMM[pos t′ ])], the three hash functions H at this time 1 , H 2 , H 3 The server side calculates the position in XORF. It is different from the hash function in the ciphertext index EMM and the query verification index XMM, and is distinguished by uppercase. t′ , for XORF[pos t′ ] position is assigned a value of 1 so that the file identifier in the query verification index XMM and the query token Xtoken can be verified later.
[0149] XORF[H 1 (XMM[pos t′ ])]=1
[0150] XORF[H 2 (XMM[pos t′ ])]=1
[0151] XORF[H 3 (XMM[pos t′ ])]=1
[0152] transmission To the client for final local decryption operation.
[0153] S6: The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result.
[0154] Specifically, the client obtains the final query result through the XORF verification filter, and the client puts K T Decompose into K,K d ,K Z ,K X ,K H ; Decompose the query keyword subscript as key 1 ,key 2 ,...,key s ; Create and initialize MR key Two one-dimensional arrays are used to store query results.
[0155] Client Decrypt the real key 1 The file identifier is assigned to
[0156] For the existence In the file identifier val, first assume that these file identifiers meet the final search results, set the judgment identifier tmp to true, and when k is in the range of 2 to s and q = [1,2,3], the client loops to calculate (K H ,key k ||val) and assign it to xkv. At this time, xkv stores the hash value from key 2 to key s The cascade contains key 1 The hash values of all file identifiers. If the three hash functions H in XORF q (xkv) A value not equal to 1 appears at the corresponding position, indicating that the keyword does not exist in the file identifier cascaded at this time. The tmp of the file identifier is assigned a value of false, and the loop is exited.
[0157] If the loop ends and the file identifier tmp is true, it means that the file is verified correctly, and the file identifier is assigned to MR key , at this time MR key Stored in is the identifier of all files that meet the requirements.
[0158] Returns array MR key All values in and all file identifiers that satisfy the query complete the retrieval of statically connected keywords.
[0159] This method can effectively retrieve multiple keywords while keeping the file information in ciphertext form, improving the retrieval efficiency and accuracy, ensuring the data security during the retrieval process, and strengthening the privacy protection of customers.
[0160] To describe the technical solution of this embodiment more clearly, the following gives a specific implementation manner of query keywords.
[0161] For the multi-keyword ciphertext retrieval of fraud text messages, the keywords for this retrieval are: playing cards, bank card, transfer, amount, consumption. The total number of files is 12, and the corresponding relationship between the keywords and the files is as follows:
[0162]
[0163]
[0164] See Figure 4 the flowchart of the query phase shown, and the specific steps include:
[0165] 1. First, the client decomposes the total key K returned in the initialization step T into K, K d , K z , K X , K H . Then, decompose the requirement of connecting keyword retrieval, playing cards ∧ bank card ∧ transfer ∧ amount ∧ consumption, into playing cards, bank card, transfer, amount, consumption. Finally, decompose the key K into K E , K D two independent keys.
[0166] K e , K D ← K
[0167] 2. The client detects the keyword playing cards with the lowest frequency of occurrence in the retrieved files through the SKS protocol.
[0168] 3. The client uses the pseudo-random function F D with the key K p to perform encryption calculation on the keyword playing cards, and assigns the calculation result to the key tok 炸金花 . This step is for the subsequent server-side to perform position decryption with the key tok 炸金花 to obtain the key in the ciphertext index EMM.
[0169] tok 炸金花 = F p (K D , playing cards)
[0170] 4. The client initializes the query token Xtoken, where Xtoken is a two-dimensional array of keywords used for subsequent detection.
[0171] 5. When j is within the range of 1 to the maximum keyword frequency of 12, to hide the number of retrieval results, the client concatenates all subscripts from 1 to 12 with the keyword having the lowest occurrence frequency, thus achieving the effect of hiding the number of retrieval results. Then the client uses the pseudo-random function F Z with the key K p to encrypt and calculate (Zha Jin Hua || j) and assigns the result to η 炸金花 .
[0172] η 炸金花 = F p (K Z , Zha Jin Hua || j)
[0173] 6. When k belongs to the range of 2 to 5, the client calculates this encrypted value and assigns the encrypted value to the corresponding position of the query token Xtoken[j][k] according to the j value in step S5 and the k value in this step. At this time, there are (5 - 1) * 12 query conditions in the entire query token Xtoken.
[0174]
[0175] 7. The client sends tok 炸金花 and the query token Xtoken to the server. The server initializes the arrays EY 炸金花 , CV 炸金花 . EY 炸金花 is used to store the value at the position of the ciphertext index EMM, and CV 炸金花 is used to store the encrypted file identifier after query; K T is decomposed into K, K d , K Z , K X , K H ; EXMM is decomposed into the ciphertext index EMM and the query verification index XMM; the query keyword subscripts are decomposed into Zha Jin Hua, bank card, transfer, amount, consumption.
[0176] 8. The server constructs an XORF verification filter and initializes it for the subsequent keyword verification process of the client.
[0177] 9. When the file identifier j is within the range of 1 to the maximum keyword frequency of 12 and t = [0, 1, 2], through the key tok 炸金花 , calculate the three positions of the ciphertext corresponding to Zha Jin Hua in the ciphertext index EMM by combining j || t.
[0178]
[0179] 10. The server-side XORs the values of three different hash functions and outputs the result to EY and . At this time, what is stored in EY 炸金花 is the value corresponding to the position of the card game in the ciphertext index EMM, namely (e, y). 炸金花 炸金花
[0180] 11. When the file identifier j is within the range of the maximum frequency 12 of the keyword, assign the value at the position EY 炸金花 [j] to (e, y), and assign e to CV 炸金花 .
[0181] 12. When k is within the range of 2 to s and t' = [0, 1, 2], combine xv, z k from step S4 of the initialization retrieval structure stage and y from step 11 of the query stage to calculate Xtoken[j][k] y and assign it to xflap. At this time, y is the value formed by the file identifier corresponding to the keyword of the card game, xv·z k and XOR the three hash values of XMM[h(xflap||t')] and assign the result to pos t′ . At this time, what pos t′ contains is the hash value of the concatenation of all keywords from the bank card to the consumption with the file identifier corresponding to the keyword of the card game
[0182] 13. The server-side assigns 1 to the positions obtained by the three hash operations in XORF, XORF[H 1 (XMM[pos t′ )], XORF[H 2 (XMM[pos t′ )], XORF[H 3 (XMM[pos t′ )]. At this time, the three hash functions H 1 , H 2 , H 3 are used by the server-side for position calculation in XORF, which are different from the hash functions in the ciphertext index EMM and the query verification index XMM, and are distinguished by being in uppercase. According to the pos t′ calculated in the previous step, for XORF[pos t′] position is assigned a value of 1 so that the file identifier in the query verification index XMM and the query token Xtoken can be verified later.
[0183] XORF[H 1 (XMM[pos t′ ])]=1
[0184] XORF[H 2 (XMM[pos t′ ])]=1
[0185] XORF[H 3 (XMM[pos t′ ])]=1
[0186] 14. Transfer CV 炸金花 ,XORF,H q (q=[1,2,3]) to the client for the final local decryption operation.
[0187] 15. The client puts K T Decompose into K,K d ,K Z ,K X ,K H ; Decompose the query keywords into poker, bank card, transfer, amount, consumption; create and initialize R 炸金花 ,MR key Two one-dimensional arrays are used to store query results.
[0188] 16. Client CV 炸金花 Decrypt and assign the file identifier of the real poker to R 炸金花 .
[0189] 17 For the existence of R 炸金花 In the file identifier val, first assume that these file identifiers meet the final search results, set the judgment identifier tmp to true, when k is in the range of 2 to 5 and q = [1,2,3], the client loops to calculate (K H ,key k ||val) and assign it to xkv. At this time, xkv stores the hash values of all file identifiers from the bank card to the consumption cascade, including the golden flower. If the three hash functions H in XORF q (xkv) A value not equal to 1 appears at the corresponding position, indicating that the keyword does not exist in the file identifier cascaded at this time. The tmp of the file identifier is assigned a value of false, and the loop is exited.
[0190] 18 If the loop ends and the file identifier tmp is true, it means that the file verification is correct, and the file identifier is assigned to MR key , at this time MR key Stored in is the identifier of all files that meet the requirements.
[0191] 19 Return array MR key All values in and all file identifiers that satisfy the query 3, 7.
[0192] 20. The process ends and the retrieval of static connection keywords is completed.
[0193] The static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol proposed in this embodiment can not only effectively protect the confidentiality and integrity of data, but also improve the retrieval efficiency, and provide a new solution for the secure storage and retrieval of encrypted data. It enables telecommunications companies to effectively identify and block fraudulent text messages without accessing plain text text messages, thereby protecting customers from fraud, while also ensuring the compliance and security of the information processing process.
[0194] Example 2
[0195] Figure 5 This is a schematic diagram of a statically connected keyword ciphertext retrieval system based on XOR filter and OXT protocol. Figure 5 As shown, this embodiment provides a static connection keyword ciphertext retrieval system based on XOR filter and OXT protocol, the system includes a client and a server, wherein:
[0196] The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index;
[0197] The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier.
[0198] The client constructs an intermediate array to store the encrypted value of the key-value pair, and fills it with an XOR filter to obtain the ciphertext index and query verification index;
[0199] The client constructs a decryption key and a query token using keywords, and sends the decryption key and the query token to the server for query;
[0200] The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client;
[0201] The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result.
[0202] Preferably, constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index comprises:
[0203] Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of .
[0204] Preferably, the step of blinding the encryption result in combination with the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier includes:
[0205] y=xv·z k -1
[0206]
[0207] z k =F p (K Z ,key i ||j)
[0208] Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade.
[0209] Preferably, the client constructs an intermediate array to store encrypted values of key-value pairs including:
[0210] Create intermediate arrays xitem and YMM:
[0211]
[0212] Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key.
[0213] The specific implementation process of the functions realized by the client and the server in this embodiment 2 is the same as the implementation process in embodiment 1, and will not be repeated here.
[0214] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A static connection keyword ciphertext retrieval method based on XOR filter and OXT protocol, characterized in that: The method comprises the following steps: S1: The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index; S2: The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier; S3: The client constructs an intermediate array to store the encrypted value of the key-value pair and fills it with an XOR filter to obtain the ciphertext index and query verification index; S4: The client constructs a decryption key and a query token using the keyword, and sends the decryption key and the query token to the server for query; S5: The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client; S6: The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result; the step of constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index includes: Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of the j-th file identifier; the encryption result is blinded by combining the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier, including: y=xv·z k -1 z k =F p (K Z ,key i ||j) Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade; the client constructs an intermediate array to store the encrypted values of the key-value pairs including: Create intermediate arrays xitem and YMM: Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key; the ciphertext index and the query verification index obtained by XOR filter filling include: The ciphertext index EMM is: EMM[j]←{0,1} |C| The query verification index XMM is: XMM[j]←{0,1} |C| Among them, h′ and h′′ are hash functions, z represents the main position of each keyword in the index, and C represents the length of the binary ciphertext. Represents a bitwise XOR operation, and t represents the distinguishing number of three different hash functions, with values of 0, 1, and 2, corresponding to hash functions h1, h2, and h3 respectively.
2. The method according to claim 1, characterized in that: The client constructs a decryption key and a query token using keywords, including: The client uses the key K D The pseudo-random function F p Encrypt the keyword key1 and get the decryption key The query token Xtoken is: η key1 =F p (K Z ,key1||j).
3. A static connection keyword ciphertext retrieval system based on XOR filter and OXT protocol, characterized in that: The system comprises a client and a server, wherein: The client sets the key and extracts all keywords from each file, constructs a key-value pair tuple for each keyword and its corresponding file identifier, and creates a plaintext index; The client encrypts the file identifier and keyword using the set key, and blinds the encryption result using the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier. The client constructs an intermediate array to store the encrypted value of the key-value pair, and fills it with an XOR filter to obtain the ciphertext index and query verification index; The client constructs a decryption key and a query token using keywords, and sends the decryption key and the query token to the server for query; The server uses the constructed ciphertext index and the query verification index to perform query and verification processing, and returns the query result to the client; The client decrypts the ciphertext of the file identifier returned by the server to obtain the final query result; the step of constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index includes: Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of the j-th file identifier; the encryption result is blinded by combining the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier, including: y=xv·z k -1 z k =F p (K Z ,key i ||j) Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade; the client constructs an intermediate array to store the encrypted values of the key-value pairs including: Create intermediate arrays xitem and YMM: Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key; the ciphertext index and the query verification index obtained by XOR filter filling include: The ciphertext index EMM is: EMM[j]←{0,1} |C| The query verification index XMM is: XMM[j]←{0,1} |C| Where h′ and h″ are hash functions, z represents the primary position of each keyword in the index, and C represents the length of the binary ciphertext. Represents a bitwise XOR operation, and t represents the distinguishing number of three different hash functions, with values of 0, 1, and 2, corresponding to hash functions h1, h2, and h3 respectively.
4. The system according to claim 3, characterized in that The step of constructing a key-value pair tuple for each keyword and its corresponding file identifier and creating a plaintext index comprises: Create an array MM as a plaintext index, where each position of the array contains a key-value pair: The key i Represents the i-th keyword, vector Indicates that it contains the keyword key i The j-th file identifier of .
5. The system according to claim 4, characterized in that The encryption result is blinded by combining the blinding factor to obtain the blind value of the file identifier and the ciphertext of the file identifier, including: y=xv·z k -1 z k =F p (K Z ,key i ||j) Among them, Enc is the encryption algorithm, K d , K I , K Z is the key, F p is a pseudo-random function, and || represents a cascade.
6. The system according to claim 5, characterized in that The client constructs an intermediate array to store the encrypted values of the key-value pairs including: Create intermediate arrays xitem and YMM: Among them, g represents the exponentiation operation, and the result is the F of xv p (K X ,key i ) power, K X is the key.
Citation Information
Patent Citations
Lightweight outsourcing file multi-keyword retrieval method and system with privacy protection function
CN110727951A
Verifiable joint keyword efficient search method and device, client and server
CN116305273A