Attribute-based encryption anti-quantum ciphertext retrieval method, device and medium

Through quantum-resistant attribute-based encryption technology based on lattice cryptography, files and keywords are encrypted to generate quantum-resistant file ciphertext and keyword ciphertext, which solves the data leakage risk of existing solutions in quantum computing environments and realizes fine-grained access control and data security.

CN120602233BActive Publication Date: 2025-10-21中电信量子信息科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511093642.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-10-21
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

The existing combination of searchable encryption and attribute-based encryption does not introduce post-quantum secure cryptographic construction, making it difficult to resist attacks from quantum computers, resulting in a high risk of data leakage.

Method used

It adopts quantum-resistant attribute-based encryption technology based on lattice cryptography, encrypts files and keywords by generating quantum-resistant attribute-based public keys and user private keys, combines threshold access structure to generate file ciphertext and keyword ciphertext, and introduces hash functions and signature information to ensure quantum-resistant security and fine-grained access control of data.

Benefits of technology

It achieves long-term data security and fine-grained access control in a quantum computing environment, reduces the risk of data leakage, and meets the data security and access efficiency requirements in complex application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602233B_ABST
    Figure CN120602233B_ABST
Patent Text Reader

Abstract

The application provides an attribute encryption-based anti-quantum ciphertext retrieval method and device and medium, and relates to the technical field of information security. The method comprises the following steps: encrypting each keyword in each file according to a user public key to generate keyword ciphertext of each keyword; querying, for each keyword, a file identifier set comprising each keyword to generate a file identifier set of each keyword; generating keyword signature information of each keyword according to the user public key, a user private key and the file identifier set of each keyword; generating an encrypted index of each file according to file ciphertext of each file and keyword ciphertext of all keywords in each file; generating target signature information of each keyword according to the keyword ciphertext of each keyword and the keyword signature information of each keyword; uploading the encrypted index of each file to a cloud server; and uploading the target signature information of each keyword to an authority. The application solves the security risks of traditional schemes in a quantum computing environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and more specifically, to a method, device, and medium for quantum-resistant ciphertext retrieval based on attribute encryption. Background Art

[0002] In recent years, to further meet the dual demands of data security and access efficiency in complex application scenarios, researchers have attempted to combine searchable encryption (SE) with attribute-based encryption (ABE), hoping to construct a comprehensive solution that enables both encrypted data search and fine-grained access control. However, existing combined solutions have significant drawbacks. Current combined SE and ABE solutions generally lack post-quantum-secure cryptographic constructions, making them vulnerable to attacks on encrypted data using the powerful computing power of quantum computers. Once quantum computers are deployed on a large scale, the data protected by these solutions will face an extremely high risk of leakage.

[0003] In summary, the existing combination of searchable encryption and attribute-based encryption has security deficiencies, and a new technical solution is urgently needed to solve these problems and adapt to the ever-evolving information security needs. Summary of the Invention

[0004] In response to the above-mentioned deficiencies in the prior art, the present application provides a quantum-resistant ciphertext retrieval method, device and medium based on attribute encryption to solve the problems existing in the prior art.

[0005] The technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, an embodiment of the present application provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which is applied to a data owner. The method includes:

[0007] Obtain the user's public key, private key, and quantum-resistant base public key sent by the authority;

[0008] Encrypting each file in the file set according to the quantum-resistant base public key and a preset threshold access structure to generate a file ciphertext of each file;

[0009] Encrypting each keyword in each file according to the user public key to generate a keyword ciphertext of each keyword;

[0010] For each keyword, query the file identification including each keyword to generate a file identification set for each keyword;

[0011] Generating keyword signature information of each keyword according to the user public key, the user private key and the file identification set of each keyword;

[0012] generating an encryption index for each file according to the file ciphertext of each file and the keyword ciphertext of all keywords in each file;

[0013] Generate target signature information for each keyword according to the keyword ciphertext of each keyword and the keyword signature information of each keyword;

[0014] Uploading the encrypted index of each file to the cloud server;

[0015] The target signature information of each keyword is uploaded to the authority.

[0016] In one embodiment, the threshold access structure includes: a set of access policy attributes, a threshold value of a minimum number of attributes that must be met for decryption;

[0017] The step of encrypting each file in the file set according to the quantum-resistant base public key and the threshold access structure to generate a ciphertext of each file includes:

[0018] Encrypting the file contents of each file according to the quantum-resistant base public key to generate a ciphertext component of each file;

[0019] The access policy attribute set is encrypted according to the quantum-resistant attribute base public key and the minimum attribute quantity threshold to generate an attribute ciphertext component, and the file ciphertext of each file includes: a message ciphertext component of each file and the attribute ciphertext component.

[0020] In one embodiment, encrypting each keyword in each file according to the user public key to generate a keyword ciphertext of each keyword includes:

[0021] Calculating the auxiliary value of each keyword according to the minimum attribute quantity threshold and each keyword;

[0022] Generate a keyword ciphertext for each keyword according to the auxiliary value of each keyword and the user public key.

[0023] In one embodiment, the user public key and the user private key are the user public key and the user private key generated by the authority based on the user attribute label using a preset quantum-resistant cryptographic algorithm.

[0024] In a second aspect, the present application provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which is applied to data retrieval users. The method includes:

[0025] Obtain the user's public key, user's private key, and target signature information of the target keyword sent by the authority;

[0026] generating an auxiliary value of the target keyword according to a minimum quantity threshold in a preset threshold access structure and the target keyword;

