A keyword-based trusted identity concealment query method, device and medium

By implementing a collaborative process across the configuration acquisition, key management, and query execution phases, and employing homomorphic encryption technology, the issues of user query privacy and data security in trusted communication are resolved, achieving both the anonymity of query content and the confidentiality of result data.

CN122137575APending Publication Date: 2026-06-02WEIWEI SHANGHAI NETWORK TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WEIWEI SHANGHAI NETWORK TECH CO LTD
Filing Date
2026-01-22
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing trusted communication systems, there is a lack of effective protection for user query privacy and query result data security. The server can fully grasp the user's query content and behavior patterns, which poses risks of privacy leakage and data security.

Method used

By constructing a three-stage collaborative process of configuration acquisition, key management, and query execution, the client's ultimate control over the data is established. Homomorphic encryption technology is used to encrypt query keywords, and the server cannot know the query content and results during the process.

Benefits of technology

While ensuring query efficiency, it completely prevents the leakage of query content and user behavior patterns, and ensures the confidentiality of query results data during transmission and server-side processing, thus achieving comprehensive protection of user privacy and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137575A_ABST
    Figure CN122137575A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on keyword trusted identity concealment query method, equipment and medium, it is related to trusted communication field, including: called terminal obtains the concealment information search configuration parameter of identity credential query server;Based on the parameter generates local homomorphic encryption key pair and evaluation key, key pair contains public key and private key;Evaluation key is uploaded server storage, and private key is retained locally;Called terminal parses cryptographic token to obtain keyword, and uses private key to homomorphic encryption as encrypted query request and sends to server;Server uses the evaluation key and according to the configuration parameter pre-processing and the database formed by fragmentation, carries out homomorphic calculation to encrypted query request, generates encrypted query result and returns;Called terminal uses private key to decrypt the result, obtains target identity credential.The application realizes that the query content and user behavior are concealed to server, while completing trusted identity query, effectively protects user privacy and data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of trusted communication technology, and in particular to a method, device and medium for trusted identity concealment query based on keywords. Background Technology

[0002] Trusted communication (CHAKEN) is a technology that uses cryptographic techniques to enable real-time display of the caller's identity on the called party's end. When a caller initiates a call, their identity information is transmitted to the called party via a cryptographic token. The called party's terminal needs to parse this token to obtain specific credential identification fields, and use this as a query index to send a request to a remote identity credential query system via a communication protocol to obtain and verify the caller's complete identity credentials. This query process constitutes a key step in trusted communication's ability to reliably display identity.

[0003] The inventors of this application have discovered significant technical flaws in the aforementioned query mechanism. First, during the query process, the request sent by the called terminal to the query system explicitly includes the credential index to be queried. This allows the server to fully grasp sensitive information such as the specific content, initiation time, and frequency of the user's query, exposing the user's query behavior patterns and posing a serious risk of privacy leakage. Furthermore, when the server returns the query results, the relevant identity credential data is typically transmitted over the network in unencrypted plaintext form. This data may be stolen or tampered with during transmission, posing a clear data security risk. Moreover, the entire query process is completely transparent to the server. As the data holder and query processor, the server can indiscriminately collect and analyze all users' query logs, which contradicts increasingly stringent data privacy protection principles and user rights demands. Therefore, under the premise of ensuring that the called user can reliably and normally query the target identity credential, existing technologies lack effective means to protect user query privacy and query result data security. Summary of the Invention

[0004] This invention provides a keyword-based trusted identity concealment query method, device, and medium. The technical problem it aims to solve is: how to provide a reliable mechanism that can effectively protect user query privacy and query result data security while maintaining query efficiency during the trusted communication identity credential query process.

[0005] This invention constructs a three-stage collaborative process of configuration acquisition, key management, and query execution. This ensures that the called terminal can successfully query the target identity credentials while comprehensively protecting user query privacy and query result data. Specifically, the configuration acquisition stage establishes a unified foundation of cryptographic parameters for the system; the key management stage establishes the client's ultimate control over the data; and the query execution stage completes end-to-end encrypted and concealed retrieval, preventing the server from knowing the query content, results, and user behavior patterns throughout the entire process.

