An improved public-key searchable encryption method, system, and device.

By employing asymmetric encryption and a public-key searchable encryption method with a dynamic index structure, this technology solves the problems of user privacy leakage and chaotic key management in existing technologies, and achieves secure and efficient retrieval and privacy protection in scenarios such as cloud storage.

CN120934903BActive Publication Date: 2026-03-06浪潮智能终端有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511446062.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-03-06
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

In existing public-key searchable encryption schemes, attackers can generate ciphertext by exhaustively searching for common keywords and compare it with the server's ciphertext, thus leaking sensitive user information. Furthermore, overloading the private key function leads to chaotic key management logic, making users prone to misoperation and resulting in insufficient privacy protection.

Method used

Asymmetric encryption is used to generate public keys for searchable encryption methods. The public key encrypts documents and keywords, and the private key decrypts the documents and derives trapdoor information. Blockchain traceability, third-party notarization, and time-limited locking mechanisms ensure the integrity and timeliness of the index information. Sharded security backup and two-factor authentication are used to enhance key security, and a dynamic index structure is built to support fast operation.

Benefits of technology

It enables accurate retrieval without revealing plaintext content, prevents keyword guessing attacks, enhances privacy protection, supports dynamic data manipulation and multi-user access control, and improves system security and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120934903B_ABST
    Figure CN120934903B_ABST
Patent Text Reader

Abstract

This invention provides an improved public-key searchable encryption method, system, and device, belonging to the field of information security and cryptography. The method first generates a public-private key pair, encrypts keywords with the public key to generate searchable ciphertext, and associates it with stored documents; it receives search requests and trapdoors derived from the private key, returns an index after matching; the client downloads the ciphertext and decrypts it with the private key; it integrates an anti-guessing attack mechanism, preventing the guessing of user interests through access mode hiding; it constructs a dynamic index structure, supporting rapid addition, deletion, and modification of documents, Boolean queries, and multi-user access control. This invention ensures encryption security through public-private key separation and trapdoor mechanisms; the dynamic index supports efficient data operations; anti-guessing attacks and access mode hiding enhance user privacy protection; it is compatible with multiple queries and access control, and is suitable for various scenarios with dual requirements for privacy protection and data availability, such as cloud storage, email systems, and medical and health data management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security and cryptography technology, specifically relating to an improved public-key searchable encryption method, system, and device. Background Technology

[0002] Public-key encryption algorithms (such as RSA and ECC) are primarily used to ensure data confidentiality, meaning only those holding the corresponding private key can decrypt and read the encrypted content. However, in many practical applications, simply protecting data confidentiality is insufficient. For example, in cloud environments, users want to be able to retrieve their encrypted data without revealing its specific content. This has given rise to the concept of searchable encryption.

[0003] Searchable Encryption introduces the concept of Public Key Searchable Encryption (PEKS), which allows users to encrypt documents using public keys and generate search tokens specific to a particular keyword, enabling keyword searches to be performed on the encrypted documents without decryption.

[0004] In related technologies, searchable encryption schemes generate ciphertext for identical keywords. Attackers can deduce the true keywords by exhaustively listing common keywords, generating corresponding ciphertext, and comparing it with the ciphertext on the server. For example, in medical data scenarios, attackers can exhaustively list keywords for common diseases such as diabetes and hypertension, generate ciphertext, and match it with the ciphertext of keywords in medical documents on the server. If a match is successful, the attacker can determine the type of disease the user searched for, thus leaking sensitive information. Furthermore, using public and private keys without clearly defining their functional division can lead to private key overload. A leak of private key can affect all operations, and the chaotic key management logic makes users prone to accidental operations, resulting in security risks.

[0005] Searchable encryption schemes may focus on keyword and document content privacy. Servers can analyze user search frequency, request intervals, and related attributes to cluster user interests, potentially failing to meet privacy protection requirements. Furthermore, for single-key encryption, decryption, and retrieval verification, data is at risk of being decrypted if the key is leaked. Summary of the Invention

[0006] This invention provides an improved public-key searchable encryption method that achieves coordinated configuration of asymmetric encryption, trapdoor matching, dynamic indexing, and privacy protection mechanisms. Through resistance to guessing attacks and dynamic data support, it adapts to users' needs for privacy protection and efficient collaboration.

[0007] The methods include:

[0008] S101: Generate a public-private key pair. The public key is used to encrypt documents and keywords, and the private key is used to decrypt documents, generate search tokens, and generate trapdoor information.

[0009] S102: Encrypt the keywords using the public key to generate searchable keyword ciphertext, and store the ciphertext along with the encrypted document on the server;

[0010] S103: Receive the user's search request and the trapdoor information derived from the private key, perform the matching operation between the trapdoor and the keyword ciphertext on the server, and return the index information of the matching document;

[0011] S104: The client downloads the encrypted document from the server based on the index information, decrypts the document using the private key, and obtains the original plaintext content. The server processes the index information, including sorting the index based on search strategies and user behavior, adjusting the index granularity according to the client's device type, generating decryption order suggestions, and ensuring the integrity, authenticity, and timeliness of the index information through digital signatures, blockchain traceability, third-party notarization, and time-limited locking mechanisms. Before downloading, the client verifies the legitimacy of the index information and handles index corruption according to the self-repair guidelines.

[0012] Preferably, step S101 further includes the following steps:

[0013] The private key is split into scenario-specific sub-keys to generate independent sub-private keys. Each sub-private key has a single operation permission for the corresponding scenario, and each sub-private key is generated from the master private key through different key derivation paths. No sub-private key can deduce the complete information of other sub-private keys or the master private key.

[0014] The public and private key pairs are bound to the validity period of the user identity and the access period of the document. When the key is generated, the validity period of the user identity and the access period of the corresponding document are entered, and the period information is embedded in the key metadata.

[0015] Two-factor authentication information is incorporated into the private key generation process, using the user's biometrics and the user's device unique identifier as joint seed parameters. Only when the private key is used subsequently, the biometrics and device identifier are verified in real time to match, and the private key can be activated and the corresponding operation can be performed. If the verification fails, the private key remains locked.

[0016] Construct a hierarchical public key association structure, generating one master public key and multiple sub-public keys. The master public key is associated with a unique user identity, and each sub-public key corresponds to an independent document set. Sub-public keys can only encrypt documents and keywords within their corresponding document set, and the generation, activation, and disabling of sub-public keys are all controlled by the master public key and cannot be used independently of the master public key.