[0027] Generate a search token for the target keyword based on the user public key, the user private key, and the auxiliary value of the target keyword;

[0028] Sending the search token to a cloud server, so that the cloud server performs an encrypted search based on the search token to obtain a file ciphertext result set, wherein the file ciphertext result set includes: a file ciphertext of a target file having the target keyword;

[0029] Obtain the file ciphertext result set returned by the cloud server;

[0030] The target file in the file ciphertext result set is verified according to the own access attribute set and the target signature information of the target keyword.

[0031] In one embodiment, verifying the target file in the file ciphertext result set based on the own access attribute set and the target signature information of the target keyword includes:

[0032] Sending the own access attribute set to the authority, so that the authority generates a quantum-resistant attribute base private key based on the quantum-resistant attribute base master key, the quantum-resistant attribute base public key, and the own access attribute set; wherein the quantum-resistant attribute base master key and the quantum-resistant attribute base public key are the quantum-resistant attribute base master key and the quantum-resistant attribute base public key generated by the authority based on preset public parameters;

[0033] Receiving the quantum-resistant base private key returned by the authority;

[0034] Decrypting the ciphertext of the target file using the quantum-resistant base private key to obtain a plaintext document of the target file and a file identifier of the target file;

[0035] The integrity of the target file in the file ciphertext result set is verified according to the keyword signature information of the target keyword in the target signature information of the target keyword, the user public key, and the file identifier of the target file.

[0036] In a third aspect, the present application provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which is applied to a cloud server. The method includes:

[0037] Receiving a search token for a target keyword sent by a data retrieval user, wherein the search token is a search token generated according to a user public key, a user private key, and an auxiliary value of the target keyword;

[0038] Performing an encrypted search based on the search token to obtain a file ciphertext result set, the file ciphertext result set including: a file ciphertext of a target file having the target keyword;

[0039] The file ciphertext result set is sent to the data retrieval user, so that the data retrieval user verifies the target file in the file ciphertext result set.

[0040] In one embodiment, performing encrypted retrieval based on the search token to obtain a file ciphertext result set includes:

[0041] Determining matching retrieval information between each file and the search token based on the search token and the keyword ciphertexts of all keywords in the encrypted index of each file;

[0042] Determining the target file that meets the preset search matching condition based on the matching retrieval information between the files and the search token;

[0043] The file ciphertext result set is generated according to the file ciphertext of the target file in the encryption index of the target file.

[0044] In a fourth aspect, the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to implement the quantum-resistant ciphertext retrieval method based on attribute encryption as described in any of the above embodiments.

[0045] In a fifth aspect, the present application provides a readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the quantum-resistant ciphertext retrieval method based on attribute encryption described in any of the above embodiments is implemented.

[0046] The beneficial effects of the present application are as follows: the present application provides a quantum-resistant ciphertext retrieval method based on attribute encryption. The method designs a searchable encryption framework based on lattice cryptography, combines attribute-based encryption technology on an ideal lattice, and constructs a ciphertext retrieval system that integrates quantum-resistant security and fine-grained access control. It can ensure long-term data security through lattice cryptography, and solves the security risks of traditional solutions in a quantum computing environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 Schematic diagram of the structure of the quantum-resistant ciphertext retrieval system based on attribute encryption provided by this application;

[0049] Figure 2 One of the flow charts of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in an embodiment of the present application;

[0050] Figure 3 The second flowchart of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in an embodiment of the present application;

[0051] Figure 4 The third flowchart of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in an embodiment of the present application;

[0052] Figure 5 Flowchart 4 of the method for quantum-resistant ciphertext retrieval based on attribute encryption provided in an embodiment of the present application;

[0053] Figure 6 Flowchart 5 of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in an embodiment of the present application;

[0054] Figure 7 Flowchart 6 of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in an embodiment of the present application;

[0055] Figure 8 Flowchart 7 of the method for quantum-resistant ciphertext retrieval based on attribute encryption provided in an embodiment of the present application;

[0056] Figure 9 One of the structural diagrams of the quantum-resistant ciphertext retrieval device based on attribute encryption provided in an embodiment of the present application;

[0057] Figure 10 The second structural diagram of the quantum-resistant ciphertext retrieval device based on attribute encryption provided in an embodiment of the present application;

[0058] Figure 11 The third structural diagram of the quantum-resistant ciphertext retrieval device based on attribute encryption provided in an embodiment of the present application;

[0059] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0061] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0062] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0063] It should be noted that, in the absence of conflict, the features in the embodiments of this application can be combined with each other.

[0064] In the field of information security, data encryption, storage, and efficient retrieval are key research areas. Searchable Encryption (SE), a key technical approach, allows users to search encrypted files by keyword without decrypting the data. This feature ensures data confidentiality while enabling convenient access to required information in scenarios like cloud storage, effectively addressing the difficulty of retrieving ciphertext data with traditional encryption methods.

[0065] Attribute-Based Encryption (ABE) is an advanced cryptographic technology that supports fine-grained access control. Its core approach is to incorporate user or data attributes into the encryption process, ensuring that only users who meet specific access policies can successfully decrypt the data. For example, in medical data management, doctors can access patient records within their authorized permissions using a key composed of attributes such as "department" and "professional title." However, other personnel, such as nurses, cannot access the corresponding data because their attributes do not meet the policy requirements. This significantly improves the security and flexibility of data access.