[0006] In a first aspect, embodiments of the present invention provide a keyword-based trusted identity concealment query method, applied to a trusted communication system, the trusted communication system including a called terminal and an identity credential query server, comprising: The called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server; The called terminal generates a homomorphic encryption key pair and a corresponding evaluation key based on the hidden information retrieval configuration parameters. The homomorphic encryption key pair includes a public key and a private key. The called terminal uploads the evaluation key to the identity credential query server for storage and keeps the private key locally. The called terminal parses the keyword based on the received password token, uses the private key to homomorphically encrypt the keyword, generates an encrypted query request, and sends it to the identity credential query server. The identity credential query server uses the evaluation key and the preprocessed fragmented database to perform homomorphic computation on the encrypted query request, generate an encrypted query result, and return it to the called terminal; wherein, the preprocessed fragmented database is formed by the identity credential query server after preprocessing and fragmenting the original identity credential database according to the hidden information retrieval configuration parameters. The called terminal uses the private key to decrypt the encrypted query result to obtain the target identity credential.

[0007] Optionally, the homomorphic encryption employs the BFV algorithm.

[0008] Optionally, the BFV algorithm uses a polynomial ring for encryption operations, wherein the degree, modulus, and plaintext modulus of the polynomial ring are set according to the fixed byte length of the identity credential index in the trusted communication specification.

[0009] Optionally, the process by which the called terminal generates the evaluation key includes: The called terminal calculates an evaluation key for performing multiplication and relinearization operations on homomorphic ciphertext by executing the evaluation key generation function specified in the BFV algorithm, based on the public key and the algorithm parameters included in the hidden information retrieval configuration parameters.

[0010] Optionally, the called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server, including: The called terminal sends a configuration request to the identity credential query server; In response to the configuration request, the identity credential query server sends a message to the called terminal, the message containing the polynomial ring degree, modulus, plaintext modulus and noise distribution parameters required by the hidden information retrieval algorithm.

[0011] Optionally, the called terminal uses the private key to perform homomorphic encryption on the keyword, including: The called terminal encodes the keyword into a plaintext polynomial conforming to the BFV algorithm format; The called terminal uses the private key and the encryption parameters determined according to the hidden information retrieval configuration parameters to perform the BFV encryption algorithm on the plaintext polynomial to generate the ciphertext polynomial as the encrypted query request.

[0012] Optionally, the preprocessed sharded database is obtained in the following way: The identity credential query server encodes each piece of identity credential data in the original identity credential database into a data element suitable for homomorphic computation based on the data encoding rules defined in the hidden information retrieval configuration parameters. The identity credential query server organizes all encoded data elements into multiple logical fragments according to preset fragment size and arrangement rules, forming the preprocessed fragmented database.

[0013] Optionally, the called terminal maintains a configuration cache module locally; the method further includes: After the called terminal performs the operation of obtaining the hidden information retrieval configuration parameters for the first time, it stores the obtained hidden information retrieval configuration parameters in the configuration cache module; When an encrypted query request needs to be generated subsequently, the called terminal will first read the hidden information retrieval configuration parameters from the configuration cache module.

[0014] Secondly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0016] This invention provides a keyword-based trusted identity concealment query method, device, and medium. The method includes: a called terminal obtaining concealed information retrieval configuration parameters from an identity credential query server; the called terminal generating a homomorphic encryption key pair and a corresponding evaluation key based on the concealed information retrieval configuration parameters, the homomorphic encryption key pair including a public key and a private key; the called terminal uploading the evaluation key to the identity credential query server for storage and retaining the private key locally; the called terminal parsing a keyword from a received password token, homomorphically encrypting the keyword using the private key, generating an encrypted query request, and sending it to the identity credential query server; the identity credential query server using the evaluation key and a preprocessed fragmented database performing homomorphic computation on the encrypted query request, generating an encrypted query result, and returning it to the called terminal; wherein the preprocessed fragmented database is formed by the identity credential query server preprocessing and fragmenting the original identity credential database according to the concealed information retrieval configuration parameters; and the called terminal decrypting the encrypted query result using the private key to obtain the target identity credential. This invention effectively overcomes the privacy and security shortcomings of existing trusted communication identity credential query methods by constructing a collaborative process that includes configuration synchronization, key distribution, and end-to-end encrypted querying. This scheme enables the called terminal to obtain and synchronously execute the encryption parameters required for covert retrieval with the server, thereby generating a locally unique encryption / decryption key pair and an evaluation key for ciphertext computation. By entrusting the evaluation key to the server while strictly retaining the private key locally, the confidentiality of the query results is ensured. During query execution, the called terminal converts the parsed query keywords into homomorphic encrypted ciphertext before sending the request, ensuring that the server cannot know the specific query content. The server uses the evaluation key to perform blind-state computation on the ciphertext request on a pre-parameterized sharded database and returns the ciphertext result, ensuring that the server cannot access any plaintext data throughout the computation process. Ultimately, only the called terminal can decrypt the ciphertext using its private key to obtain the target identity credential. Therefore, while ensuring that the called terminal can complete the core function of identity credential query, this solution completely prevents the leakage of query content and user behavior patterns, ensures the confidentiality of query result data during transmission and server-side processing, and maintains query efficiency through process optimization. Attached Figure Description

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

