SM9-based identity-based searchable public key encryption method and system

By using an identity-based searchable public key encryption method based on SM9 and employing user identity identifiers as public keys, this method simplifies certificate management and combines an implicit binding mechanism of indexes and trapdoors. This solves the problems of complex certificate management, lack of compatibility with national cryptographic standards, and weak resistance to internal attacks in existing technologies, and achieves efficient and secure ciphertext retrieval.

CN121864309APending Publication Date: 2026-04-14NANJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202610338647.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing searchable public key encryption schemes suffer from problems such as complex certificate management, lack of compatibility with national cryptographic algorithms, and weak resistance to internal keyword guessing attacks, resulting in low efficiency and insufficient security of encrypted retrieval in cloud storage environments.

Method used

It adopts an identity-based searchable public key encryption method based on SM9, using the user's identity identifier as the public key, and generating system parameters and private keys through the Key Generation Center (KGC). Combined with the implicit binding mechanism of index and trapdoor, it realizes the generation of keyword index and trapdoor. Only the legitimate recipient can generate a valid trapdoor, thus resisting internal attacks.

Benefits of technology

It simplifies the certificate management process, enhances the application of national cryptographic algorithms in the field of encrypted text retrieval, improves the system's security and efficiency, and effectively resists internal keyword guessing attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864309A_ABST
    Figure CN121864309A_ABST
Patent Text Reader

Abstract

The invention provides an SM9-based identity-based searchable public key encryption method and an SM9-based identity-based searchable public key encryption system. The system comprises a key generation center, a cloud storage server and a file sending and receiving party. A secret key generation center generates system public and private keys by using an SM9 algorithm, and generates a private key for a user in combination with identity information of the user. The file sender uses the user identity of the receiver and the file keyword to generate a keyword index and uploads the keyword index to the cloud server; when a receiver retrieves the file, the auxiliary parameters in the index are firstly obtained from the cloud server, then a keyword trap door is generated through a private key of the receiver, and the keyword trap door is uploaded to the cloud server; and the server compares the index with the trap door through a matching algorithm, and returns a corresponding ciphertext file to a receiver for decryption if matching succeeds. The secret key generation method is consistent with an SM9 algorithm, the application field of SM9 is expanded, and the safe and efficient searchable public key encryption method which does not need certificate management and can effectively resist internal keyword guessing attacks is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of secure storage and encrypted text retrieval technology, specifically to an identity-based searchable public key encryption method and system based on SM9. The method is based on the national cryptographic SM9 identifier algorithm and is suitable for encrypted keyword retrieval scenarios in cloud environments, enabling secure and efficient encrypted text retrieval without certificate management. Background Technology

[0002] With the development of cloud computing technology, cloud storage has been widely used due to its advantages such as scalability and sharing. However, data privacy and security issues in the cloud are becoming increasingly prominent. Encryption is a key means of protecting data privacy; however, traditional encryption leads to "ciphertext not being searchable"—users who want to retrieve encrypted data need to download the entire ciphertext and then decrypt it locally. This consumes a lot of network bandwidth and wastes local resources, making efficient ciphertext retrieval a problem that urgently needs to be solved.

[0003] In 2004, Boneh proposed the Searchable Public-Key Encryption (PEKS) method, which allows direct keyword retrieval in encrypted form. A typical process is as follows: the sender encrypts the data and uses the recipient's public key to generate a keyword search using an indexing algorithm; the recipient uses their private key to generate a keyword trapdoor and sends it to the cloud; the cloud verifies whether the index matches the keywords in the trapdoor and returns the corresponding results to the recipient, achieving efficient retrieval while protecting privacy. However, after years of development, existing solutions still have significant shortcomings in practical applications:

[0004] 1. Redundancy in certificate management: Mainstream solutions are built on public key infrastructure (PKI), which requires the establishment of a complex certificate application, issuance, revocation and verification system, increasing the system deployment and maintenance costs, especially for resource-constrained scenarios; while based on identity cryptography system (IBC), the user identity identifier (such as email) is used directly as the public key, eliminating the need for full lifecycle management of certificates, simplifying the process, adapting to resource-constrained scenarios, and reducing deployment and maintenance costs;

[0005] 2. Lack of compatibility with national cryptographic algorithms: Existing solutions mostly rely on non-national cryptographic algorithms such as RSA and ECC, and do not integrate commercial cryptographic standards such as SM2 and SM9. SM9, as an independently developed identity-based cryptographic standard, combines security and ease of use, but its application in the field of searchable encryption currently has many problems, which limits the application expansion of national cryptographic algorithms.

[0006] 3. Weak resistance to internal attacks: The keyword set is usually a finite set. As the retrieval execution entity, the cloud server can enumerate keywords to generate an index and match it with thresholds, launching an internal keyword guessing attack (KGA). Existing PEKS solutions are difficult to effectively defend against this type of attack, posing a risk of sensitive information leakage. To combat this attack, Authenticated Searchable Public Key Encryption (PAEKS) was proposed. The sender adds its own private key information when generating the index; while the receiver adds the sender's public key information when generating the keyword thresholds. PAEKS can effectively resist internal KGA attacks, but the generation of the index and trapdoors requires the participation of more key parameters.

[0007] In view of this, this application proposes an identity-based searchable public key encryption method based on SM9. The generation of keyword index and trapdoor in the method belongs to the PEKS method, but it can effectively resist internal keyword guessing attacks.

[0008] Regarding the application of the SM9 identifier algorithm in the field of searchable encryption, there are currently two patents: Chinese Patent CN114928440A "A Searchable Encryption Method and System Based on SM9" and Chinese Patent CN114142996B "A Searchable Encryption Method Based on SM9 Cryptographic Algorithm". The technical differences between this invention and these two patents are as follows:

[0009] 1. Technical comparison between this application and Chinese Patent CN114928440A "Authentication Searchable Encryption Method and System Based on SM9":

[0010] (1) CN114928440A proposes an SM9-based authenticated searchable encryption method. This patent's design differs significantly from SM9; the method falls under the PKI cryptographic system rather than an identity-based cryptographic system. In contrast, the key parameters of this invention are entirely based on the SM9 algorithm, using the user's identity directly as the public key. No certificate management is required; the private key is generated by the key generation center, greatly simplifying the key management process. Therefore, the key generation algorithm, keyword index, and trapdoor design in this application differ from those in patent CN114928440A, and the two applications have fundamental differences in their technical solutions.

[0011] (2) The method proposed in CN114928440A belongs to PAEKS, which requires the participation of the public and private keys of both the sender and the receiver. However, the design of this application belongs to PEKS. Through the "implicit binding of index and trapdoor" mechanism, the receiver needs to combine its own private key and index auxiliary parameters to generate a valid trapdoor, and then realize the matching of trapdoor and index. This application provides the function of resisting internal keyword guessing attacks of CN114928440A, and the generation of index and trapdoor does not require the participation of the sender's public and private keys, resulting in better execution performance.

[0012] 2. Technical comparison between this application and Chinese Patent CN114142996B, "A Searchable Encryption Method Based on SM9 Cryptographic Algorithm":

[0013] (1) The method proposed in CN114142996B belongs to PEKS. The trapdoor generation process does not require the cooperation of index auxiliary parameters. It can generate an effective trapdoor only through keywords and system basic parameters, which poses a risk of being exploited by malicious attackers to perform keyword guessing attacks. The trapdoor generation of this application must rely on the recipient's own private key and the index auxiliary parameters obtained from the cloud server. Both are indispensable. Only the legitimate recipient can complete the effective trapdoor generation, blocking the internal keyword guessing attack path. The two have essential differences in the core logic and security design of trapdoor generation.