[0066] In recent years, to further meet the dual needs of data security and access efficiency in complex application scenarios, researchers have attempted to combine searchable encryption (SE) with attribute-based encryption (ABE). However, current searchable encryption and attribute-based encryption combination schemes generally do not introduce post-quantum secure cryptographic constructions, and are unable to resist attacks on encrypted data by the powerful computing power of quantum computers. Once quantum computers are applied on a large scale, the data protected by these schemes will face extremely high risks of leakage.

[0067] To address the above issues, an embodiment of the present application provides a quantum-resistant ciphertext retrieval method based on attribute encryption. This method can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a terminal-oriented computer device or a back-end server.

[0068] The following is a specific example description of the quantum-resistant ciphertext retrieval method based on attribute encryption provided by this application through multiple examples in combination with the accompanying drawings.

[0069] Figure 1 The schematic diagram of the structure of the quantum-resistant ciphertext retrieval system based on attribute encryption provided by this application is as follows: Figure 1 As shown in Figure 3, the system consists of the following four entities: authority, data owner, cloud server, and data retrieval user. The arrows represent the direction of transmission.

[0070] Among them, the authoritative organization is responsible for generating system parameters, managing attributes, keys and signature information; the data owner is responsible for encrypting files and keywords, generating encrypted indexes and signature information, where the encrypted index is uploaded to the cloud server and the signature information is submitted to the authoritative organization; the cloud server is responsible for storing encrypted data, performing search operations, and sending search results to data retrieval users, but some results may be missed; the data retrieval user is responsible for generating search tokens, sending them to the cloud server, and verifying the integrity of the results returned by the cloud server.

[0071] The following combination Figure 2-Figure 4,First, the method performed by the data owner is described, Figure 2 One of the flow charts of the quantum-resistant ciphertext retrieval method based on attribute encryption provided in the embodiment of the present application is as follows: Figure 2 As shown, the method includes S101-S109:

[0072] S101. Obtain the user public key, user private key, and quantum-resistant attribute base public key sent by the authority.

[0073] The user's public key and private key are generated by an authority based on the user's attribute tags using a preset quantum-resistant cryptographic algorithm. This preset quantum-resistant cryptographic algorithm can be, for example, quantum-resistant lattice-based encryption (LBC). Lattice cryptography is a core branch of post-quantum cryptography. Its security is based on difficult lattice problems, such as the LWE problem and the R-LWE problem, which are still considered intractable using quantum computers.

[0074] Specifically, the authority uses a method of generating a user public key and a user private key using a preset quantum-resistant cryptographic algorithm, as well as a quantum-resistant attribute-based public key, as shown in S11-S17 below:

[0075] First, according to S11-S14, using quantum-resistant lattice cryptography, the authority inputs security parameters, generates lattice basis parameters, attribute basis public keys, attribute basis master keys, and defines a hash function. Simultaneously, a uniform random matrix and short basis are generated, ultimately outputting public parameters and a master key, providing the foundation for the entire system.

[0076] S11. The authority inputs security parameters and generates lattice parameters , quantum-resistant property-based public key and quantum-resistant master key .

[0077] The security parameter is a positive integer, usually denoted by λ. It is a basic indicator for quantifying the security level of a system and directly determines the ability of a cryptographic system to resist attacks (including quantum attacks). A larger λ value indicates a higher security level, while a smaller λ value indicates a lower security level. is a prime number, is the Gaussian parameter, is an auxiliary parameter, and All are positive integers.

[0078] Quantum-resistant public key , quantum-resistant master key The generation steps are based on the LWE problem on the ring of lattice theory. Specifically, the authority first defines a polynomial ring with a specific structure based on the security parameter, and calls the trapdoor generation algorithm based on the ideal lattice to generate a uniformly distributed polynomial vector and its corresponding lattice short basis as the core secret of the system. Subsequently, the set of all real attributes of the system is defined, and an additional set of virtual attribute sets is generated to merge with it to support flexible threshold access control. Then, a uniformly distributed polynomial vector is randomly generated for each merged attribute, and the core public polynomial vector is randomly selected. Finally, the authority outputs the quantum-resistant attribute base public key , contains all the aforementioned public parameters and polynomial vectors, and outputs the attribute base master key , which is the core lattice short basis. The entire key generation process relies entirely on the ideal lattice structure and the difficulty of the fault-tolerant learning problem on the ring, ensuring that the scheme is capable of resisting future quantum computer attacks.

[0079] S12. Authoritative organization defines hash function 、 ,in is a positive integer, The representative length is The binary string, Represents a binary string of arbitrary length, Representative Model of The space of integer matrices of order , Representative Model of -dimensional integer vector space.

[0080] S13. Authoritative Execution Algorithm TrapGen Generate a uniform random matrix Pass The corresponding short base ,in Representative Model of integer matrix, and choose uniform random vectors .

[0081] S14: After the above steps S11-S13, the authority outputs the public parameters and master key .in, is a positive integer.

[0082] Then, according to S15-S17, the authority inputs the public parameters, master key and user attribute tag to generate the user public key and user private key. The user public key and user private key are used for subsequent data encryption and decryption operations to ensure the uniqueness and security of the user identity.

[0083] S15. Authoritative organization inputs public parameters , master key and User Attributes Tags , calculate the matrix .

[0084] S16. Authoritative organizations implement BasisDel Generator Short base ,in .

[0085] S17. The authority outputs the user's public key and the user's private key .

[0086] In this embodiment, the data owner can obtain the , user private key , and quantum-resistant public key .

[0087] S102: Encrypt each file in the file set according to the quantum-resistant base public key and the preset threshold access structure to generate a file ciphertext for each file.