[0018] Figure 1A flowchart illustrating a keyword-based trusted identity concealment query method provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0019] 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, not all, of the embodiments of the present invention. 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.

[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0023] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0024] Please see Figure 1 This invention provides a keyword-based trusted identity concealment query method, applied to a trusted communication system, which includes a called terminal and an identity credential query server. The method includes the following steps: S1, the called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server.

[0025] In practice, the called terminal sends a configuration request to the identity credential query server. Upon receiving the request, the identity credential query server generates or reads a set of pre-defined concealed information retrieval configuration parameters. These concealed information retrieval configuration parameters include at least a homomorphic encryption algorithm type identifier and basic parameters. The identity credential query server then encapsulates these concealed information retrieval configuration parameters in a response message and sends it back to the called terminal.

[0026] In some preferred embodiments, the called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server, including: the called terminal initiating a configuration request to the identity credential query server; the identity credential query server responding to the configuration request by sending a message to the called terminal, the message containing the polynomial ring degree, modulus, plaintext modulus, and noise distribution parameters required by the hidden information retrieval algorithm.

[0027] In practice, the specific interaction process for the called terminal to obtain the hidden information retrieval configuration parameters from the identity credential query server is as follows: When the called terminal initializes or needs to update parameters, it constructs a configuration request, which can be a simple network request packet. The identity credential query server continuously listens for such configuration requests. When the server receives the configuration request, it reads the currently effective parameter set from its configuration storage. These parameter sets are predefined to support subsequent BFV homomorphic encryption and hidden information retrieval operations. The server encapsulates key algorithm parameters, including the degree (n), modulus (q), plaintext modulus (t), and noise distribution parameters used during encryption (such as standard deviation σ), into a response message. Finally, the server sends this response message back to the calling terminal that initiated the request.

[0028] This embodiment ensures consistency of cryptographic algorithm parameters across all participants in the distributed system by defining a standardized configuration parameter acquisition process. Clients actively request parameters, enabling the server to centrally manage and flexibly update algorithm configurations, such as adjusting parameters when increased security is needed. Clients do not need to pre-code parameters, enhancing system maintainability and evolution capabilities. The response message explicitly includes core parameters such as the polynomial ring degree, modulus, plaintext modulus, and noise distribution, providing a complete and explicit mathematical basis for subsequent key generation, data encryption, and server-side data preprocessing and homomorphic computation.

[0029] In some preferred embodiments, the called terminal maintains a configuration cache module locally; the method further includes: after the called terminal performs the operation of obtaining the hidden information retrieval configuration parameters for the first time, it stores the obtained hidden information retrieval configuration parameters in the configuration cache module; when an encrypted query request needs to be generated subsequently, the called terminal preferentially reads the hidden information retrieval configuration parameters from the configuration cache module.

[0030] In practice, the called terminal maintains a local configuration cache module, which can be a dedicated area in the terminal's memory or persistent storage. Furthermore, the method includes a cache management process: when the called terminal successfully retrieves the hidden information retrieval configuration parameters from the identity credential query server for the first time, in addition to using the parameters for subsequent processing, it also writes these configuration parameters (such as polynomial ring degree, modulus, etc.) into the local configuration cache module for storage. Subsequently, when the called terminal needs to generate a new encrypted query request (e.g., to handle a new incoming call), it first checks the local configuration cache module. If valid configuration parameters exist in the cache module, they are read and used directly from the cache without needing to initiate a network request to the identity credential query server again. The process of retrieving parameters from the server is only re-executed when the cache expires, does not exist, or is actively refreshed.

[0031] This embodiment significantly optimizes the overall system performance and user experience by introducing a client-side configuration caching mechanism, particularly reducing latency for repeated queries and alleviating network and server load. Configuration parameters are typically stable within a single session or over a longer period. By caching the parameters obtained initially locally, the network interaction required before each subsequent query is avoided. This directly reduces the overall end-to-end latency of query requests, as omitting one network round trip is crucial for improving the real-time perception of identity display in trusted communication. Furthermore, this also significantly reduces unnecessary configuration request traffic between the client and server, lowering the server's connection processing pressure and allowing server resources to be more focused on processing core homomorphic computation tasks, thereby enhancing the system's ability to handle large-scale concurrent queries.