[0014] (2) The keyword index design proposed in CN114142996B has significant security flaws and does not meet the security requirement of indistinguishability that a searchable encryption scheme should meet. The index and trapdoor design in this application meet the indistinguishability of the index and trapdoor. The related matching algorithm design is completely different from that in patent CN114142996B. The two have essential differences in the logic and design of index generation, trapdoor generation, and matching algorithm.

[0015] While domestic research has made progress in searchable encryption, it still lags behind international frontiers in key areas such as the integration of national cryptographic standards and resistance to internal attacks. my country's SM9 algorithm, as an identity-based cryptographic standard, uses user identity identifiers directly as public keys, eliminating the need for certificate management and natively supporting bilinear pairing operations, providing natural technical support for the indexing and trapdoor construction of PEKS.

[0016] Therefore, designing a searchable encryption scheme by combining SM9 with identity-based cryptography can overcome existing bottlenecks in adaptability, security, and efficiency, meet domestic compliance requirements, and has significant theoretical research value and practical application significance. Summary of the Invention

[0017] To address the problems of complex certificate management, lack of compatibility with national cryptographic standards, and weak resistance to internal keyword guessing attacks in existing searchable public key encryption (PEKS) schemes, this invention provides an identity-based searchable public key encryption method based on the national cryptographic standard SM9 identifier algorithm, thereby fully resolving the problems existing in the background technology. The technical solution provided by this invention is as follows:

[0018] In a first aspect, the present invention proposes an identity-based searchable public key encryption method based on SM9, comprising the following steps:

[0019] S1, based on the SM9 identifier algorithm, the key generation center KGC generates system public parameters and the system's public and private keys; and combined with the user's identity identifier, the key generation center KGC generates a user's private key for the system user, and the user's public key is their identity identifier.

[0020] S2, the data sender extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, and simultaneously encrypts the original data to generate ciphertext; the sender uploads the ciphertext and keyword index to the cloud server;

[0021] S3, the receiver obtains the system public parameters, selects the keyword to be searched, combines the auxiliary parameters in the keyword index obtained from the cloud server, uses its own private key to generate a keyword trapdoor through the keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server;

[0022] S4, the cloud server calls the preset matching algorithm and uses bilinear pairing operation to match and verify the keyword trap sent by the receiver with the keyword index uploaded by the sender. If the verification is successful, the matching is determined to be successful, and the encrypted data is sent to the receiver.

[0023] Preferably, the process by which the Key Generation Center (KGC) generates system public parameters and user private keys is as follows:

[0024] S11, let the elliptic curve identifier of SM9 be... The base field is the prime field. , 256-bit prime numbers specified for the SM9 standard; SM9 elliptic curves The order is a prime number Bilinear pair The identifier is . for On Additive cyclic group On its twisted line Additive cyclic group for The factorial cyclic group, bilinear pairings are It satisfies bilinearity, nondegeneracy, and computability. Specify The generator is (Base point on the elliptic curve, coordinates specified by the SM9 standard). The generator is (Depend on (Obtained through torsion mapping).

[0025] S12, select two cryptographic hash functions, namely:

[0026] First cryptographic hash function It maps the user's identity bit string of arbitrary length to a modulo... multiplication group middle.

[0027] Second cryptographic hash function Based on the national cryptographic SM3 algorithm, the input is a long bit string and The function outputs a hash value of 256 bits.

[0028] ;

[0029] The system's common parameters include: ;

[0030] S13, Key Generation Center KGC from the module multiplication group Select random numbers and calculate Choose the private key generation function identifier as , It is an identifier represented by a single byte. The private-public key pair of the Key Generation Center (KGC) is: .

[0031] S14, the Key Generation Center (KGC) obtains the aforementioned system public parameters, and the receiver sends its identity identifier. To KGC, the user's public key is... KGC uses the master private key s to first calculate the receiver's private key component. , Finally, the private key is returned to the recipient. , represented as:

[0032] ;

[0033] (in yes exist (inverse element in the middle)

[0034] ;

[0035] The Key Generation Center (KGC) generates the corresponding private key for the sender using the same logic. ;

[0036] S15, the Key Generation Center (KGC) sends the private key to both the sender and receiver for storage via a secure channel.

[0037] Preferably, the process of generating and uploading the keyword index and encrypted data is as follows:

[0038] S21, The sender obtains system common parameters (including...) , Hash function Bilinear pair Regarding the identity of the recipient The sender first extracts the search keywords from the data. Then select a random number. ;

[0039] S22, Sending the receiver Generate parameters , represented as:

[0040] ;

[0041] Keyword index is generated using the following SM9 related operations. :

[0042] ;

[0043] ;

[0044] ;

[0045] ;

[0046] in, These are auxiliary parameters. Keywords and The data is spliced ​​together; at the same time, encryption operations are performed on the original data to generate ciphertext.

[0047] S23, the sender will send the index The encrypted data is uploaded to the cloud server.

[0048] Preferably, the process of generating the keyword trapdoor is as follows:

[0049] S31, The receiver obtains system common parameters. and one's own private key For selecting keywords to search Send the data owner's identity to the cloud server With oneself The cloud server returns auxiliary parameters from the keyword index. The recipient obtains Then, the intermediate value u is calculated through bilinear pairing operations. This is used for generating subsequent keyword trapdoors.

[0050] ;

[0051] S32, The receiver then selects a random number. Keyword trapdoors are generated through the following SM9 related operations. :

[0052] ;

[0053] ;

[0054] The receiver will use the keyword trap. Uploaded to the cloud server.

[0055] Preferably, the process of the cloud server verifying keyword trapdoors and index matching is as follows:

[0056] Cloud server retrieves keyword index uploaded by sender Trapdoor sent by the receiver Using bilinear pairing Perform the following verification:

[0057] ;

[0058] If the above equation holds true, the trapdoor is determined to be a successful match with the keyword index, and the cloud server sends the encrypted data to the recipient.

[0059] Secondly, this invention proposes an identity-based searchable public-key encryption system based on SM9, comprising the following modules:

[0060] The Key Generation Center (KGC) module generates system common parameters (including bilinear pair groups) based on the SM9 algorithm. , , (Generators, bilinear pairing mappings, hash functions, and system master keys); and generate corresponding user private keys for the sender and receiver based on their identities.

[0061] The sending module extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, encrypts the original data to generate ciphertext, and uploads the ciphertext and keyword index to the cloud server.

[0062] The receiving module obtains system public parameters, selects keywords to be searched, combines auxiliary parameters from the keyword index obtained from the cloud server, generates a keyword trapdoor using its own private key through a keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server. It is also used to receive encrypted data returned by the cloud server and decrypt it to obtain the original data.

[0063] The cloud server module is used to store the encrypted data and keyword index uploaded by the sender, receive the trapdoor sent by the receiver, verify the matching between the keyword trapdoor and the keyword index through a preset matching algorithm (based on SM9 bilinear pairing operation), and send the encrypted data to the receiver when the match is successful.

[0064] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0065] Leveraging the SM9 identity base, using the user's identity identifier as the public key and KGC to securely distribute the private key, it achieves flexible and secure key transmission, adapts to open cloud environments, eliminates the PKI certificate management process, and significantly reduces system operation and maintenance costs. It deeply integrates the SM9 national cryptographic algorithm with searchable encryption, further enhancing the application of the national cryptographic algorithm in the field of encrypted retrieval and meeting compliance requirements in key areas. Through an "index-trapdoor implicit binding" design, only legitimate recipients can generate valid keyword thresholds, effectively resisting internal keyword guessing attacks. Furthermore, the generation of related indexes and trapdoors requires the participation of the recipient's public and private keys, simplifying the system's design logic and providing long-term security guarantees. Attached Figure Description

[0066] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0067] Figure 1 This is a schematic diagram of the module interaction of the system of the present invention;

[0068] Figure 2 This is a flowchart of the module interaction of the system of the present invention;