[0088] The data owner then enters the public parameters , User Attributes Tag , file set , keyword set , quantum-resistant property-based public key and threshold access structure .

[0089] Based on quantum-resistant properties , and the preset threshold access structure , for the file set The files in , execute the quantum-resistant attribute-based encryption algorithm ABE.Enc Encrypt and generate ciphertext for each file Among them, the threshold access structure Includes: Access policy attribute collection , the minimum number of attributes required for decryption .

[0090] For example, if t=2, it means that both Any two attributes in. For example, in the medical scenario, ={Department of Cardiology, Chief Physician, Non-Emergency} and t=2, the user must meet both attributes to decrypt.

[0091] S103: Encrypt each keyword in each file according to the user's public key to generate a keyword ciphertext for each keyword.

[0092] Data owner for each file Each keyword in , encrypt and generate each keyword Keyword ciphertext .

[0093] S104: For each keyword, query the file identification including each keyword to generate a file identification set for each keyword.

[0094] By keyword For example, the data owner has a keyword , the query includes the keyword File identification id: . And generate keywords File identification set Repeat the above operation for each keyword to obtain the file identification set for each keyword.

[0095] S105: Generate keyword signature information of each keyword according to the user public key, the user private key and the file identification set of each keyword.

[0096] By keyword For example, the data owner uses the user's public key , user private key and keywords File identification set , execute SamplePre , generate signatures and keywords Bound keyword signature information , so that it satisfies Repeat the above operation for each keyword to obtain the keyword signature information of each keyword.

[0097] S106 : Generate an encryption index for each file based on the file ciphertext of each file and the keyword ciphertext of all keywords in each file.

[0098] The data owner uses the file ciphertext of each file and the keyword ciphertext of all keywords in each file , output the encrypted index of each file , the encrypted index is used for subsequent search and matching.

[0099] S107: Generate target signature information for each keyword based on the keyword ciphertext of each keyword and the keyword signature information of each keyword.

[0100] By keyword For example, the data owner uses keywords Keyword ciphertext and keywords Keyword signature information , output keywords Target signature information ,The target signature information is used to verify the integrity and reliability of the data, ensuring the security and credibility of the data.,Repeat the above operation for each keyword to obtain the target signature information of each keyword.

[0101] S108: Upload the encrypted index of each file to the cloud server.

[0102] Encrypted index of each file Upload to the cloud server.

[0103] S109: Upload the target signature information of each keyword to an authoritative organization.

[0104] The target signature information of each keyword Upload to the authority.

[0105] In summary, the embodiments of the present application provide a quantum-resistant ciphertext retrieval method based on attribute encryption, which has multiple benefits:

[0106] At the technical architecture level, a searchable encryption framework based on lattice theory is built, innovatively integrating attribute-based encryption techniques on ideal lattices to create a ciphertext retrieval system that combines quantum security with fine-grained access control. This architectural design overcomes the technical limitations of traditional encryption and retrieval solutions. By deeply combining the quantum-resistant properties of lattice cryptography with the flexible permission management of attribute-based encryption, it is adaptable to ciphertext retrieval in the quantum computing era.

[0107] From a security perspective, this approach directly addresses the core security vulnerability of traditional solutions in a quantum computing environment—the risk that existing encryption mechanisms based on mathematical problems such as large integer factorization and discrete logarithms can be effectively cracked by quantum algorithms. Leveraging the quantum-resistant properties of lattice cryptography, it provides fundamental security for long-term storage of sensitive data, ensuring that the confidentiality of ciphertext data and the security of retrieval processes can be maintained even in the face of the rapid development of quantum computing technology in the future.

[0108] In terms of practical application value, this method achieves quantum security while also enabling fine-grained access control for ciphertext retrieval through attribute-based encryption. This means that data owners can flexibly set access permissions based on user attributes, satisfying the need for convenient data sharing in cloud environments while strengthening the system's anti-attack capabilities through the mathematical foundations of lattice theory. This provides a secure and practical ciphertext retrieval solution for sectors such as government, finance, and healthcare, which have extremely high requirements for data security and rights management, and lays a solid technical foundation for long-term data security protection.

[0109] In one embodiment, if Figure 3 As shown, the process of S102 encrypts each file in the file set according to the quantum-resistant public key and the threshold access structure to generate the ciphertext of each file, including:

[0110] S201. Encrypt the file content of each file according to the quantum-resistant base public key to generate a ciphertext component of each file.

[0111] Based on quantum-resistant properties , encrypt the file contents of each file and generate the message ciphertext component of each file , which is the ciphertext corresponding to the file content.

[0112] This encryption process operates on a polynomial ring and achieves quantum-resistance based on the difficulty of the R-LWE problem. Specifically, the file content is first encoded into a form suitable for processing on the polynomial ring. Next, the specified threshold access policy is expanded by adding a preset number of virtual attributes, expanding the original policy attribute set to a larger set of attributes. This is the key quantum-resistance feature for efficient threshold control. A core encryption vector is then randomly selected on the polynomial ring, and a noise vector conforming to a Gaussian distribution is introduced. For each attribute in the expanded policy, the data owner generates a specific attribute association vector and calculates the corresponding ciphertext component in combination with random noise. Simultaneously, the file message itself is encrypted and embedded in a ring element consisting of the public polynomial vector, the encryption vector, the controlled noise, and the encoded information. The final output is the file ciphertext, which contains the ciphertext component of the message and the ciphertext components of all relevant attributes. This encryption process operates entirely on a quantum-resistant polynomial ring, and its security is rooted in the intractability of the hard problem on ideal lattices.