[0032] S2, the called terminal generates a homomorphic encryption key pair and a corresponding evaluation key based on the concealed information retrieval configuration parameters. The homomorphic encryption key pair includes a public key and a private key. The called terminal uploads the evaluation key to the identity credential query server for storage and keeps the private key locally.

[0033] In practice, after receiving the concealed information retrieval configuration parameters, the called terminal invokes its locally integrated cryptographic algorithm library. Based on the algorithm type specified in the configuration parameters (e.g., BFV), the library executes a key generation algorithm, outputting a homomorphic encryption key pair containing a public key and a private key. Simultaneously, based on this public key and the specific algorithm parameters in the configuration parameters, the library further calculates and generates an evaluation key. After generation, the called terminal sends the evaluation key to an identity credential query server for storage via the network. The private key is securely stored in the called terminal's local secure storage area and is not transmitted.

[0034] In some preferred embodiments, the process of the called terminal generating the evaluation key includes: the called terminal, based on the public key and the algorithm parameters contained in the hidden information retrieval configuration parameters, calculates the evaluation key used for multiplication and relinearization operations on homomorphic ciphertext by executing the evaluation key generation function specified in the BFV algorithm.

[0035] In practice, the process of the called terminal generating the evaluation key is as follows: First, the called terminal has completed the generation of its public key. Then, the terminal reads the hidden information retrieval configuration parameters obtained from the server. These parameters contain the complete parameter set required by the BFV algorithm. The terminal calls the evaluation key generation function in the BFV algorithm library. This function takes the generated public key and specific algorithm parameters (such as polynomial ring degree, modulus, etc.) from the configuration parameters as input. Internally, the evaluation key generation function performs a series of specific polynomial operations to generate one or more key data points to assist in homomorphic ciphertext computation. These data points together constitute the evaluation key. The main function of this evaluation key is to support the server in performing multiplication operations on the ciphertext and executing necessary relinearization operations in subsequent homomorphic computations to control ciphertext expansion.

[0036] This embodiment clarifies the roles and capabilities of the client and server in secure computation by specifically defining the generation method and function of the evaluation key, thus strengthening the system's privacy protection architecture. The evaluation key is generated by the client using its public key. Its mathematical properties dictate that it can only be used to perform specific homomorphic operations on ciphertext and does not contain any decryption capabilities. After obtaining this key, the server can only perform permitted ciphertext computations and cannot reverse-engineer the client's private key or decrypt ciphertext data. The evaluation key's support for multiplication and relinearization operations enables the server to perform all the homomorphic computation steps required to complete a full hidden query, including the core operation of searching and matching in the database based on encrypted keywords. This design achieves secure outsourcing of computational tasks: the client encrypts the privacy-related query keywords and delegates the ciphertext computation task to the server. The server uses the evaluation key to complete complex retrieval computations but never accesses any plaintext information, thus technically ensuring that even if the server is not entirely trustworthy, the user's query privacy is effectively protected.

[0037] S3, the called terminal parses the keyword based on the received password token, uses the private key to homomorphically encrypt the keyword, generates an encrypted query request, and sends it to the identity credential query server.

[0038] In practice, when the called terminal receives a password token from the calling party, its built-in CHAKEN client module parses the token according to a predetermined protocol, extracting key fields for querying, such as a credential identifier. The called terminal uses its locally stored private key and, based on the encryption parameters specified in the previously obtained hidden information retrieval configuration parameters, performs homomorphic encryption on the key, converting the plaintext key into a ciphertext data block that cannot be directly deciphered—i.e., an encrypted query request. Subsequently, the called terminal sends this encrypted query request to the identity credential query server.

[0039] In some preferred embodiments, the homomorphic encryption employs the BFV algorithm; wherein the BFV algorithm uses a polynomial ring for encryption operations, and the degree, modulus, and plaintext modulus of the polynomial ring are set according to the fixed byte length of the identity credential index in the trusted communication specification.

[0040] In specific implementation, the homomorphic encryption algorithm used is the BFV algorithm. This algorithm is based on a polynomial ring. During implementation, core parameters such as the degree, modulus, and plaintext modulus of the polynomial ring need to be set. The setting of these parameters references the explicit specifications for the length of the identity credential index field in the Trusted Communication Technology Specification. For example, the specification defines the credential index as a fixed byte length (e.g., 32 bytes). During implementation, the system selects or calculates a plaintext modulus that can accommodate the data range corresponding to this fixed length and meets the security and efficiency requirements. Subsequently, based on the selected plaintext modulus and the target security strength, the degree and modulus of the polynomial ring are further determined according to the parameter constraints of the BFV algorithm. For example, to achieve a 128-bit security strength, a polynomial ring degree of 4096 might be selected, and a large integer satisfying the conditions might be calculated as the modulus.