[0017] The private key is backed up in a segmented security manner. The private key is split into multiple key segments using a secret sharing method. Each segment is encrypted using a different encryption algorithm and stored separately on the user's local device and the server. When a preset number of key segments are collected and the user is authenticated, the segments are decrypted and concatenated into a complete private key. The private key information cannot be restored from a single segment.

[0018] Preferably, the encryption of the keyword using the public key in step S102 specifically includes the following steps:

[0019] The keywords are split into basic word segments and modifying word segments according to their part-of-speech structure. A dynamic mask related to the document creation time is generated for each word segment. The mask is inserted into the middle of the word segment and then reassembled into the keyword string to be encrypted according to the original structure.

[0020] The public key is used to encrypt the recombined keyword string. The basic key parameters are extracted from the public key and combined with the number of word segments of the keywords to generate temporary encryption parameters. The temporary parameters are embedded into the encryption process of the public key so that the same public key can generate different encryption logic for keywords with different numbers of word segments.

[0021] Establish an association mapping between the ciphertext of keywords and the feature values ​​of multiple segments of the document, extract the content segments from the first 20%, the middle 40%, and the last 40% of the document, calculate the hash value of each segment and concatenate them into the document feature value, encrypt the feature value with the public key, and bind it to the same association identifier with the ciphertext of keywords.

[0022] An environmental feature code for the encryption operation is embedded at the end of the ciphertext. The client hardware identifier and network environment identifier at the time of encryption are collected, concatenated to generate an environmental feature code, which is then encrypted and appended to the end of the ciphertext to form the keyword ciphertext.

[0023] Preferably, step S103 further includes the following steps:

[0024] Receive and parse user search requests and trapdoor information;

[0025] Extract KCI and keyword hash values;

[0026] Combine blockchain query matching results;

[0027] Verify access permissions.

[0028] Preferably, in step S104, the client downloads the encrypted document from the server based on the index information and further processes the index information, specifically including the following steps:

[0029] The indexes are sorted uniformly based on comprehensive search strategies, matching degree, timeliness, and user historical access records to form an ordered index list;

[0030] A hash value is generated from an ordered index list using a private key, and then combined with a timestamp, random number, and public configuration to obtain the server signature through asymmetric encryption.

[0031] By calling the blockchain smart contract based on the encrypted file name, the historical processing records of the file and the corresponding block hash are extracted, and a cross-block traceability chain is constructed to provide traceable source evidence for the index list;

[0032] The ordered index list, server signature, traceability chain, and integrity verification value are encapsulated into a data packet, and symmetric encryption is applied to sensitive fields to generate an encrypted data packet to be returned.

[0033] The client verifies the signature's legitimacy using the server's public key, compares the traceability chain block hash with the latest on-chain hash to confirm no tampering, decrypts sensitive fields, parses the ordered index, and completes the secure display.

[0034] Preferably, step S104, in which the client downloads the encrypted document from the server based on the index information, further includes the following steps:

[0035] S2041: Adjust the granularity of index information according to the client device type, and the server identifies the client device identifier;

[0036] S2042: The server extracts the decryption time and high-frequency decryption error points of the matching file, generates a suggested order, and appends it to the end of the index information;

[0037] S2043: The server generates 128 bits of information from the sorted index information, sends it to the third-party evidence storage node to obtain the evidence storage number, and embeds the evidence storage number and the 128 bits of information together into the returned data. The client queries the third-party node to verify the 128 bits of information through the evidence storage number.

[0038] S2044: The server uses the client's public key to encrypt the validity key as a validity lock, which is then appended to the header of the index information. When the client decrypts the information, it verifies that the current time is within the validity period before it can parse the index information.

[0039] S2045: Embed index integrity self-repair guidelines in the returned data. The server generates independent check values ​​for each field of the index. If the client detects index corruption, it can repair it according to the guidelines without having to request the server again.

[0040] Preferably, after step S104, the method further includes:

[0041] An anti-keyword guessing attack mechanism is integrated into the encryption and retrieval process, and an access pattern hiding strategy is used to prevent the server from guessing the user's interests.

[0042] Build an index structure that supports dynamic data operations, enabling fast insertion, deletion, and modification of document collections, while being compatible with Boolean logic queries and multi-user access control.

[0043] Preferably, the step of integrating an anti-keyword guessing attack mechanism during encryption and retrieval also includes the following steps: during the interaction between the client and the server, a virtual search path unrelated to the user's actual search request is generated in real time, so that the server cannot infer the user's interests by analyzing access patterns;

[0044] User interests are broken down into topic interest information, time interest information, and source interest information, and a random dispersion factor is defined for each interest information. In the search requests received by the server, the actual interest points only account for a portion of the dimensions, and the remaining dimensions are dynamically filled by the dispersion factor.

[0045] In the process of deriving trapdoor information, derivation rules are defined so that the trapdoor information generated by the same keyword in different search sessions has completely different structures; the derivation rules are based on the combination of user device information and server timestamps to ensure that each derivation result is independent of historical derivation records.

[0046] This application also provides an improved public-key searchable encryption system, the system comprising:

[0047] The key generation module is used to generate public and private key pairs. The public key is used to encrypt documents and keywords, and the private key is used to decrypt documents, generate search tokens, and generate trapdoor information.

[0048] The ciphertext generation module is used to encrypt keywords using a public key, generate searchable keyword ciphertext, and associate the ciphertext with the encrypted document and store it on the server.

[0049] The trapdoor matching module is used to receive the user's search request and the trapdoor information derived from the private key, perform the matching operation between the trapdoor and the keyword ciphertext on the server, and return the index information of the matching document.

[0050] The encrypted decryption module is used by the client to download encrypted documents from the server based on index information, decrypt the documents using a private key, and obtain the original plaintext content. The server processes the index information, including sorting the index based on search strategies and user behavior, adjusting the index granularity according to the client's device type, generating decryption order suggestions, and ensuring the integrity, authenticity, and timeliness of the index information through digital signatures, blockchain traceability, third-party notarization, and time-limited locking mechanisms. Before downloading, the client verifies the legitimacy of the index information and handles index corruption according to self-repair guidelines.

[0051] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the improved public-key searchable encryption method.

[0052] As can be seen from the above technical solutions, the present invention has the following advantages:

[0053] The improved public-key searchable encryption method provided by this invention achieves secure public key use for encryption through public key encryption and private key decryption. The private key is held only by the user and uniquely corresponds to decryption, token generation, and trapdoor derivation functions. It eliminates the need to manage multiple sets of keys and ensures the key's resistance to cracking.

[0054] The present invention generates searchable ciphertext by encrypting keywords with public keys, avoiding the problems of traditional encryption where encryption itself makes retrieval impossible and retrieval requires exposing plaintext keywords; the keyword ciphertext is bound to the document ciphertext with a unique identifier to ensure that the corresponding document can be accurately located during subsequent retrieval, thus balancing security and retrieval accuracy.

[0055] The server of this invention does not require decryption of keyword ciphertext or trapdoors; it determines matching through feature comparison, preventing untrusted servers from stealing users' search intent. The returned index information contains location clues but does not transmit actual data, further reducing the risk of privacy leaks during transmission and storage. Symmetric keys efficiently encrypt large documents; the public key encrypts the symmetric key to ensure key security, and the private key decrypts the symmetric key before decrypting the document, balancing decryption efficiency and key security.

[0056] By disrupting the fixed correspondence between ciphertext and plaintext keywords, even if an attacker exhaustively searches for common keywords, they will be unable to match the dynamically generated ciphertext, thus resisting keyword guessing attacks. Furthermore, by interfering with the server's analysis of user search behavior patterns, it prevents the discovery of user interests, enhancing the depth of privacy protection. A B+ tree is used to construct a dynamic index, reducing the time complexity of insertion, deletion, and modification operations. Boolean logic queries are supported to meet complex search needs and adapt to multi-user collaborative scenarios. Attached Figure Description

[0057] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 Flowchart for an improved public-key searchable encryption method;

[0059] Figure 2 A schematic diagram of an improved public-key searchable encryption system;

[0060] Figure 3 This is a schematic diagram of an electronic device. Detailed Implementation

[0061] The improved public-key searchable encryption method of this invention can solve the problem of keyword retrieval of encrypted data on a remote server without decryption, and is applicable to various scenarios requiring secure retrieval functions, such as cloud storage, email systems, medical and health databases, financial record management, and IoT data sharing.

[0062] The "Searchable Encryption" involved in this invention allows keyword retrieval operations on encrypted data without disclosing the original data content. Public Key Searchable Encryption (PEKS) is a particularly important encryption paradigm that combines the advantages of traditional public key encryption (such as RSA and ECC) with symmetric encryption. It allows users to encrypt documents and their keywords using the recipient's public key and generate a specific search token, enabling authorized users to perform keyword matching and retrieval on a remote server without decryption.

[0063] The SearchSafe-PEKS proposed in this invention is a multi-dimensional enhancement and optimization based on the classic PEKS framework. This solution not only inherits the basic characteristics of PEKS, but also improves its performance in terms of security, dynamic update capabilities, performance efficiency, and extended applications by defining several innovative mechanisms, making it more suitable for practical application scenarios in modern network environments.

[0064] Specifically, in terms of security, SearchSafe-PEKS defines a Keyword Guessing Attack (KGA) mechanism to prevent attackers from guessing legitimate search tokens by exhaustively searching for keywords. At the same time, it adopts an access pattern hiding strategy to prevent the server from inferring the user's interests by analyzing the user's query behavior, thereby further improving the system's privacy protection capabilities.

[0065] Secondly, in terms of dynamic data support, SearchSafe-PEKS has designed an efficient index structure (such as skip pointers, B+ trees, etc.) to support fast insertion, deletion and modification operations of document collections, solving the static index limitation problem that is common in traditional PEKS solutions, and adapting to large-scale and frequently updated data environments.

[0066] In terms of performance optimization, the solution defines parallel processing mechanisms, caching optimization strategies, and Bloom filter compressed indexes, which significantly improve the system's response speed and throughput on large-scale datasets, enhancing its practicality and deployment feasibility.

[0067] Finally, in terms of scalability and compatibility, SearchSafe-PEKS supports Boolean logic queries (AND / OR / NOT), multi-user access control (implemented through attribute base encryption ABE), and integration with cutting-edge technologies such as blockchain and distributed databases, possessing excellent scalability and cross-platform integration capabilities.

[0068] The improved public-key searchable encryption method of this application will be described in detail below. Specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.

[0069] It should be understood that, when used in this specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0070] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0071] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0072] Please see Figure 1 The diagram shown is a flowchart of a specific embodiment, the method including:

[0073] Step S101: Generate a public-private key pair. The public key is used to encrypt documents and keywords, and the private key is used to decrypt documents, generate search tokens, and generate trapdoor information.

[0074] In some embodiments, when generating public-private key pairs, an asymmetric encryption algorithm is used, wherein the public key and private key are paired and the private key cannot be derived from the public key.

[0075] Specifically, the key generation process first determines the algorithm parameters, then generates random numbers using the algorithm as private key parameters, and finally calculates the public key based on the private key. The public key's uses are further subdivided: when encrypting documents, a document encryption key is first generated using a symmetric encryption algorithm, and then the public key is used to encrypt this symmetric key.

[0076] In this embodiment, when encrypting keywords, the public key is used to encrypt the keywords, generating searchable keyword ciphertext.

[0077] In this embodiment, when decrypting a document, the private key is first used to decrypt the symmetric key encrypted by the public key, and then the symmetric key is used to decrypt the encrypted document. When generating a search token, the token is calculated based on the private key and the query keywords. When deriving trapdoor information, some parameters are extracted from the private key and combined with the query strategy to generate trapdoor information.

[0078] In some specific embodiments, step S101 specifically includes the following steps:

[0079] S1011: The private key is split into sub-keys based on the scenario. Based on the searchable encrypted operation scenario of the public key, an independent sub-private key is generated. Each sub-private key has a single operation permission for the corresponding scenario. Each sub-private key is generated from the master private key through a different key derivation path. No sub-private key can deduce the complete information of other sub-private keys or the master private key.

[0080] This embodiment involves operations such as document encryption, keyword encryption, search token generation, trapdoor derivation, and document decryption. After the master private key is generated, the system assigns a unique identifier to each of the five scenarios and generates a different random salt value for each scenario. Through a key derivation algorithm, based on the master private key and combined with the scenario identifier and the random salt value, five sub-private keys are generated.