[0113] S202: Encrypt the access policy attribute set according to the quantum-resistant attribute base public key and the minimum attribute quantity threshold to generate an attribute ciphertext component.

[0114] Based on quantum-resistant properties , and the minimum attribute number threshold , access policy attribute set Encryption is performed to generate attribute ciphertext components, that is, the generation of keyword ciphertext components described in the above embodiment. process.

[0115] The ciphertext of each file in the above embodiment includes: the ciphertext component of each file and attribute ciphertext components (Keyword ciphertext).

[0116] exist Figure 3 Based on the embodiment shown, Figure 4 As shown, S103 encrypts each keyword in each file according to the user's public key to generate a keyword ciphertext for each keyword, including:

[0117] S301. Calculate the auxiliary value of each keyword based on the minimum attribute quantity threshold and each keyword.

[0118] Data owners are required to use a minimum attribute count threshold , and each keyword , calculate the auxiliary value of each keyword .

[0119] S302: Generate a keyword ciphertext for each keyword based on the auxiliary value of each keyword and the user's public key.

[0120] calculate 、 , mark keyword ciphertext ,in is a random vector, 、 is the Gaussian noise vector.

[0121] This application also provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which is applied to data retrieval users, such as Figure 5 As shown, the method includes:

[0122] S401: Obtain the user public key, user private key and target signature information of the target keyword sent by the authority.

[0123] Data retrieval users can obtain the user public key sent by the authority , user private key , and target keywords Target signature information . Is the target keyword The keyword ciphertext, Is the target keyword Keyword signature information.

[0124] S402: Generate an auxiliary value of the target keyword according to the minimum quantity threshold in the preset threshold access structure and the target keyword.

[0125] According to the minimum number threshold in the preset threshold access structure and target keywords , generate target keywords Auxiliary value , Target keywords The hash value of .

[0126] S403: Generate a search token for the target keyword based on the user public key, the user private key, and the auxiliary value of the target keyword.

[0127] Execute SamplePre , generate target keywords Search token ,satisfy .

[0128] S404: Send a search token to the cloud server, so that the cloud server performs an encrypted search based on the search token to obtain a ciphertext result set of the file.

[0129] The search token is used to initiate a search request to the cloud server to ensure the privacy and security of the search process. The data retrieval user sends the search token to the cloud server, and the cloud server can perform an encrypted search based on the search token to obtain a file ciphertext result set. The file ciphertext result set includes: The ciphertext of the target file.

[0130] S405: Obtain the file ciphertext result set returned by the cloud server.

[0131] S406: Verify the target file in the file ciphertext result set based on its own access attribute set and the target signature information of the target keyword.

[0132] In practice, due to non-malicious reasons such as technical failures and resource limitations, target files may be omitted from search results, meaning that matching files are not reported. Existing solutions lack effective means to verify the integrity of search results. This means users cannot be certain that the search results returned by storage devices such as cloud servers include all matching target files, potentially leading to the loss of important information and severely impacting the solution's applicability in scenarios requiring high data accuracy.

[0133] Therefore, it is necessary to verify the target file in the file ciphertext result set, specifically, Figure 6 As shown, the verification methods may include:

[0134] S501. Sending the own access attribute set to the authority, so that the authority generates the quantum-resistant attribute base private key according to the quantum-resistant attribute base master key, the quantum-resistant attribute base public key and the own access attribute set.

[0135] Among them, the quantum-resistant master key and quantum-resistant public key For authoritative organizations based on preset public parameters The generated quantum-resistant attribute base master key and quantum-resistant attribute base public key.

[0136] S502: Receive the quantum-resistant base private key returned by the authority.

[0137] Data retrieval user input file ciphertext result set Target keywords Target signature information , self-access attribute set , the authority receives the data retrieval user's own access attribute set After that, the quantum-resistant master key is distributed , generate quantum-resistant base private key , and use the quantum-resistant attribute as the base private key Sent to data users.

[0138] Generate quantum-resistant base private key The steps are based on lattice theory, specifically merging the user's real attribute set with all virtual attribute sets preset by the system to form an extended self-access attribute set , then based on the quantum-resistant public key A set of secret shared polynomials that satisfy specific interpolation conditions are constructed for each vector component, and the attribute set for access itself is For each attribute in the , calculate the value of the attribute on these polynomials to form the target vector corresponding to the attribute, then construct the attribute association vector for each attribute, call the key sampling algorithm based on the ideal lattice, and generate a key component vector for each attribute. The algorithm uses the lattice short basis as a trapdoor to ensure that the output key component vector not only accurately satisfies the specific mathematical relationship with the attribute target vector, but also obeys the discrete Gaussian distribution. Finally, the set of key component vectors of all attributes constitutes the user's quantum-resistant attribute base private key This process only requires a single lattice trapdoor to support key generation for all attributes, significantly improving efficiency while strictly ensuring the quantum security of the scheme.

[0139] S503: Decrypt the ciphertext of the target file using the quantum-resistant base private key to obtain the plaintext document of the target file and the file identifier of the target file.

[0140] Data retrieval users according to their own access attribute set , for the ciphertext of the target file , execute the quantum-resistant attribute-based decryption algorithm ABE.Dec , decrypt to obtain the plaintext document of the target file, and record the file identification id of the target file.