[0041] This embodiment achieves an optimized balance between security, functionality, and efficiency by explicitly adopting the BFV algorithm and adapting its core parameters to the fixed byte length characteristic of identity credential indexes in trusted communication. As a fully homomorphic encryption scheme based on lattice cryptography, the BFV algorithm provides a solid theoretical foundation for the system to resist quantum computing attacks. By specifically setting the algorithm parameters, especially the plaintext modulus, to the fixed length of the business fields, it ensures full utilization of the ciphertext space when encrypting business data, avoiding waste of storage and computational resources due to parameter mismatches.

[0042] Specifically, in this embodiment of the invention, the fixed byte length of the identity credential index is 32, the polynomial degree n=4096, the modulus q=2^60, the noise distribution is selected as discrete Gaussian distribution, the standard deviation σ=3.2, and the plaintext modulus t=2^32.

[0043] The aforementioned BFV parameter settings optimized for the 32-byte credential index aim to minimize computational overhead and communication load during encryption, decryption, and homomorphic computation while maintaining homomorphic encryption security strength. For example, setting the plaintext modulus t to 2^32 allows a single encryption operation to fully encode the 32-byte index value without complex data segmentation and reassembly, significantly improving both client-side encryption efficiency and server-side homomorphic computation efficiency. Furthermore, since the evaluation key is generated based on the public key and fixed parameters, it can be reused by the server for multiple queries initiated by the client within its validity period, avoiding the need for key negotiation or preparation for each query and thus optimizing the overall performance of the system in handling duplicate queries.

[0044] In some preferred embodiments, the called terminal using the private key to homomorphically encrypt the keyword includes: the called terminal encoding the keyword into a plaintext polynomial conforming to the BFV algorithm format; the called terminal using the private key and encryption parameters determined according to the hidden information retrieval configuration parameters to execute the BFV encryption algorithm on the plaintext polynomial to generate a ciphertext polynomial as the encrypted query request.

[0045] In practice, the called terminal performs homomorphic encryption of the keyword using its private key as follows: First, the called terminal encodes the keyword (usually a byte sequence) obtained from parsing the password token, converting it into a polynomial with one or more coefficients within the plaintext modulus range, i.e., a plaintext polynomial conforming to the BFV algorithm format. Encoding methods may include directly interpreting the byte sequence as integers and mapping them to the coefficients of the polynomial. Then, the called terminal reads the locally stored private key and the hidden information retrieval configuration parameters obtained from the server, which contain all the parameters required for encryption. The terminal invokes the BFV encryption algorithm, which takes the plaintext polynomial, the private key, and encryption parameters (such as error polynomial sampling parameters) as input. Random noise is introduced during algorithm execution, ultimately outputting a ciphertext polynomial pair. This ciphertext polynomial pair is the mathematical representation of the encrypted query request and exists in this ciphertext form during both transmission and computation.

[0046] In this embodiment, encoding the keyword into a plaintext polynomial is a prerequisite for processing using the BFV algorithm. This step adapts the business data to the mathematical framework of homomorphic encryption. Encryption is performed using a private key instead of a public key (in some BFV implementations, this is a symmetric encryption mode, or refers to using the secret part of the key pair), and random noise is introduced in conjunction with the algorithm parameters to ensure the semantic security of the generated ciphertext. This means that even for the same keyword, the ciphertext polynomial generated by each encryption is indistinguishable in probabilistic polynomial time, effectively preventing attackers from inferring the query content by observing and comparing the ciphertext. This encryption process completely transforms the user's sensitive query intent (i.e., the keyword) into uninterpretable gibberish, ensuring that the encrypted query request will not expose the original query content during transmission to the server and throughout the subsequent server processing chain. This fundamentally cuts off the server's access to the user's private query information, achieving strong anonymity for the query request.

[0047] S4, the identity credential query server uses the evaluation key and the preprocessed fragmented database to perform homomorphic computation on the encrypted query request, generate an encrypted query result, and return it to the called terminal; wherein, the preprocessed fragmented database is formed by the identity credential query server after preprocessing and fragmenting the original identity credential database according to the hidden information retrieval configuration parameters.

[0048] In practice, before receiving an encrypted query request, the identity credential query server has already preprocessed its maintained original identity credential database according to the same hidden information retrieval configuration parameters. The preprocessing includes converting each plaintext identity credential data into a structured format suitable for homomorphic computation, and dividing and arranging all converted data into multiple data blocks according to certain rules, forming a preprocessed fragmented database. Upon receiving the query request, the server uses the evaluation key previously uploaded by the called terminal, combined with the preprocessed fragmented database, to perform a series of homomorphic computation operations on the encrypted query request. These operations can locate and extract the target data in ciphertext, ultimately generating an encrypted query result that is also in ciphertext form. The identity credential query server returns this encrypted query result to the called terminal.