[0081] S1012: Bind the public and private key pair to the validity period of the user identity and the access period of the document. When the key is generated, the validity period of the user identity and the access period of the corresponding document are entered, and the period information is embedded in the key metadata. When the system detects that the current time has exceeded the validity period or access period, the key invalidation mechanism is triggered. The invalidated key cannot perform any operations such as encryption, decryption, token generation, etc.

[0082] This embodiment strongly binds the key lifecycle to user identity and document permissions, eliminating the need for further intervention in the expiration mechanism, preventing the abuse of expired permissions, and ensuring the timeliness of access to encrypted data.

[0083] S1013: Incorporate two-factor authentication information into the private key generation process, using the user's biometrics and the user's device unique identifier as joint seed parameters. Only when the private key is used subsequently, the biometrics and device identifier are verified in real time to match, and the private key can be activated and the corresponding operation can be performed. If the verification fails, the private key remains locked.

[0084] This embodiment first collects the user's characteristic values ​​and the device's hardware serial number, concatenates them, and processes them using a hash algorithm to obtain a joint seed parameter for private key derivation. Based on the seed parameter, a private key is generated using a key derivation algorithm. Before each use of the private key, the user's characteristic values ​​are collected in real time, and the current device serial number is read. After repeating the same hash processing, the values ​​are compared with the joint seed parameter. If they match, the private key is activated; otherwise, it is locked. Once locked, it can only be unlocked after administrator approval. This improves the private key's resistance to theft and reduces the security risks after key leakage.

[0085] S1014: Construct a hierarchical public key association structure, generate one master public key and multiple sub-public keys. The master public key is associated with a unique user identity identifier, and each sub-public key corresponds to an independent document set. Sub-public keys can only encrypt documents and keywords within the corresponding document set, and the generation, activation, and disabling of sub-public keys are all controlled by the master public key and cannot be used independently of the master public key.

[0086] This embodiment achieves permission isolation for different document sets by dividing the permissions of the master public key and the sub-public key. The one-to-one correspondence between the sub-public key and the document set ensures the accuracy of encryption operations. The unified management of the master public key simplifies the key management process in multi-document set scenarios and improves system adaptability.

[0087] S1015: Implements segmented security backup for the private key, using a secret sharing method to split the private key into multiple key segments. Each segment is encrypted using a different encryption algorithm and stored separately on the user's local device and the server. When a preset number of key segments are collected and the user is authenticated, the segments are decrypted and concatenated into a complete private key. A single segment cannot restore the private key information.

[0088] This embodiment employs a secret-sharing algorithm to split the private key into multiple key fragments, which can be stored in appropriate locations on the user's device and also on a server. Each fragment uses a different encryption algorithm, and decryption of each fragment requires separate user authentication. To recover the private key, at least three fragments must be collected, decrypted, and then interpolated using the secret-sharing algorithm to reconstruct the complete private key. If fewer than three fragments are available, the private key cannot be recovered. This approach prevents the leakage of individual fragments while also avoiding the inability to recover the private key due to the loss of some fragments.

[0089] Step S102: Encrypt the keywords using the public key to generate searchable keyword ciphertext, and store the ciphertext and encrypted document together on the server.

[0090] In some embodiments, irrelevant characters can be removed first, and the data can be standardized according to a preset format. The preprocessed keywords can be encrypted using the public key. The ECC algorithm can be used to first convert the keywords into binary data, and then generate the keyword ciphertext through elliptic curve point operations corresponding to the public key.

[0091] When encrypting a document, a random symmetric key is first generated using a symmetric encryption algorithm. This key is then used to encrypt the document content to obtain the ciphertext. Finally, the public key is used to encrypt the symmetric key, forming a symmetric key combination.

[0092] When storing data in association, assign the same unique identifier to both the keyword ciphertext and the document ciphertext to ensure that the corresponding document ciphertext can be quickly located using the keyword ciphertext.

[0093] Step S103: Receive the user's search request and the trapdoor information derived from the private key, perform the matching operation between the trapdoor and the keyword ciphertext on the server, and return the index information of the matching document.

[0094] In some embodiments, the server receives data packets sent by user clients, which contain search requests and trapdoor information.

[0095] Optionally, the search request includes a description of the query keywords and the expected number of results. The trapdoor information involves the user's private key derivation, including characteristic parameters of the private key calculation, hash values ​​related to the keywords, timestamps, etc.

[0096] The server first verifies the checksum hash of the data packet to exclude tampered requests. During the matching phase, the server does not directly decrypt the ciphertext of keywords or trapdoors, but instead performs verification based on preset matching rules.

[0097] For example, if the trapdoor contains the hash value of the keyword, the server will calculate the corresponding hash value of the stored keyword ciphertext and compare whether the two are consistent. If based on the elliptic curve algorithm, a point operation is performed between the parameters in the trapdoor and the keyword ciphertext, and the result is judged to meet the preset conditions. Only when the matching result is consistent is the document corresponding to the keyword ciphertext determined to be the target document.

[0098] When returning the data, extract the index information of the target document, including the document's unique identifier, the hash value of the storage path, the document size, and the creation time. This information does not include the document's encrypted or plaintext content. The index information is then filtered according to the number of user requests and returned to the client.

[0099] Step S104: The client downloads the encrypted document from the server based on the index information, decrypts the document using the private key, and obtains the original plaintext content. The server processes the index information, including sorting the index based on search strategies and user behavior, adjusting the index granularity according to the client's device type, generating decryption order suggestions, and ensuring the integrity, authenticity, and timeliness of the index information through digital signatures, blockchain traceability, third-party notarization, and time-limited locking mechanisms. Before downloading, the client verifies the legitimacy of the index information and handles index corruption according to the self-repair guidelines.

[0100] In some embodiments, the client parses the index information returned by the server, requests the corresponding encrypted document from the server using the document's unique identifier, and the server verifies the client's identity before sending it to the client.

[0101] For decryption, the client uses the locally stored private key to decrypt and obtain the original symmetric key. Then, it uses the symmetric key and the decryption algorithm to decrypt the encrypted document. During decryption, the hash value of the decrypted document is compared with the hash value stored in the index information to rule out document tampering. If decryption fails, the client will display an error message and terminate the operation to avoid generating invalid data.

[0102] Step S105: Integrate an anti-keyword guessing attack mechanism during the encryption and retrieval process, and prevent the server from guessing the user's interests through an access pattern hiding strategy.