[0141] The steps of the attribute-based decryption algorithm are based on lattice theory. The specific steps are: first verify the access attribute set Whether the ciphertext's access policy is satisfied is determined by checking whether the intersection of the user's real attributes and the ciphertext's policy attributes reaches a threshold. Meeting the threshold means the intersection of the user's extended attribute set and the policy's extended attribute set is sufficiently large. A minimum authorized attribute subset is selected from this sufficiently large intersection, and the Lagrange interpolation coefficients corresponding to this subset are calculated. A specific combination of operations is then performed on the key components and ciphertext components corresponding to the selected attribute subset to obtain an intermediate polynomial ring element. Finally, each coefficient of this element is subjected to noise-resistant decoding. This involves determining whether the corresponding bit in the original file is 0 or 1 based on the coefficient's distance from half the modulus, thereby recovering the plaintext file. The entire decryption process relies on mathematical operations on an ideal lattice and noise-tolerance mechanisms. Its correctness is guaranteed by the properties of the R-LWE problem, forming a complete and efficient quantum-resistant decryption process.

[0142] S504: Perform integrity verification on the target file in the file ciphertext result set based on the keyword signature information of the target keyword in the target signature information of the target keyword, the user public key, and the file identifier of the target file.

[0143] Data user extracts document id: ,calculate Verify that the following equation holds: If the equation is true, output 1, indicating that the target file is complete. If the equation is not true, indicating that the target file is incomplete, the protocol is terminated.

[0144] This application also provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which is applied to cloud servers, such as Figure 7 As shown, the method includes:

[0145] S601: Receive a search token for a target keyword sent by a data retrieval user.

[0146] Among them, the search token is based on the user's public key , user private key , and target keywords Auxiliary value Generated search token .

[0147] S602: Perform encrypted retrieval based on the search token to obtain a file ciphertext result set.

[0148] The cloud server performs encrypted retrieval based on the search token to obtain a file ciphertext result set, which includes: the file ciphertext of the target file with the target keyword.

[0149] S603: Send the file ciphertext result set to the data retrieval user, so that the data retrieval user can verify the target file in the file ciphertext result set.

[0150] like Figure 8 As shown, the encrypted search is performed based on the search token in S602 to obtain a file ciphertext result set, including:

[0151] S701 : According to the search token and the keyword ciphertexts of all keywords in the encrypted index of each file, respectively determine the matching retrieval information of each file and the search token.

[0152] S702: Determine target files that meet preset search matching conditions based on matching retrieval information between each file and the search token.

[0153] S703: Generate a file ciphertext result set according to the file ciphertext of the target file in the encryption index of the target file.

[0154] Specifically, the cloud server inputs the encrypted index and search tokens , for each keyword in the encrypted index ,calculate ,judge Is it true? If so, encrypt the file Join result set , otherwise the agreement will be terminated.

[0155] In summary, this application provides a quantum-resistant ciphertext retrieval method based on attribute encryption, which has the following advantages:

[0156] 1. Design a searchable encryption framework based on lattice theory, combined with attribute-based encryption technology on ideal lattices, to build a ciphertext retrieval system that integrates quantum security and fine-grained access control. This system can ensure long-term data security through lattice cryptography and solve the security risks of traditional solutions in quantum computing environments.

[0157] 2. Through dynamic attribute policy expansion and threshold access mechanism, flexible retrieval permission control based on the user's own access attribute set is achieved to meet the refined permission requirements of sensitive data sharing scenarios.

[0158] 3. We introduce lattice sampling and hash chain technology, bind keywords and file identifiers through signatures, and design a verifiable mechanism. Users can verify the integrity and correctness of search results based on public keys. This reduces user reliance on cloud servers, improves the credibility and robustness of data sharing, and effectively addresses the problem of underreporting in careless server scenarios.

[0159] The following continues to explain the apparatus, device and storage medium for executing the quantum-resistant ciphertext retrieval method based on attribute encryption provided in any of the above embodiments of the present application. The specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, for the parts not mentioned in the following embodiments, please refer to the corresponding content in the method embodiments.

[0160] like Figure 9 As shown, the present application provides a quantum-resistant ciphertext retrieval device based on attribute encryption, which is applied to data owners. The device includes:

[0161] The first acquisition module 1 is used to obtain the user public key, user private key and quantum-resistant attribute base public key sent by the authority.

[0162] The first encryption module 2 is used to encrypt each file in the file set according to the quantum-resistant base public key and a preset threshold access structure to generate a file ciphertext of each file.

[0163] The second encryption module 3 is used to encrypt each keyword in each file according to the user public key to generate a keyword ciphertext of each keyword.

[0164] The first generating module 4 is configured to query, for each keyword, a file identifier including the keyword, and generate a file identifier set for the keyword.

[0165] The second generating module 5 is configured to generate keyword signature information of each keyword according to the user public key, the user private key and the file identification set of each keyword.

[0166] The third generating module 6 is configured to generate an encryption index for each file according to the file ciphertext of each file and the keyword ciphertext of all keywords in each file.

[0167] A fourth generating module 7, configured to generate target signature information for each keyword based on the keyword ciphertext of each keyword and the keyword signature information of each keyword;

[0168] The first uploading module 8 is used to upload the encrypted index of each file to the cloud server.

[0169] The second uploading module 9 is configured to upload the target signature information of each keyword to the authoritative organization.

[0170] Optionally, the threshold access structure includes: an access policy attribute set, and a minimum attribute quantity threshold that must be met for decryption; a first encryption module 2, used to encrypt the file content of each file according to the quantum-resistant attribute base public key to generate a message ciphertext component of each file; encrypt the access policy attribute set according to the quantum-resistant attribute base public key and the minimum attribute quantity threshold to generate an attribute ciphertext component, and the file ciphertext of each file includes: the message ciphertext component of each file and the attribute ciphertext component.