[0049] In some preferred embodiments, the preprocessed sharded database is obtained in the following manner: the identity credential query server encodes each identity credential data in the original identity credential database into a data element suitable for homomorphic computation according to the data encoding rules defined in the hidden information retrieval configuration parameters; the identity credential query server organizes all the encoded data elements into multiple logical shards according to the preset shard size and arrangement rules, thus forming the preprocessed sharded database.

[0050] In practice, the process of the identity credential query server generating a preprocessed sharded database includes the following steps. First, the server reads its stored original identity credential database, where each record contains complete identity credential information. Then, the server transforms each original record according to the data encoding rules obtained from the hidden information retrieval configuration parameters. The encoding rules define how to map unstructured or specifically formatted identity credential data into one or more data elements suitable for homomorphic computation, such as converting it into an integer vector or polynomial of a specific length. After encoding all records, the server organizes all encoded data elements according to the preset shard size and arrangement rules in the configuration parameters. For example, every N consecutive data elements are packaged into a logical block as a shard of the database. Finally, all shards are arranged sequentially to form the preprocessed sharded database. The storage format of this database is optimized for subsequent parallel or streaming homomorphic computation.

[0051] In this embodiment, encoding the original data enables seamless integration of the database content into a homomorphic computing environment based on polynomial rings. This is a prerequisite for the server to perform retrieval operations on the encrypted database. Logically sharding the encoded database offers multiple benefits. First, the sharding structure supports parallel computing; when the server processes a query, it can perform calculations on different shards simultaneously, significantly reducing query response time. Furthermore, sharding helps manage memory overhead and data access patterns during computation, making covert queries on large-scale databases feasible. Moreover, this preprocessing and sharding are performed during server initialization or data updates, constituting a one-time or low-frequency operation, and its computational cost can be amortized across a large number of subsequent query requests. This architecture, which preprocesses the database and organizes it into multiple logical shards, not only facilitates parallel computing to improve the response speed of a single query but also effectively adapts to retrieval algorithms based on polynomial homomorphic encryption, enabling the server to handle covert query requests for large-scale databases with a fixed and efficient computational pattern. The preprocessing operation is a one-time or low-frequency operation, and its cost can be amortized across a massive number of queries.

[0052] S5, the called terminal uses the private key to decrypt the encrypted query result and obtain the target identity credential.

[0053] In practice, after receiving the encrypted query result, the called terminal uses its locally stored secure private key to perform a homomorphic decryption algorithm on the result. The decryption algorithm outputs plaintext data, which is the target identity credential information required by the called terminal, such as the caller's name or authentication identifier.

[0054] This invention systematically solves the privacy and data security problems in traditional trusted communication queries by deconstructing the complete query process into three stages: configuration acquisition, localized key generation and management, and end-to-end encrypted execution of the query. In the configuration acquisition stage, the client and server synchronize the basic algorithm parameters necessary for subsequent encryption / decryption and homomorphic computation, establishing a unified technical context for the entire security protocol. In the key management stage, the client generates a key pair that only it holds as the decryption private key, and entrusts the server with the evaluation key used only for ciphertext computation. This ensures, from a cryptographic perspective, that the confidentiality of the query results can only be controlled by the client. In the query execution stage, the client's query intent is encrypted into an unrecognizable ciphertext request. The server, without knowing the query content or the plaintext result, performs blind-state computation on a pre-processed encrypted database using the evaluation key. This process ensures that the server cannot obtain the specific query keywords, the returned identity credential data, or the user's query behavior patterns, achieving the anonymity of the query content. Ultimately, only legitimate clients can use their private keys to decrypt and obtain the required information, thus effectively protecting user privacy and ensuring the security of data transmission and computation while realizing the core function of trusted identity query.

[0055] Please see Figure 2 , Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.

[0056] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0057] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform a keyword-based trusted identity concealment query method.

[0058] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0059] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a keyword-based trusted identity concealment query method.