[0103] In some embodiments, the anti-keyword guessing attack mechanism is based on dynamic keyword fragmentation, which splits the keyword into 2-6 random fragments. Each fragment is inserted with a random mask of the same length as the fragment. The number of fragments is bound to the document creation time, and the same keyword generates different ciphertexts depending on the document.

[0104] For keyword ciphertext desensitization, the encrypted keyword ciphertext is subjected to secondary hashing to hide keyword characteristics, so that attackers cannot deduce the keywords from the ciphertext format or length.

[0105] For access pattern hiding strategies, random request intervals can be used, and the user's historical search intervals can be recorded. The current request interval is randomly generated within the historical average range, and the first search is randomly selected between 30 and 60 seconds to avoid fixed intervals being recognized by the server.

[0106] To prevent spoofed request insertion, fake keyword ciphertext and search requests are generated according to a preset ratio. These fake requests are associated with empty document indexes containing no actual content and are sent mixed with genuine requests, making it impossible for the server to distinguish between them. This effectively defends against keyword guessing attacks; even if an attacker obtains part of the ciphertext, they cannot deduce the plaintext keywords. Furthermore, the privacy protection process not only protects keywords and document content but also hides user access behavior patterns, preventing the exploitation of user interests.

[0107] In some specific embodiments, step S105 specifically includes the following steps:

[0108] Step S1051: During the interaction between the client and the server, a virtual search path unrelated to the user's actual search request is generated in real time, so that the server cannot infer the user's interests by analyzing the access pattern.

[0109] The virtual search path generated in this embodiment is based on the fuzzing of the user's historical search behavior, ensuring that each search request is accompanied by multiple interfering access paths, and that the distribution of the interfering paths is not statistically related to the actual search behavior.

[0110] It's important to note that by deploying an obfuscation engine on the client side, user search behavior is monitored in real time, and virtual search paths are generated. The obfuscation engine extracts the semantic features of keywords based on the user's historical search records and generates irrelevant but semantically plausible distractor keywords. These distractor keywords are combined with the real search keywords to form a virtual search path, which is sent to the server via an encrypted channel. When processing search requests, the server simultaneously traverses both the real and virtual paths. Due to the interference from the virtual path, the server cannot extract the user's true points of interest from the access patterns.

[0111] Step S1052: The user's points of interest are broken down into topic interest information, time interest information, and source interest information, and a random dispersion factor is defined for each type of interest information. In the search requests received by the server, the actual points of interest only occupy a portion of the dimensions; the remaining dimensions are dynamically filled by the dispersion factor. The generation of the dispersion factor is based on the user's device environment parameters, ensuring that the combination of dimensions in each search request is unique and unpredictable.

[0112] This embodiment breaks down user interests into multiple interest information segments and assigns a random dispersion factor to each segment. The dispersion factor is generated based on the real-time state parameters of the user's device, which are mapped to the dispersion factor using a hash function. In a search request, the actual interest points occupy only a portion of the dimensions, with the remaining dimensions filled by the dispersion factor. When parsing the search request, the server cannot correlate different interest information segments due to the randomness of the dispersion factor, thus failing to reconstruct the user's complete interest points.

[0113] Step S1053: During the derivation of trapdoor information, define derivation rules so that the trapdoor information generated by the same keyword in different search sessions has completely different structures.

[0114] The derivation rules are calculated based on a combination of user device information and server timestamps, ensuring that each derivation result is independent of historical derivation records. The server cannot infer the relevance of user interests by comparing trapdoor information in different sessions.

[0115] Optionally, the uniqueness of each derivation result is ensured by defining a combination operation of device information and timestamps. Device information is generated from the user device's hardware information through encrypted hashing, while the timestamp uses an encrypted clock synchronized between the server and client. The derivation rule performs an XOR operation on the device information and timestamp to generate a random seed, and then derives trapdoor information from the seed. Due to the dynamic changes in device information and timestamps, each derivation result is independent of historical records, preventing the server from inferring the relevance of user interests by comparing trapdoor information.

[0116] Step S106: Construct an index structure that supports dynamic data operations, enabling fast insertion, deletion, and modification of document collections, and ensuring compatibility with Boolean logic queries and multi-user access control.

[0117] In some embodiments, a modified B+ tree is used as the basic structure. The leaf nodes of the B+ tree store the mapping between the keyword ciphertext and the unique document identifier, while the non-leaf nodes store the index keywords, supporting fast location. The skip list achieves fast lookup through multi-level linked lists. When inserting or deleting, only some node pointers need to be adjusted, without reconstructing the entire tree.

[0118] When inserting a document, after generating the encrypted keyword text, the encrypted text is inserted into the corresponding position according to the node splitting mechanism of the B+ tree. When deleting a document, the document identifier is located by the encrypted keyword text, the index entry is deleted, and the node merging of the B+ tree is adjusted. When modifying a document, the index entry of the original encrypted keyword text is first deleted, and then the encrypted keyword text of the modified document is regenerated and inserted into the index.

[0119] For Boolean logic queries, AND, OR, and NOT operations are implemented by combining multiple keyword trapdoors. The server matches each trapdoor separately and then filters the results according to the logical relationship.

[0120] This embodiment's multi-user access control method constructs an access model based on user attributes or roles, assigns an access identifier to each user, and sets access permission thresholds for each encrypted document. Before returning the index, the server verifies whether the user's access identifier meets the document's access permission threshold; if not, it refuses to return the index. Multi-user access control ensures that documents are only accessed by authorized users, prevents unauthorized data access, and is suitable for multi-user collaborative scenarios.

[0121] In one embodiment of the present invention, based on step S102, the following is a possible embodiment and its specific implementation is described in a non-limiting manner. The encryption of the keyword using a public key in step S102 specifically includes the following steps:

[0122] S1021: Based on the part-of-speech structure of the keywords, the basic word segment and the modifying word segment are split. A dynamic mask related to the document creation time is generated for each word segment. The mask is inserted into the middle of the word segment and then reassembled into the keyword string to be encrypted according to the original structure.

[0123] It should be noted that part-of-speech tagging identifies nouns, verbs, and adjectives in keywords using a pre-defined part-of-speech tagging library, ensuring that each segment has independent semantics. The dynamic mask is determined by the document creation time and is generated by a cryptographic random number generator, then inserted into the middle of the segment. During recombination, the nouns, verbs, and adjectives are concatenated in a pre-defined order to ensure that the semantic structure is not disrupted.