[0171] Optionally, the second encryption module 3 is used to calculate the auxiliary value of each keyword based on the minimum attribute quantity threshold and each keyword; and generate the keyword ciphertext of each keyword based on the auxiliary value of each keyword and the user public key.

[0172] like Figure 10 As shown, the present application provides a quantum-resistant ciphertext retrieval device based on attribute encryption, which is applied to data retrieval users. The device includes:

[0173] The second acquisition module 10 is used to obtain the user public key, the user private key and the target signature information of the target keyword sent by the authority.

[0174] The fifth generating module 11 is configured to generate an auxiliary value of the target keyword according to a preset minimum quantity threshold in the threshold access structure and the target keyword.

[0175] The sixth generating module 12 is configured to generate a search token for the target keyword based on the user public key, the user private key, and the auxiliary value of the target keyword.

[0176] The first sending module 13 is used to send the search token to the cloud server, so that the cloud server performs encrypted retrieval based on the search token to obtain a file ciphertext result set, wherein the file ciphertext result set includes: the file ciphertext of the target file having the target keyword.

[0177] The third acquisition module 14 is used to obtain the file ciphertext result set returned by the cloud server.

[0178] The verification module 15 is configured to verify the target file in the file ciphertext result set according to the own access attribute set and the target signature information of the target keyword.

[0179] Optionally, the verification module 15 is used to send the self-access attribute set to the authoritative agency, so that the authoritative agency generates a quantum-resistant attribute base private key based on the quantum-resistant attribute base master key, the quantum-resistant attribute base public key and the self-access attribute set; wherein the quantum-resistant attribute base master key and the quantum-resistant attribute base public key are the quantum-resistant attribute base master key and the quantum-resistant attribute base public key generated by the authoritative agency based on preset public parameters; receive the quantum-resistant attribute base private key returned by the authoritative agency; use the quantum-resistant attribute base private key to decrypt the ciphertext of the target file to obtain the plaintext document of the target file and the file identifier of the target file; and perform integrity verification on the target file in the file ciphertext result set based on the keyword signature information of the target keyword in the target signature information of the target keyword, the user public key, and the file identifier of the target file.

[0180] like Figure 11 As shown, the present application provides a quantum-resistant ciphertext retrieval device based on attribute encryption, which is applied to a cloud server. The device includes:

[0181] The receiving module 16 is configured to receive a search token of a target keyword sent by a data retrieval user, wherein the search token is a search token generated based on a user public key, a user private key, and an auxiliary value of the target keyword.

[0182] The retrieval module 17 is configured to perform encrypted retrieval based on the search token to obtain a file ciphertext result set, wherein the file ciphertext result set includes: the file ciphertext of the target file having the target keyword.

[0183] The second sending module 18 is configured to send the file ciphertext result set to the data search user, so that the data search user can verify the target file in the file ciphertext result set.

[0184] Optionally, the retrieval module 17 is used to determine the matching retrieval information of each file and the search token based on the search token and the keyword ciphertext of all keywords in the encrypted index of each file; determine the target file that meets the preset retrieval matching conditions based on the matching retrieval information of each file and the search token; and generate the file ciphertext result set based on the file ciphertext of the target file in the encrypted index of the target file.

[0185] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0186] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0187] like Figure 12 As shown, the present application also provides an electronic device, including a processor 100, a storage medium 200 and a bus 300, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions.

[0188] When the electronic device is the terminal device of the data owner, any quantum-resistant ciphertext retrieval method based on attribute encryption corresponding to the data owner is implemented; when the electronic device is the terminal device of the data retrieval user, any quantum-resistant ciphertext retrieval method based on attribute encryption corresponding to the data retrieval user is implemented; when the electronic device is a cloud server, any quantum-resistant ciphertext retrieval method based on attribute encryption corresponding to the cloud server is implemented.

[0189] The present application also provides a readable storage medium having program instructions stored thereon. When the program instructions are executed by a processor, the method for quantum-resistant ciphertext retrieval based on attribute encryption described in any of the above embodiments is implemented.

[0190] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0191] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0192] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0193] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a disk or an optical disk, and other media that can store program code.

[0194] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A quantum-resistant ciphertext retrieval method based on attribute encryption, characterized in that: Applied to the data owner, the method includes: Using quantum-resistant lattice cryptography, the authority inputs security parameters, generates lattice basis parameters, attribute basis public keys, attribute basis master keys, and defines a hash function. At the same time, it generates a uniform random matrix and a short basis, and ultimately outputs public parameters and a master key. Obtain the user's public key, private key, and quantum-resistant base public key sent by the authority; Encrypting each file in the file set according to the quantum-resistant base public key and a preset threshold access structure to generate a file ciphertext of each file; Encrypting each keyword in each file according to the user public key to generate a keyword ciphertext of each keyword; For each keyword, query the file identification including each keyword to generate a file identification set for each keyword; Generate keyword signature information for each keyword based on the user public key, the user private key, and the file identification set of each keyword; generating an encryption index for each file according to the file ciphertext of each file and the keyword ciphertext of all keywords in each file; Generate target signature information for each keyword according to the keyword ciphertext of each keyword and the keyword signature information of each keyword; Uploading the encrypted index of each file to the cloud server; The target signature information of each keyword is uploaded to the authority.