[0060] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0061] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: The called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server; The called terminal generates a homomorphic encryption key pair and a corresponding evaluation key based on the hidden information retrieval configuration parameters. The homomorphic encryption key pair includes a public key and a private key. The called terminal uploads the evaluation key to the identity credential query server for storage and keeps the private key locally. The called terminal parses the keyword based on the received password token, uses the private key to homomorphically encrypt the keyword, generates an encrypted query request, and sends it to the identity credential query server. The identity credential query server uses the evaluation key and the preprocessed fragmented database to perform homomorphic computation on the encrypted query request, generate an encrypted query result, and return it to the called terminal; wherein, the preprocessed fragmented database is formed by the identity credential query server after preprocessing and fragmenting the original identity credential database according to the hidden information retrieval configuration parameters. The called terminal uses the private key to decrypt the encrypted query result to obtain the target identity credential.

[0062] Optionally, the homomorphic encryption employs the BFV algorithm.

[0063] Optionally, the BFV algorithm uses a polynomial ring for encryption operations, wherein the degree, modulus, and plaintext modulus of the polynomial ring are set according to the fixed byte length of the identity credential index in the trusted communication specification.

[0064] Optionally, the process by which the called terminal generates the evaluation key includes: The called terminal calculates an evaluation key for performing multiplication and relinearization operations on homomorphic ciphertext by executing the evaluation key generation function specified in the BFV algorithm, based on the public key and the algorithm parameters included in the hidden information retrieval configuration parameters.

[0065] Optionally, the called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server, including: The called terminal sends a configuration request to the identity credential query server; In response to the configuration request, the identity credential query server sends a message to the called terminal, the message containing the polynomial ring degree, modulus, plaintext modulus and noise distribution parameters required by the hidden information retrieval algorithm.

[0066] Optionally, the called terminal uses the private key to perform homomorphic encryption on the keyword, including: The called terminal encodes the keyword into a plaintext polynomial conforming to the BFV algorithm format; The called terminal uses the private key and the encryption parameters determined according to the hidden information retrieval configuration parameters to perform the BFV encryption algorithm on the plaintext polynomial to generate the ciphertext polynomial as the encrypted query request.

[0067] Optionally, the preprocessed sharded database is obtained in the following way: The identity credential query server encodes each piece of identity credential data in the original identity credential database into a data element suitable for homomorphic computation based on the data encoding rules defined in the hidden information retrieval configuration parameters. The identity credential query server organizes all encoded data elements into multiple logical fragments according to preset fragment size and arrangement rules, forming the preprocessed fragmented database.

[0068] Optionally, the called terminal maintains a configuration cache module locally; the method further includes: After the called terminal performs the operation of obtaining the hidden information retrieval configuration parameters for the first time, it stores the obtained hidden information retrieval configuration parameters in the configuration cache module; When an encrypted query request needs to be generated subsequently, the called terminal will first read the hidden information retrieval configuration parameters from the configuration cache module.

[0069] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0070] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0071] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: The called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server; The called terminal generates a homomorphic encryption key pair and a corresponding evaluation key based on the hidden information retrieval configuration parameters. The homomorphic encryption key pair includes a public key and a private key. The called terminal uploads the evaluation key to the identity credential query server for storage and keeps the private key locally. The called terminal parses the keyword based on the received password token, uses the private key to homomorphically encrypt the keyword, generates an encrypted query request, and sends it to the identity credential query server. The identity credential query server uses the evaluation key and the preprocessed fragmented database to perform homomorphic computation on the encrypted query request, generate an encrypted query result, and return it to the called terminal; wherein, the preprocessed fragmented database is formed by the identity credential query server after preprocessing and fragmenting the original identity credential database according to the hidden information retrieval configuration parameters. The called terminal uses the private key to decrypt the encrypted query result to obtain the target identity credential.

[0072] Optionally, the homomorphic encryption employs the BFV algorithm.

[0073] Optionally, the BFV algorithm uses a polynomial ring for encryption operations, wherein the degree, modulus, and plaintext modulus of the polynomial ring are set according to the fixed byte length of the identity credential index in the trusted communication specification.

[0074] Optionally, the process by which the called terminal generates the evaluation key includes: The called terminal calculates an evaluation key for performing multiplication and relinearization operations on homomorphic ciphertext by executing the evaluation key generation function specified in the BFV algorithm, based on the public key and the algorithm parameters included in the hidden information retrieval configuration parameters.

[0075] Optionally, the called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server, including: The called terminal sends a configuration request to the identity credential query server; In response to the configuration request, the identity credential query server sends a message to the called terminal, the message containing the polynomial ring degree, modulus, plaintext modulus and noise distribution parameters required by the hidden information retrieval algorithm.

[0076] Optionally, the called terminal uses the private key to perform homomorphic encryption on the keyword, including: The called terminal encodes the keyword into a plaintext polynomial conforming to the BFV algorithm format; The called terminal uses the private key and the encryption parameters determined according to the hidden information retrieval configuration parameters to perform the BFV encryption algorithm on the plaintext polynomial to generate the ciphertext polynomial as the encrypted query request.