[0124] S1022: Use the public key to encrypt the recombined keyword string, extract the basic key parameters from the public key, generate temporary encryption parameters by combining the number of word segments of the keywords, and embed the temporary parameters into the encryption process of the public key so that the same public key can generate different encryption logic for keywords with different numbers of word segments.

[0125] The basic key parameters in this embodiment include key length, curve parameters, etc., and the number of segments is determined by the part-of-speech tagging results. Temporary encryption parameters are generated based on the number of segments and the public key version number, and are embedded in the key expansion stage of the public key encryption process. This allows the public key to adjust the number of key expansion iterations during encryption based on the temporary parameters. A 1-byte temporary parameter identifier is appended to the header of the generated ciphertext. The binding of temporary parameters to the number of segments ensures that the encryption process is associated with the structural features of the keywords, further enhancing the uniqueness and security of the ciphertext.

[0126] S1023: Establish an association mapping between the keyword ciphertext and the feature values ​​of multiple segments of the document, extract the content segments from the first 20%, middle 40%, and last 40% of the document, calculate the hash value of each segment and concatenate them into the document feature value, encrypt the feature value with the public key, and bind it to the same association identifier as the keyword ciphertext;

[0127] In this embodiment, document fragment extraction is calculated based on byte length; the hash value of each fragment is calculated using the SHA-1 algorithm. The feature value is encrypted using the public key of the current encryption keyword to generate the feature ciphertext.

[0128] S1024: Perform heterogeneous segmented encryption storage on the keyword ciphertext, dividing it into a first half and a second half according to the length of the ciphertext. The first half adopts a block encryption mode, and the second half adopts a stream encryption mode, generating independent encryption vectors for the two segments respectively.

[0129] Optionally, the first half uses CBC block encryption mode, and the encryption vector is generated from the document's hash value; the second half uses CFB stream encryption mode, and the encryption vector is generated from the average of the keyword lengths combined with a random number; after encryption, a mode identifier is added to each segment, and then they are concatenated into ciphertext.

[0130] S1025: Embed the environment feature code of the encryption operation at the end of the ciphertext. Collect the client hardware identifier and network environment identifier during encryption, concatenate them to generate the environment feature code, encrypt the feature code and append it to the end of the ciphertext to form the keyword ciphertext.

[0131] In this embodiment, the hardware identifier can extract characters related to the client's model number, and it also extracts preset numbers from the IP address based on the network environment identifier. The string generated by concatenating the two is compressed into an environment signature using the MD5 algorithm. The signature is then encrypted using a portion of the public key parameters and appended to the end of the ciphertext to form the keyword ciphertext. The environment signature contains client and network information at the time of encryption, which can be used to trace the environment in which the ciphertext was generated, preventing attackers from generating false keyword ciphertext in unauthorized environments.

[0132] In one embodiment of the present invention, based on step S103, the following is a possible embodiment and its specific implementation will be described in a non-limiting manner. Step S103 specifically includes the following steps:

[0133] S1031: Receive and parse user search requests and trapdoor information;

[0134] Users submit their search strategy, identity credentials, and device identifiers to TPNC via the client to request dynamic authorization factors. TPNC stands for Trusted Partner Network, which controls permissions, data access, and operational processes to ensure compliance with security standards.

[0135] In this embodiment, after successful TPNC verification, an authorization factor is generated and returned to the client. The client combines the private key and keywords to derive a unique verification vector, packages the search strategy, authorization factor, and verification vector, and sends them to the server. The server separates the data, verifies whether the authorization factor signature meets the threshold, and if not, rejects the request and reports that the authorization is invalid.

[0136] S1032: Extract KCI and keyword hash values;

[0137] KCI stands for Key Control Indicator, which is used to assess the effectiveness of cryptographic key management.

[0138] The server locates the block using the KCI blockchain location identifier based on the search keywords; if the identifier is invalid, an identifier error is reported; if the block does not exist, synchronization is triggered. After extracting the KCI, the encrypted part of the keywords is separated from the document attributes, and the hash value of the keywords is calculated using a specified hash function. The KCI hash chain (whether F(XI) equals H1(F(XI-1))) is verified; if they do not match, the KCI is determined to have been tampered with and is rejected.

[0139] S1034: Combine blockchain query matching results;

[0140] The server invokes the smart contract, limiting the backtracking range to a maximum of a preset number of blocks within a preset time period, traversing from the latest block. It compares the keyword hash value within the block with the search hash value; if a match is found, the associated Uid(f) is extracted. The access validity period is read from the KCI, excluding expired Uid(f); if multiple versions of the same Uid(f) are present, the latest version is retained, generating a list of valid Uid(f).

[0141] S1035: Verify access permissions;

[0142] The server extracts the access permission credentials for matching files from the document attribute fields of KCI, specifically involving the file permission level Li and the permission verification vector Vi. It retrieves the user permission token, user permission level Ui, and permission feature code Si stored on the blockchain. The difference between Li and Ui (Li-Ui) is calculated. If the difference is ≤0 and the matching degree between Si and Vi is ≥80%, the user is deemed to have access permission; otherwise, it is marked as insufficient permission, and the corresponding Uid(f) is excluded.

[0143] As one implementation of step S104 in this application, the client downloads the encrypted document from the server based on the index information and processes the index information, specifically including the following steps:

[0144] Step S2011: Based on the logical relationships in the search strategy, keyword matching degree, document timeliness, and information on similar documents recently accessed by the user, sort the matching document index information and generate a sorted index list.

[0145] Step S2012: The server uses its private key to hash the sorted index list, generating a fixed-length hash value; combined with the current timestamp, server random number, and system public configuration, it generates a server signature using an asymmetric encryption algorithm to ensure the signature's unforgeability and timeliness.

[0146] Step S2013: The server calls the blockchain smart contract to extract all historical processing records of the file and the hash value of the corresponding block from the blockchain according to the encrypted file name of the matching document, forming a cross-block traceability chain to ensure the traceability of the data source.

[0147] Step S2014: Package the sorted index list, server signature, blockchain traceability chain, and integrity verification value into a data packet, encrypt sensitive fields using a symmetric encryption algorithm, and generate the final returned data.

[0148] Step S2015: The client uses the server's public key to verify the legality of the server's signature; extracts the blockchain traceability chain, and confirms that the data has not been tampered with by comparing the block hash value with the latest hash value of the blockchain; decrypts the encrypted sensitive fields, parses the sorted index information, and displays it to the user.