[0069] Figure 3 This is a flowchart of the algorithm of this invention. Detailed Implementation

[0070] 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.

[0071] Example 1:

[0072] An SM9-based identity-based searchable public-key encryption method, such as Figure 2 , 3 As shown, it includes the following steps:

[0073] S1, based on the SM9 identifier algorithm, the key generation center KGC generates system public parameters and the system's public and private keys; and combined with the user's identity identifier, the key generation center KGC generates a user's private key for the system user, and the user's public key is their identity identifier.

[0074] The process by which the Key Generation Center (KGC) generates system public parameters and user private keys is as follows:

[0075] S11, let the elliptic curve identifier of SM9 be... The base field is the prime field. , 256-bit prime numbers specified for the SM9 standard; SM9 elliptic curves The order is a prime number Bilinear pair The identifier is . for On Additive cyclic group On its twisted line Additive cyclic group for The factorial cyclic group, bilinear pairings are It satisfies bilinearity, nondegeneracy, and computability. Specify The generator is (Base point on the elliptic curve, coordinates specified by the SM9 standard). The generator is (Depend on (Obtained through torsion mapping).

[0076] In this embodiment, technicians can use national cryptographic algorithm toolsets (such as GMSSL) to query the elliptic curve parameters specified by SM9 (such as 256-bit BN curves) to ensure consistency with the SM9 standard (GM / T 0044-2016).

[0077] S12, select two cryptographic hash functions, namely:

[0078] First cryptographic hash function It maps the user's identity bit string of arbitrary length to a modulo... multiplication group middle.

[0079] Second cryptographic hash function Based on the national cryptographic SM3 algorithm, the input is a long bit string and The function outputs a hash value of 256 bits.

[0080] ;

[0081] ;

[0082] In this embodiment, all hash functions are collision-resistant hash functions: for the first password hash function SHA-256 or SM3 can be used as the basic hash function. SHA-256 belongs to the SHA-2 series of secure hash algorithms, while SM3 is a domestically developed Chinese cryptographic hash algorithm (corresponding to the national standard GB / T32905-2016). Both can map an input bit string of arbitrary length to a fixed-length hash value of 256 bits (32 bytes). Subsequently, taking the modulo q of this hash value maps the result to a multiplication group modulo q. In practice, the hash calculation and modulo steps can be completed using GmSSL (a Chinese national cryptographic SSL tool); however, for the second cryptographic hash function... It is implemented based on the national cryptographic SM3 algorithm, and requires the long... bit string and The elements are combined into a unified input content according to preset rules (such as by concatenating bit strings), and then the combined content is input into the SM3 algorithm to directly obtain a 256-bit hash value. This process can also be completed by the GmSSL tool to perform SM3 hash calculation.

[0083] S13, Key Generation Center KGC from the module multiplication group Select random numbers and calculate Choose the private key generation function identifier as , It is an identifier represented by a single byte. The private-public key pair of the Key Generation Center (KGC) is: .

[0084] S14, the Key Generation Center (KGC) obtains the aforementioned system public parameters, and the receiver sends its identity identifier. To KGC, the user's public key is... KGC uses the master private key s to first calculate the receiver's private key component. , Finally, the private key is returned to the recipient. , represented as:

[0085] ;

[0086] (in yes exist (inverse element in the middle)

[0087] ;

[0088] The Key Generation Center (KGC) generates the corresponding private key for the sender using the same logic. ;

[0089] S15, the Key Generation Center (KGC) sends the private key to both the sender and receiver for storage via a secure channel.

[0090] In this embodiment, the key generation center KGC can transmit the key via a hardware encryption channel (such as an HSM device or an encrypted USB flash drive). IDr , sk IDs The keys are sent to both the sender and receiver, and both parties store their private keys on secure media (such as an HSM or an encrypted local file) to ensure key confidentiality.

[0091] S2, the data sender extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, and simultaneously encrypts the original data to generate ciphertext; the sender uploads the ciphertext and keyword index to the cloud server;

[0092] The process of keyword indexing and encrypted data generation and uploading is as follows:

[0093] S21, The sender obtains system common parameters (including...) , Hash function Bilinear pair Regarding the identity of the recipient The sender first extracts the search keywords from the data. Then select a random number. ;

[0094] S22, Sending the receiver Generate parameters , represented as:

[0095] ;

[0096] Keyword index is generated using the following SM9 related operations. :

[0097] ;

[0098] ;

[0099] ;

[0100] ;

[0101] in, These are auxiliary parameters. Keywords and The data is spliced ​​together; at the same time, encryption operations are performed on the original data to generate ciphertext.

[0102] S23, the sender will send the index The encrypted data is uploaded to the cloud server.

[0103] In this embodiment, all steps involving elliptic curve dot product, bilinear pairing operations, and hash operations can be implemented using tools such as national cryptographic algorithm toolkits (e.g., GMSSL), bilinear pairing operation libraries (e.g., PBC), and Python cryptography extension libraries (e.g., cryptography), ensuring that those skilled in the art can reproduce the technical solution of this invention using the aforementioned tools. The sender can then use the generated index... The index is uploaded to the cloud server via a secure network transmission protocol (such as HTTPS). After receiving the index, the cloud server associates it with the corresponding encrypted data and stores it for subsequent retrieval.

[0104] S3, the receiver obtains the system public parameters, selects the keyword to be searched, combines the auxiliary parameters in the keyword index obtained from the cloud server, uses its own private key to generate a keyword trapdoor through the keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server;

[0105] The process of generating keyword trapdoors is as follows:

[0106] S31, The receiver obtains the system's public parameters and its own private key. For selecting keywords to search Send the data owner's identity to the cloud server With oneself The cloud server returns auxiliary parameters from the keyword index. The recipient obtains Then, the intermediate value u is calculated through bilinear pairing operations. This is used for generating subsequent keyword trapdoors.

[0107] ;

[0108] S32, The receiver then selects a random number. Keyword trapdoors are generated through the following SM9 related operations. :

[0109] ;

[0110] ;

[0111] The receiver will use the keyword trap. Uploaded to the cloud server.

[0112] In this embodiment, the relevant tools used by those skilled in the art are largely the same as those used in step S2.

[0113] S4, the cloud server calls the preset matching algorithm and uses bilinear pairing operation to match and verify the keyword trap sent by the receiver with the keyword index uploaded by the sender. If the verification is successful, the matching is determined to be successful, and the encrypted data is sent to the receiver.

[0114] The process of cloud server verification of keyword trapdoors and index matching is as follows:

[0115] The cloud server obtains the keyword index {I3, I4} uploaded by the sender and the keyword trapdoor {T1, T2} sent by the receiver, and uses bilinear pairing... Perform the following verification:

[0116] ;

[0117] If the above equation holds true, the trapdoor is determined to be a successful match with the keyword index, and the cloud server sends the encrypted data to the recipient.

[0118] In this embodiment, bilinear pairing operations can be implemented using the PBC bilinear pairing operation library, which supports the operations defined above. ( On (additional cyclic group) (On the twisted line) (additional cyclic group) and ( The operation of factorial cyclic groups can efficiently realize bilinear pairs. The mapping operation and group exponentiation operation are used to ensure the efficiency and accuracy of the subsequent matching and verification process.

[0119] Verification of the correctness of the matching algorithm:

[0120] Correctness depends on the property of bilinear pairing: for any ,satisfy The parameters involved in the matching algorithm in the method are calculated as follows:

[0121] ;

[0122] ;

[0123] ;

[0124] ;

[0125] Then we have:

[0126] ;

[0127] ;

[0128] if ,So If the keyword trap is found to be true, it can be determined that the keyword trap has been successfully matched with the keyword index.

[0129] Example 2:

[0130] An identity-based searchable public-key encryption system based on SM9, such as Figure 1 As shown, it includes the following modules:

[0131] The Key Generation Center (KGC) module, based on the SM9 algorithm, generates system common parameters (including bilinear pair groups). , , (Generators, bilinear pairing mappings, hash functions, and system master keys); and generate corresponding user private keys for the sender and receiver based on their identities.

[0132] The sending module extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, encrypts the original data to generate ciphertext, and uploads the ciphertext and keyword index to the cloud server.

[0133] The receiving module obtains system public parameters, selects keywords to be searched, combines auxiliary parameters from the keyword index obtained from the cloud server, generates a keyword trapdoor using its own private key through a keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server. It is also used to receive encrypted data returned by the cloud server and decrypt it to obtain the original data.

[0134] The cloud server module is used to store the encrypted data and keyword index uploaded by the sender, receive the trapdoor sent by the receiver, verify the matching between the keyword trapdoor and the keyword index through a preset matching algorithm (based on SM9 bilinear pairing operation), and send the encrypted data to the receiver when the match is successful.

[0135] Based on the detailed description of the foregoing embodiments, those skilled in the art will understand that the various embodiments of the present invention can be deployed and implemented in the form of "software program paired with general-purpose hardware platform", or can be independently implemented relying on dedicated hardware carriers (such as customized encryption computing chips, dedicated processing modules). Based on this understanding, the core content of this technical solution that makes innovative contributions to the prior art can be packaged into a computer software product and stored in a computer-readable storage medium (including random access memory RAM, read-only memory ROM, magnetic disk, optical disk, etc.); the software product has built-in several execution instructions that can drive computer devices (including personal terminals, servers, network nodes, etc.) to execute the method flow described in the various embodiments of the present invention or some of its components.

[0136] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Although the embodiments of the present invention have been described in detail above, those skilled in the art can still adjust the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, technical improvements, etc., made within the technical concept and principle framework of the present invention should be included in the scope of protection of the present invention.

Claims

1. A searchable public key encryption method based on SM9 identity base, characterized in that, Includes the following steps: S1, based on the SM9 identifier algorithm, the key generation center KGC generates system public parameters and the system's public and private keys; and combined with the user's identity identifier, the key generation center KGC generates a user's private key for the system user, and the user's public key is their identity identifier. S2, the data sender extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, and simultaneously encrypts the original data to generate ciphertext; the sender uploads the ciphertext and keyword index to the cloud server; S3, the receiver obtains the system public parameters, selects the keyword to be searched, combines the auxiliary parameters in the keyword index obtained from the cloud server, uses its own private key to generate a keyword trapdoor through the keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server; S4, the cloud server calls the preset matching algorithm and uses bilinear pairing operation to match and verify the keyword trap sent by the receiver with the keyword index uploaded by the sender. If the verification is successful, the matching is determined to be successful, and the encrypted data is sent to the receiver.

2. The identity-based searchable public key encryption method according to claim 1, characterized in that, In step S1, the process by which the Key Generation Center (KGC) generates system public parameters and user private keys is as follows: S11, let the elliptic curve identifier of SM9 be... The base field is the prime field. , 256-bit prime numbers specified for the SM9 standard; SM9 elliptic curves The order is a prime number Bilinear pair The identifier is , for On Additive cyclic group On its twisted line Additive cyclic group for The factorial cyclic group, bilinear pairings are Satisfying bilinearity, nondegeneracy, and computability, specifying The generator is , The generator is ; S12, select two cryptographic hash functions, namely: First cryptographic hash function It maps the user's identity bit string of arbitrary length to a modulo... multiplication group middle; Second cryptographic hash function Based on the SM3 algorithm, the input is a long bit string and The function outputs a hash value of 256 bits in length. ; ; The system's common parameters include: ; S13, Key Generation Center KGC from the module multiplication group Select random numbers and calculate Choose the private key generation function identifier as , It is an identifier represented by a single byte. The private-public key pair of the Key Generation Center (KGC) is: ; S14, the Key Generation Center (KGC) obtains the aforementioned system public parameters, and the receiver sends its identity identifier. To KGC, the user's public key is... KGC uses the master private key s to first calculate the receiver's private key component. , Finally, the private key is returned to the recipient. , represented as: ; ; ; in, yes exist The inverse element in the middle; The Key Generation Center (KGC) generates the corresponding private key for the sender using the same logic. ; S15, the Key Generation Center (KGC) sends the private key to both the sender and receiver for storage via a secure channel.

3. The identity-based searchable public key encryption method according to claim 2, characterized in that, In step S2, the process of generating and uploading the keyword index and encrypted data is as follows: S21, the sender obtains the content... , Hash function Bilinear pair System public parameters, regarding the identity of the recipient. The sender first extracts the search keywords from the data. Then select a random number. ; S22, the sender uses the receiver Generate parameters , represented as: ; Keyword index is generated using the following SM9 related operations. : ; ; ; ; in, These are auxiliary parameters. Keywords and The data is concatenated; at the same time, encryption operations are performed on the original data to generate ciphertext. S23, the sender will send the index The encrypted data is uploaded to the cloud server.

4. The identity-based searchable public key encryption method according to claim 3, characterized in that, In step S3, the process of generating the keyword trapdoor is as follows: S31, The receiver obtains system common parameters. and one's own private key For selecting keywords to search Send the data owner's identity to the cloud server With oneself The cloud server returns auxiliary parameters from the keyword index. The recipient obtains Then, the intermediate value u is calculated through bilinear pairing operations. This is used for generating subsequent keyword trapdoors. ; S32, The receiver then selects a random number. Keyword trapdoors are generated through the following SM9 related operations. : ; ; The receiver will use the keyword trap. Uploaded to the cloud server.

5. The identity-based searchable public key encryption method according to claim 4, characterized in that, In step S4, the process of the cloud server verifying the keyword trapdoor and index matching is as follows: Cloud server retrieves keyword index uploaded by sender Keyword traps sent by the recipient Using bilinear pairing Perform the following verification: ; If the above equation holds true, the trapdoor is determined to be a successful match with the keyword index, and the cloud server sends the encrypted data to the recipient.

6. An identity-based searchable public-key encryption system based on SM9, wherein the system implements the method described in any one of claims 1-5, characterized in that, Includes the following modules: The Key Generation Center (KGC) module generates a bilinear pair group based on the SM9 algorithm. , , The system public parameters include generators, bilinear pairing mappings, hash functions, and the system master key; and corresponding user private keys are generated for the sender and receiver based on their identities. The sending module extracts keywords from the file, obtains system public parameters and receiver identity identifiers, generates a keyword index using a keyword indexing algorithm, encrypts the original data to generate ciphertext, and uploads the ciphertext and keyword index to the cloud server. The receiving module obtains system public parameters, selects keywords to be searched, combines auxiliary parameters from the keyword index obtained from the cloud server, generates a keyword trapdoor using its own private key through a keyword trapdoor algorithm, and sends the keyword trapdoor to the cloud server. It is also used to receive encrypted data returned by the cloud server and decrypt it to obtain the original data. The cloud server module is used to store the encrypted data and keyword index uploaded by the sender, receive keyword traps sent by the receiver, verify the matching between the keyword traps and the keyword index through a preset matching algorithm, and send the encrypted data to the receiver when the match is successful.

Citation Information

Patent Citations

  • A searchable encryption method based on the SM9 cryptographic algorithm

    CN114142996B

  • Multi-keyword query encrypted data searchable method and device in cloud server

    CN111930688A

  • Searchable encryption method based on SM9 cryptographic algorithm

    CN114142996A

  • SM9-based authentication searchable encryption method and system

    CN114928440A

  • Specified server searchable encryption method based on SM9

    CN117375801A

Cited By

  • Verifiable and authorizable public key equivalent test method

    CN122053088A