[0077] Optionally, the preprocessed sharded database is obtained in the following way: The identity credential query server encodes each piece of identity credential data in the original identity credential database into a data element suitable for homomorphic computation based on the data encoding rules defined in the hidden information retrieval configuration parameters. The identity credential query server organizes all encoded data elements into multiple logical fragments according to preset fragment size and arrangement rules, forming the preprocessed fragmented database.

[0078] Optionally, the called terminal maintains a configuration cache module locally; the method further includes: After the called terminal performs the operation of obtaining the hidden information retrieval configuration parameters for the first time, it stores the obtained hidden information retrieval configuration parameters in the configuration cache module; When an encrypted query request needs to be generated subsequently, the called terminal will first read the hidden information retrieval configuration parameters from the configuration cache module.

[0079] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0080] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0081] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0082] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0083] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0084] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0085] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0086] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A keyword-based method for trusted identity concealment query, characterized in that, Applied to a trusted communication system, the trusted communication system includes a called terminal and an identity credential query server, including: The called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server; The called terminal generates a homomorphic encryption key pair and a corresponding evaluation key based on the hidden information retrieval configuration parameters. The homomorphic encryption key pair includes a public key and a private key. The called terminal uploads the evaluation key to the identity credential query server for storage and keeps the private key locally. The called terminal parses the keyword based on the received password token, uses the private key to homomorphically encrypt the keyword, generates an encrypted query request, and sends it to the identity credential query server. The identity credential query server uses the evaluation key and the preprocessed fragmented database to perform homomorphic computation on the encrypted query request, generate an encrypted query result, and return it to the called terminal; wherein, the preprocessed fragmented database is formed by the identity credential query server after preprocessing and fragmenting the original identity credential database according to the hidden information retrieval configuration parameters. The called terminal uses the private key to decrypt the encrypted query result to obtain the target identity credential.

2. The keyword-based trusted identity concealment query method according to claim 1, characterized in that, The homomorphic encryption uses the BFV algorithm.

3. The keyword-based trusted identity concealment query method according to claim 2, characterized in that, The BFV algorithm uses a polynomial ring for encryption operations. The degree, modulus, and plaintext modulus of the polynomial ring are set according to the fixed byte length of the identity credential index in the trusted communication specification.

4. The keyword-based trusted identity concealment query method according to claim 1 or 2, characterized in that, The process by which the called terminal generates the evaluation key includes: The called terminal calculates an evaluation key for performing multiplication and relinearization operations on homomorphic ciphertext by executing the evaluation key generation function specified in the BFV algorithm, based on the public key and the algorithm parameters included in the hidden information retrieval configuration parameters.

5. The keyword-based trusted identity concealment query method according to claim 1, characterized in that, The called terminal obtains the hidden information retrieval configuration parameters from the identity credential query server, including: The called terminal sends a configuration request to the identity credential query server; In response to the configuration request, the identity credential query server sends a message to the called terminal, the message containing the polynomial ring degree, modulus, plaintext modulus and noise distribution parameters required by the hidden information retrieval algorithm.

6. The keyword-based trusted identity concealment query method according to claim 1 or 2, characterized in that, The called terminal uses the private key to perform homomorphic encryption on the keyword, including: The called terminal encodes the keyword into a plaintext polynomial conforming to the BFV algorithm format; The called terminal uses the private key and the encryption parameters determined according to the hidden information retrieval configuration parameters to perform the BFV encryption algorithm on the plaintext polynomial to generate the ciphertext polynomial as the encrypted query request.

7. The keyword-based trusted identity concealment query method according to claim 1, characterized in that, The preprocessed sharded database is obtained through the following method: The identity credential query server encodes each piece of identity credential data in the original identity credential database into a data element suitable for homomorphic computation based on the data encoding rules defined in the hidden information retrieval configuration parameters. The identity credential query server organizes all encoded data elements into multiple logical fragments according to preset fragment size and arrangement rules, forming the preprocessed fragmented database.

8. The keyword-based trusted identity concealment query method according to claim 1, characterized in that, The called terminal maintains a configuration cache module locally; the method further includes: After the called terminal performs the operation of obtaining the hidden information retrieval configuration parameters for the first time, it stores the obtained hidden information retrieval configuration parameters in the configuration cache module; When an encrypted query request needs to be generated subsequently, the called terminal will first read the hidden information retrieval configuration parameters from the configuration cache module.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-8.