[0149] This embodiment sorts the index list according to user needs, prioritizing the most relevant and needed documents and improving efficiency. Server signatures, combining timestamps and random numbers, prevent signature forgery and reuse of old signatures. Client verification allows users to independently verify the legitimacy and integrity of index information, preventing the receipt of tampered or forged data. The sorting can be adjusted according to the scenario, and sensitive field encryption can be configured with different encryption strengths based on data sensitivity, meeting the security and practical needs of various scenarios such as enterprise document management and medical data retrieval.

[0150] In one embodiment of the present invention, based on step S104, the following is a possible embodiment and its specific implementation is described in a non-limiting manner. Step S104, in which the client downloads the encrypted document from the server according to the index information, further includes the following steps:

[0151] S2041: Adjust the granularity of index information according to the client device type, and the server identifies the client device identifier;

[0152] In this embodiment, the server identifies the device type through client requests. The core block index of the client device identifier includes the index and summary of the first three data blocks of the file. The non-core block index retains the block number and storage location, while redundant fields such as block size and checksum are removed. Considering the significant differences in computing power and storage resources among different devices, mobile devices have lower computing power and limited storage. Simplifying the index granularity can reduce the resource consumption of the client in parsing the index. If the device resources are sufficient, retaining the complete index can meet the user's query needs for file details.

[0153] S2042: The server extracts the decryption time and high-frequency decryption error points of the matching file, generates a suggested order, and appends it to the end of the index information;

[0154] S2043: The server generates 128 bits of information from the sorted index information, sends it to the third-party evidence storage node to obtain the evidence storage number, and embeds the evidence storage number and the 128 bits of information together into the returned data. The client queries the third-party node to verify the 128 bits of information through the evidence storage number.

[0155] In this embodiment, the trusted third-party evidence storage node is a platform with electronic evidence storage qualifications. The server sends index information to the third-party node via API to obtain a unique evidence storage number. The client can open the third-party node's official website, enter the evidence storage number to query the corresponding index information, and compare it with the locally calculated index information.

[0156] S2044: The server uses the client's public key to encrypt the validity key as a validity lock, which is then appended to the header of the index information. When the client decrypts the information, it verifies that the current time is within the validity period before it can parse the index information.

[0157] It should be noted that the server generates the validity key by encrypting the current timestamp and a random number using the AES-128 algorithm to generate a validity lock; the validity lock embeds an expiration date identifier; before parsing the index information, the client decrypts the validity lock with its own private key, extracts the validity date, and compares it with the current time.

[0158] S2045: Embed index integrity self-repair guidelines in the returned data. The server generates independent check values ​​for each field of the index. If the client detects index corruption, it can repair it according to the guidelines without having to request the server again.

[0159] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0160] The following are embodiments of the improved public-key searchable encryption system provided in this disclosure. This system and the improved public-key searchable encryption methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the improved public-key searchable encryption system, please refer to the embodiments of the improved public-key searchable encryption methods described above.

[0161] like Figure 2 As shown, the system includes:

[0162] The key generation module 201 is used to generate public and private key pairs. The public key is used to encrypt documents and keywords, and the private key is used to decrypt documents, generate search tokens, and generate derived trapdoor information.

[0163] The ciphertext generation module 202 is used to encrypt keywords using a public key, generate searchable keyword ciphertext, and associate the ciphertext with the encrypted document and store it on the server.

[0164] The trapdoor matching module 203 is used to receive the user's search request and the trapdoor information derived from the private key, perform the matching operation between the trapdoor and the keyword ciphertext on the server, and return the index information of the matching document.

[0165] The encrypted decryption module 204 is used by the client to download encrypted documents from the server based on index information, decrypt the documents using a private key, and obtain the original plaintext content. The server processes the index information, including sorting the index based on search strategies and user behavior, adjusting the index granularity according to the client's device type, generating decryption order suggestions, and ensuring the integrity, authenticity, and timeliness of the index information through digital signatures, blockchain traceability, third-party notarization, and time-limited locking mechanisms. Before downloading, the client verifies the legitimacy of the index information and handles index corruption according to self-repair guidelines.

[0166] like Figure 3 As shown, this application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored in the memory and executable on the processor 101, wherein the processor 101 executes the program to implement the steps of an improved public-key searchable encryption method.

[0167] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments described and / or claimed herein.

[0168] In this embodiment, processor 101 may be implemented using at least one of an application-specific integrated circuit, a programmable logic device, a field-programmable gate array, a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such an implementation may be implemented within a controller. For software implementation, implementations such as processes or functions may be implemented with separate software modules that allow the performance of at least one function or operation. Software code may be implemented by a software application (or program) written in any suitable programming language, and the software code may be stored in memory and executed by the controller.

[0169] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like.