2. The method according to claim 1, characterized in that The threshold access structure includes: a set of access policy attributes, a threshold value of the minimum number of attributes that must be met for decryption; The step of encrypting each file in the file set according to the quantum-resistant base public key and the threshold access structure to generate a ciphertext of each file includes: Encrypting the file contents of each file according to the quantum-resistant base public key to generate a ciphertext component of each file; The access policy attribute set is encrypted according to the quantum-resistant attribute base public key and the minimum attribute quantity threshold to generate an attribute ciphertext component, and the file ciphertext of each file includes: a message ciphertext component of each file and the attribute ciphertext component.

3. The method according to claim 2, characterized in that The step of encrypting each keyword in each file according to the user public key to generate a keyword ciphertext of each keyword includes: Calculating the auxiliary value of each keyword according to the minimum attribute quantity threshold and each keyword; Generate a keyword ciphertext for each keyword according to the auxiliary value of each keyword and the user public key.

4. The method according to claim 1, wherein The user public key and the user private key are the user public key and the user private key generated by the authority based on the user attribute tag using a preset quantum-resistant cryptographic algorithm.

5. A quantum-resistant ciphertext retrieval method based on attribute encryption, characterized in that: Applied to data retrieval users, the method includes: Using quantum-resistant lattice cryptography, the authority inputs security parameters, generates lattice basis parameters, attribute basis public keys, attribute basis master keys, and defines a hash function. At the same time, it generates a uniform random matrix and a short basis, and ultimately outputs public parameters and a master key. Obtain the user's public key, the user's private key, and the target signature information of the target keyword sent by the authority; wherein the target signature information of the target keyword is the target signature information generated and uploaded to the authority by the data owner using the quantum-resistant ciphertext retrieval method based on attribute encryption as described in claim 1 above; generating an auxiliary value of the target keyword according to a minimum quantity threshold in a preset threshold access structure and the target keyword; Generate a search token for the target keyword based on the user public key, the user private key, and the auxiliary value of the target keyword; Sending the search token to the cloud server, so that the cloud server performs an encrypted search on the encrypted index of each file in the file set based on the search token, and obtains a file ciphertext result set, wherein the file ciphertext result set includes: the file ciphertext of the target file having the target keyword; wherein the encrypted index of each file is an encrypted index generated by the data owner using the quantum-resistant ciphertext retrieval method based on attribute encryption as described in claim 1 above, based on the file ciphertext of each file and the keyword ciphertext of all keywords in each file, and uploaded to the cloud server; Obtain the file ciphertext result set returned by the cloud server; The target file in the file ciphertext result set is verified according to its own access attribute set and the target signature information of the target keyword.

6. The method according to claim 5, characterized in that The verifying of the target file in the file ciphertext result set according to the own access attribute set and the target signature information of the target keyword includes: Sending the own access attribute set to the authority, so that the authority generates a quantum-resistant attribute base private key based on the quantum-resistant attribute base master key, the quantum-resistant attribute base public key, and the own access attribute set; wherein the quantum-resistant attribute base master key and the quantum-resistant attribute base public key are the quantum-resistant attribute base master key and the quantum-resistant attribute base public key generated by the authority based on preset public parameters; Receiving the quantum-resistant base private key returned by the authority; Decrypting the ciphertext of the target file using the quantum-resistant base private key to obtain a plaintext document of the target file and a file identifier of the target file; The integrity of the target file in the file ciphertext result set is verified according to the keyword signature information of the target keyword in the target signature information of the target keyword, the user public key, and the file identifier of the target file.

7. A quantum-resistant ciphertext retrieval method based on attribute encryption, characterized in that: Applied to a cloud server, the method includes: Using quantum-resistant lattice cryptography, the authority inputs security parameters, generates lattice basis parameters, attribute basis public keys, attribute basis master keys, and defines a hash function. At the same time, it generates a uniform random matrix and a short basis, and ultimately outputs public parameters and a master key. Receiving a search token for a target keyword sent by a data retrieval user, wherein the search token is a search token generated according to a user public key, a user private key, and an auxiliary value of the target keyword; Performing an encrypted search based on the search token, obtaining a file ciphertext result set for the encrypted index of each file, the file ciphertext result set including: the file ciphertext of the target file having the target keyword; wherein the encrypted index of each file is generated by the data owner using the quantum-resistant ciphertext retrieval method based on attribute encryption as described in claim 1 above, based on the file ciphertext of each file and the keyword ciphertext of all keywords in each file, and uploaded to the cloud server; The file ciphertext result set is sent to the data retrieval user, so that the data retrieval user verifies the target file in the file ciphertext result set.

8. The method according to claim 7, characterized in that The encrypted search is performed based on the search token to obtain a file ciphertext result set, including: Determining matching retrieval information between each file and the search token based on the search token and the keyword ciphertexts of all keywords in the encrypted index of each file; Determining the target file that meets the preset search matching condition based on the matching retrieval information between the files and the search token; The file ciphertext result set is generated according to the file ciphertext of the target file in the encryption index of the target file.

9. An electronic device, characterized in that: include: A processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to implement the quantum-resistant ciphertext retrieval method based on attribute encryption as described in any one of claims 1 to 8.

10. A readable storage medium, characterized in that: The readable storage medium stores program instructions, and when the program instructions are executed by a processor, the quantum-resistant ciphertext retrieval method based on attribute encryption according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Lattice-supported fully homomorphic short ciphertext attribute-based encryption method and system

    CN111970106A

  • Improved block chain proxy re-encryption method and system based on lattice password

    CN117118600A