[0170] The memory 102 can be used to store software programs and various data. The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0171] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An improved public key searchable encryption method, characterized by, The method comprises: S101: generating a public-private key pair, the public key is used for encrypting documents and keywords, and the private key is used for decrypting documents, generating search tokens and deriving trapdoor information; Step S101 further comprises the following steps: The private key is split into scenario sub-keys, independent sub-private keys are generated, each sub-private key has single operation permission for the corresponding scenario, and each sub-private key is generated from the main private key through different key derivation paths, and any sub-private key cannot derive the complete information of other sub-private keys or the main private key; The public-private key pair is bound with the user identity validity period and the document access permission period, the validity period of the user identity and the accessible period of the corresponding document are recorded during key generation, and the period information is embedded in the key metadata; During the generation of the private key, the double-factor authentication information is integrated, the user's biological characteristics and the user's device unique identifier are used as the joint seed parameter, and only when the biological characteristics and the device identifier match in real time during subsequent use of the private key, the private key can be activated and the corresponding operation can be performed, and if the verification fails, the private key remains in a locked state; A public key layered association structure is constructed, one main public key and multiple sub-public keys are generated, the main public key is associated with the user's unique identity, and each sub-public key corresponds to one independent document set; the sub-public key can only encrypt the documents and keywords in the corresponding document set, and the generation, activation and disablement of the sub-public key are controlled by the main public key and cannot be used independently; The private key is implemented in a fragmented security backup manner, the private key is split into multiple key fragments by secret sharing, each fragment is encrypted by a different encryption algorithm, and is respectively stored in the user's local device and the server; when a preset number of key fragments are collected and verified by the user's identity, the fragments are decrypted and spliced into a complete private key, and a single fragment cannot restore the private key information; S102: encrypting the keywords using the public key to generate searchable keyword ciphertext, and storing the ciphertext and the encrypted document in the server; The step S102 of encrypting the keywords using the public key comprises the following steps: According to the part of speech structure of the keywords, the keywords are split into basic word segments and modifying word segments, a dynamic mask related to the document creation time is generated for each word segment, the mask is inserted into the middle of the word segment, and the original structure is reorganized into a keyword string to be encrypted; The reorganized keyword string is encrypted by calling the public key, the basic key parameter is extracted from the public key, the temporary encryption parameter is generated by combining the number of keyword segments, the temporary parameter is embedded in the encryption process of the public key, so that the same public key generates different encryption logic for keywords with different segment numbers; The keyword ciphertext is associated with the document multi-fragment feature value, the content fragments of the first 20%, the middle 40% and the last 40% of the document are extracted, the hash values of the fragments are calculated and spliced into the document feature value, the feature value is encrypted by the public key, and the keyword ciphertext is bound with the same association identifier; An environment feature code of the encryption operation is embedded at the end of the ciphertext, the client hardware identifier and the network environment identifier at the time of encryption are collected, the feature code is generated by splicing, the feature code is encrypted and attached to the end of the ciphertext to form the keyword ciphertext. S103: receiving a search request input by a user and trapdoor information derived from a private key, performing a matching operation of the trapdoor and the keyword ciphertext on the server, and returning index information of a matching document; S104: downloading an encrypted document from the server according to the index information, decrypting the document using the private key, and obtaining the original plaintext content; wherein the server processes the index information, including sorting the index based on a search strategy and user behavior, adjusting the index granularity according to the client device type, generating a decryption order suggestion, and ensuring the integrity, authenticity and timeliness of the index information through digital signature, blockchain traceability, third-party evidence preservation and time lock mechanism; the client verifies the legality of the index information before downloading, and handles the index damage according to the self-repairing guide; Step S104 further includes: Integrating an anti-keyword guessing attack mechanism in the encryption and retrieval process to prevent the server from guessing the user's interest point through access pattern hiding strategy; In the process of interaction between the client and the server, a virtual search path unrelated to the user's real search request is generated in real time, so that the server cannot guess the user's interest point by analyzing the access pattern; The user's interest point is divided into theme interest information, time interest information and source interest information, and a random dispersion factor is defined on each interest information; in the search request received by the server, only part of the dimensions are real interest points, and the rest of the dimensions are dynamically filled by the dispersion factor; In the trapdoor information derivation process, a derivation rule is defined to make the trapdoor information generated by the same keyword in different search sessions have completely different structures; the derivation rule is based on the combination operation of user device information and server timestamp, ensuring that each derivation result is independent of historical derivation records; An index structure supporting dynamic data operation is constructed to realize fast insertion, deletion and modification of document set, and compatible with Boolean logic query and multi-user permission control.

2. The improved public key searchable encryption method of claim 1, wherein Step S103 further includes the following steps: Receiving and analyzing user search request and trapdoor information; Extracting KCI and keyword hash value; Querying and matching results in combination with blockchain; Verifying access rights.

3. The improved public key searchable encryption method of claim 1, wherein The client of step S104 downloads encrypted documents from the server according to the index information, and further processes the index information, including the following steps: Integrating search strategy, matching degree, timeliness and user historical access records to sort the index uniformly and form an ordered index list; Generating a hash value of the ordered index list with the private key, then fusing timestamp, random number and public configuration, and obtaining server signature through asymmetric encryption; Calling a blockchain smart contract with the file name ciphertext to extract file historical processing records and corresponding block hash, and constructing a cross-block traceability chain to provide traceable source evidence for the index list; Encapsulating the ordered index list, server signature, traceability chain and integrity check value into a data packet, and implementing symmetric encryption on sensitive fields to generate an encrypted data packet to be returned; The client verifies the signature legality with the server public key, confirms no tampering by comparing the traceability chain block hash with the latest on-chain hash, decrypts the sensitive field, parses the ordered index, and completes the secure display.

4. The improved public key searchable encryption method of claim 1, wherein, The step S104 that the client downloads the encrypted document from the server according to the index information further comprises the following steps: S2041: Adjust the index information granularity according to the client device type, and the server identifies the client device identifier; S2042: The server extracts the decryption time consumption and high-frequency decryption error points of the matching file, generates a sequence suggestion, and attaches it at the end of the index information; S2043: The server generates 128-bit information from the sorted index information, sends it to the third-party storage node to obtain a storage number, embeds the storage number and the 128-bit information in the returned data, and the client queries the third-party node to verify the 128-bit information through the storage number; S2044: The server uses the client public key to encrypt the time limit key as a time limit lock, which is attached to the header of the index information, and the client decrypts the time to verify that the current time is within the valid period, and can only parse the index information; S2045: Embed the index integrity self-repairing guide in the returned data, the server generates independent check values for each field of the index, and the client can repair the index according to the guide if the index is damaged without re-requesting the server.

5. An improved public key searchable encryption system characterized in that, The system is used to implement the improved public key searchable encryption method of any one of claims 1 to 4; The system comprises: A key generation module for generating a public-private key pair, the public key being used for encrypting documents and keywords, and the private key being used for decrypting documents, generating search tokens, and deriving trapdoor information; A ciphertext generation module for encrypting keywords using the public key to generate searchable keyword ciphertexts, and storing the ciphertexts and encrypted documents in the server in association; A trapdoor matching module for receiving a search request input by a user and trapdoor information derived from the private key, performing a matching operation between the trapdoor and the keyword ciphertexts in the server, and returning index information of matching documents; A ciphertext decryption module for the client to download encrypted documents from the server according to the index information, and decrypting the documents using the private key to obtain original plaintext content; wherein the server processes the index information, including sorting the index based on a search strategy and user behavior, adjusting the index granularity according to the client device type, generating decryption sequence suggestions, and ensuring the integrity, authenticity, and timeliness of the index information through digital signature, blockchain traceability, third-party storage, and time limit lock mechanism; the client verifies the legality of the index information before downloading, and handles index damage according to the self-repairing guide.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the improved public key searchable encryption method of any one of claims 1 to 4 when executing the program.

Citation Information

Patent Citations

  • Searchable medical data sharing method capable of resisting internal keyword guessing attack

    CN115473743A

  • Searchable group sharing privacy protection block chain system and method based on public key encryption

    CN118282715A