A browser-oriented hidden query method, system and storage medium
By decentralizing hidden query calculations in the browser's built-in security sandbox and cloud TEE environment, the problem of insufficient computing power in the browser environment is solved, and an efficient and safe hidden query experience and query efficiency are achieved.
Patent Information
- Application Number
- CN202411080266.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-08
AI Technical Summary
Due to limited computing power in browser and mobile device environments, existing hidden query technology is difficult to run complex hidden query algorithms, affecting user experience and query efficiency.
By dispersing hidden query computing tasks in the browser's built-in security sandbox and cloud TEE environment, utilizing offline and online hybrid computing strategies to ensure that sensitive calculations are executed in a protected environment, reducing browser-side computing pressure, and through secure communication and decomposition Query instructions reduce the risk of privacy exposure.
It achieves an efficient, convenient and privacy-friendly browser query experience, improves query efficiency and security, reduces the risk of privacy leaks, and optimizes system security through resource allocation and isolation.
Smart Images

Figure CN118606539B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a browser-oriented hidden query method, system and storage medium. Background Art
[0002] With the widespread application of technologies such as big data, cloud computing and artificial intelligence, the value of data has become increasingly prominent, but at the same time, the issue of data privacy protection has become increasingly severe. On the one hand, the centralized storage and processing of massive data increases the risk of data leakage; on the other hand, users are paying more and more attention to their personal privacy rights and interests, and have put forward higher requirements for the legality and compliance of data processing.
[0003] How to efficiently utilize data resources while ensuring the privacy and security of personal data has become a technical problem that needs to be solved urgently. Especially in the field of data query, the traditional query mode requires users to submit clear query instructions directly to the server, which may lead to the exposure of query content and related privacy information, and there is a significant risk of privacy leakage. As a feasible solution, hidden query technology allows users to complete information retrieval without revealing their query intentions, becoming an important way to protect privacy and maintain data security.
[0004] However, in practical applications, the existing hidden query technology, especially in environments with limited client resources, such as browsers and mobile devices, is difficult to run complex hidden query algorithms due to the limited computing power of such lightweight clients. For example, the quantum-resistant hidden query algorithm based on LWE (Learning With Errors) has limited computing power, which restricts the real-time application of such complex algorithms and affects user experience and query efficiency. Summary of the invention
[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a browser-oriented hidden query method, system and storage medium, which helps to keep the browser side lightweight while reasonably allocating computing tasks, thereby achieving an efficient, convenient and privacy-friendly browser query experience.
[0006] In order to implement the above technical solution, in a first aspect, the present invention provides a browser-oriented hidden query method, comprising:
[0007] Step 1: The data server performs hidden query offline calculation to obtain public parameters;
[0008] Step 2: Publicize and distribute the acquired public parameters;
[0009] Step 3: Create a cloud TEE environment and establish secure communication between the browser and the cloud TEE environment;
[0010] Step 4: Download the public parameters to the cloud TEE environment, perform hidden query offline calculation based on the downloaded public parameters in the cloud TEE environment, and obtain the local calculation vector of the cloud TEE environment;
[0011] Step 5: Enter the query conditions through the browser to construct the selection vector and decompose the selection vector and send it to the cloud TEE environment;
[0012] Step 6: Based on the decomposed selection vector and the local calculation vector, online calculation is performed in the cloud TEE to obtain the cloud environment vector, and the cloud environment vector is sent to the data server;
[0013] Step 7: The data server performs online calculation based on the received cloud environment vector and public parameters, and returns the calculation result vector to the cloud;
[0014] Step 8: The cloud sends the calculation result vector and the local calculation vector to the browser;
[0015] Step 9: The browser assembles the received calculation result vector and the local calculation vector to display the query result.
[0016] Furthermore, the steps also include:
[0017] Dynamically adjust and recalculate public parameters and periodically perform hidden query offline calculations in the cloud TEE environment.
[0018] Furthermore, the step 1 comprises:
[0019] Transform and slice the data in the database to generate a transformation matrix;
[0020] Generate a random matrix;
[0021] The transformation matrix and the random matrix are operated to obtain the compression matrix.
[0022] Furthermore, the step 4 includes:
[0023] Generate a random number and send it to the cloud TEE environment;
[0024] Download public parameters to the cloud TEE environment;
[0025] Generate a random vector based on the random number, wherein the random vector includes a random key vector and a perturbation vector;
[0026] Generate a local computation vector based on the generated random vector and the public parameters.
[0027] Furthermore, the step three comprises:
[0028] Start the security sandbox in the browser and create a cloud TEE environment;
[0029] Establish communication between the browser and the cloud TEE environment.
[0030] On the other hand, the present invention provides a browser-oriented hidden query system, comprising:
[0031] A browser with a built-in security sandbox is used to provide users with an isolated execution space through the security sandbox to perform lightweight sensitive hidden query calculations in the execution space, thereby ensuring that the execution steps of the hidden query algorithm are run under safe and controlled conditions, wherein the hidden query calculation includes receiving teahouse conditions, segmenting the query conditions and converting them into secure and decentralized query instructions, and sending the query instructions to different remote TEEs, as well as receiving vectors from different cloud TEEs and performing merge calculations to generate the final query results;
[0032] The cloud TEE environment module is used to execute complex hidden query computing tasks that are not suitable for execution on the user's browser. The complex computing tasks include hidden query computing tasks based on LWE and matrix computing tasks. Among them, the hidden query computing tasks based on LWE include online computing and offline computing.
[0033] Data server, used to store and manage large amounts of data, and provide anonymous query services to respond to anonymous query requests from cloud TEE.
[0034] Furthermore, the data server comprises:
[0035] Database, used to store data;
[0036] Storage and management modules, used for secure storage, backup, recovery and daily management of data;
[0037] The hidden query offline calculation module is used for offline calculation of hidden queries, which includes data sharding, calculation of public parameters and data update calculation;
[0038] The hidden query request response module is responsible for receiving requests and triggering the corresponding data calculation process when a hidden query request is sent in the cloud TEE environment.
[0039] On the other hand, the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned browser-oriented hidden query method.
[0040] The beneficial effects of the present invention are:
[0041] (1) The present invention utilizes the built-in security sandbox of the browser and establishes a trusted execution environment (TEE) in the cloud, distributes the hidden query algorithm in the browser, the cloud TEE trusted execution environment and the data server, and constructs a three-layer hidden query solution. This not only optimizes resource allocation, but also significantly improves the security of the system through physical and logical isolation, thereby helping to keep the browser lightweight while reasonably allocating computing tasks, and achieving an efficient, convenient and privacy-friendly browser query experience.
[0042] (2) By creating a cloud-based TEE environment, we ensure that sensitive computing tasks are executed in a protected environment, and by establishing a secure connection between the cloud-based TEE environment and the browser, a large number of computing tasks can be transferred to the TEE for execution, effectively reducing the computing pressure on the browser side and ensuring the security of the computing process.
[0043] (3) By utilizing the browser security sandbox mechanism, a secure and isolated execution environment is created for the key steps of the hidden query algorithm. In this environment, operations involving privacy, such as key management, preliminary construction of query parameters, query vector decomposition, and secure channel establishment, are performed to ensure that the algorithm runs under secure and controlled conditions, preventing intrusion from other browser components and external applications.
[0044] (4) Adopting an offline and online hybrid computing strategy, the burden of online computing is reduced by utilizing offline computing, which improves the real-time nature and response speed of queries. When querying online, the browser only needs to perform a small amount of computing and interact with the cloud, which significantly improves query efficiency and reduces the risk of privacy exposure.
[0045] In addition, the present invention can also be updated and optimized according to user feedback to enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0047] Figure 1 The present invention is a flowchart of a browser-oriented hidden query method.
[0048] Figure 2 A schematic diagram of the data server of the present invention executing hidden query offline calculation to obtain public parameters.
[0049] Figure 3 It is a schematic diagram of offline calculation of the present invention.
[0050] Figure 4 It is a schematic diagram of analyzing the selection vector according to the present invention.
[0051] Figure 5 It is a schematic diagram of obtaining a cloud environment vector by performing online calculation in a cloud TEE environment according to the present invention.
[0052] Figure 6 It is a schematic diagram of the data server of the present invention performing online calculation based on the received cloud environment vector.
[0053] Figure 7 It is a schematic diagram of the browser of the present invention assembling the received calculation result vector and the local calculation vector. DETAILED DESCRIPTION
[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0055] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present invention. Unless otherwise specified, each technical and scientific term used in this embodiment has the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0056] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0057] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.
[0058] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.
[0059] Among them, in the Learning With Errors (LWE) algorithm in lattice cryptography, the selection of algorithm parameters is crucial to the security and efficiency of the algorithm. The LWE problem involves three main parameters: integer n, modulus q, and error distribution X on integers. The detailed explanation of these parameters and some considerations when selecting them are as follows:
[0060] Integer n:
[0061] n represents the number of unknowns in each equation, which is the dimension of the secret vector s in the LWE problem.
[0062] The size of n directly affects the difficulty of the LWE problem. Increasing n will increase the difficulty of the problem, but it will also improve the security of the algorithm. In practical applications, the choice of n needs to be determined based on specific security requirements.
[0063] Module q:
[0064] q is the size of the finite field, usually a sufficiently large prime number. The size of q also needs to be selected based on security requirements. A smaller q may result in an insecure algorithm, while a larger q may increase the computational complexity. In some LWE implementations, the value of q is polynomially related to n, i.e., q = poly(n).
[0065] Error distribution X: X is an error distribution on integers, which can usually be regarded as a discrete Gaussian distribution. This distribution determines the range of the error term e in the LWE problem. The error e is randomly sampled from X, so the width of X (similar to the standard deviation of the Gaussian distribution) can be regarded as the relative error rate. In practical applications, the width of X needs to be selected according to the security and efficiency requirements of the algorithm.
[0066] In addition to the above three main parameters, LWE problems often involve the following parameters:
[0067] m: the number of equations in the linear system. In LWE problems, m is usually set to a polynomial multiple of n, i.e., m = poy(n). Increasing m can make the problem easier to solve, but it will also increase the computational and storage overhead.
[0068] B: The upper limit of error noise. This parameter determines how much the solution to the problem can differ from the actual value. In practical applications, B needs to be much smaller than q to ensure that the correct solution is found.
[0069] Embodiment 1:
[0070] like Figure 1 As shown, this embodiment provides a browser-oriented hidden query method, comprising the following steps:
[0071] S1: Initialize algorithm parameters.
[0072] Specifically, appropriate Learning With Errors (LWE) algorithm parameters in lattice cryptography are selected according to actual needs.
[0073] Among them, in the Learning With Errors (LWE) algorithm in lattice cryptography, the selection of algorithm parameters is crucial to the security and efficiency of the algorithm. The LWE problem involves three main parameters: integer n, modulus q, and error distribution X on integers. The detailed explanation of these parameters and some considerations when selecting them are as follows:
[0074] Integer n:
[0075] n represents the number of unknowns in each equation, which is the dimension of the secret vector s in the LWE problem.
[0076] The size of n directly affects the difficulty of the LWE problem. Increasing n will increase the difficulty of the problem, but it will also improve the security of the algorithm. In practical applications, the choice of n needs to be determined based on specific security requirements.
[0077] Module q:
[0078] q is the size of the finite field, usually a sufficiently large prime number. The size of q also needs to be selected based on security requirements. A smaller q may result in an insecure algorithm, while a larger q may increase the computational complexity. In some LWE implementations, the value of q is polynomially related to n, i.e., q = poly(n).
[0079] Error distribution X: X is an error distribution on integers, which can usually be regarded as a discrete Gaussian distribution. This distribution determines the range of the error term e in the LWE problem. The error e is randomly sampled from X, so the width of X (similar to the standard deviation of the Gaussian distribution) can be regarded as the relative error rate. In practical applications, the width of X needs to be selected according to the security and efficiency requirements of the algorithm.
[0080] In addition to the above three main parameters, LWE problems often involve the following parameters:
[0081] m: the number of equations in the linear system. In LWE problems, m is usually set to a polynomial multiple of n, i.e., m = poy(n). Increasing m can make the problem easier to solve, but it will also increase the computational and storage overhead.
[0082] B: The upper limit of error noise. This parameter determines how much the solution to the problem can differ from the actual value. In practical applications, B needs to be much smaller than q to ensure that the correct solution is found.
[0083] S2: The data server performs hidden query offline computation to obtain public parameters.
[0084] Specifically, Figure 2 As shown, the following steps are included:
[0085] S21: Transform and slice the data in the database to generate a transformation matrix.
[0086] Specifically, the data server performs sharding processing on the data to be queried in the database (a certain amount of data is selected) to generate a view and convert it into a transformation matrix (the transformation matrix is denoted as transformation matrix D, where the dimension is, for example, m*n), where each row of the generated transformation matrix D represents a tuple (or represents a data record).
[0087] S22: Generate a random matrix.
[0088] Specifically, the data server first randomly generates a seed and sets the algorithm of the pseudo-random generator (PRG algorithm), and then constructs a random matrix based on the seed according to the dimension of the transformation matrix D and a predetermined compression ratio (the random matrix is denoted as a random matrix R, where the dimension is, for example, r*m).
[0089] The predetermined compression ratio is manually set based on experience, and the size of the dimension is set based on the compression ratio and efficiency.
[0090] S23: Perform operations on the conversion matrix and the random matrix to obtain a compression matrix.
[0091] Specifically, the transformation matrix D and the random matrix R are multiplied (ie, the transformation matrix D * the random matrix R) to obtain a compression matrix (the compression matrix is denoted as compression matrix P, where the dimension is r*n) (eg Figure 2 as shown).
[0092] It should be noted that the compression matrix P, seed and PRG algorithm are public parameters.
[0093] S3: Publish and distribute the acquired public parameters.
[0094] Specifically, the seed, PRG algorithm and compression matrix P are digitally signed and made public for downloading.
[0095] S4: Create a secure environment in the browser and the cloud, and establish secure communication between the browser and the cloud.
[0096] The specific steps include:
[0097] S41: Start the security sandbox in the browser and create a cloud TEE environment.
[0098] Specifically, a security sandbox is started in the browser, and a trusted execution environment (TEE) is created in the cloud as a secure execution environment for hidden queries.
[0099] It should be noted that one or more cloud TEEs may be created, such as cloud TEE1, cloud TEE2, and cloud TEEn, where n is an integer greater than 1. In this embodiment, for ease of explanation and understanding, two cloud TEEs are established, namely cloud TEE1 and cloud TEE2.
[0100] S42: Establish communication between the browser and the cloud TEE environment.
[0101] Specifically, a secure TLS channel or IP tunnel is established using hardware devices such as USB Key or local TEE, or the browser's own security components, and cloud-based TEE remote authentication is performed, so that a secure channel is established between the browser security sandbox and the cloud-based TEE environment.
[0102] S5: Perform hidden query offline calculation in the cloud TEE environment to obtain the local calculation vector.
[0103] The specific steps include:
[0104] S51: Generate a random number.
[0105] Specifically, two random numbers are generated in the browser sandbox using hardware devices such as USB Key or local TEE or the browser's own security component (for ease of understanding and expression, the two random numbers are recorded as sr0 and sr1 respectively), and the generated random numbers sr0 and sr1 are sent to the cloud TEE environment through a secure channel.
[0106] S52: Downloading common parameters.
[0107] Specifically, the seed, PRG algorithm and compressed matrix P are downloaded, and the random matrix R is restored through the PRG algorithm and seed.
[0108] S53: Generate a random vector.
[0109] Specifically, the cloud TEE environment uses random numbers sr0 and sr1 as seeds to generate a random key vector (the random key vector is denoted as a random key vector s, where the dimension is 1*r) and a perturbation vector (the perturbation vector is denoted as a perturbation vector e, where the dimension is 1*m).
[0110] Among them, the random number sr0 derives the random key vector s; the random number sr1 derives the disturbance vector e.
[0111] S54: Execute offline calculation.
[0112] Specifically, Figure 3 As shown, the local first calculation vector is obtained through the random key vector s, the random matrix R and the perturbation vector e (the local first calculation vector is recorded as the local first calculation vector v), that is, v = s * R + e, where the dimension of the local first calculation vector v is 1*m.
[0113] A local second calculation vector (the local second calculation vector is recorded as a local second calculation vector t) is obtained through the random key vector s and the compression matrix P, that is, t = s * P, where the dimension of the local second calculation vector t is 1*n.
[0114] S6: Enter the query conditions, build the tag vector, decompose the tag vector and send it to the cloud TEE environment.
[0115] Specifically, a selection vector with a dimension of 1*m is constructed (for ease of explanation and understanding, the marking vector is recorded as the selection vector b), the query conditions are entered through the browser's interactive interface, and the query sequence number (for example, i, that is, the i-th data in the query selection vector) is determined, where the i-th value of the selection vector is 1, and the remaining vector values are 0; hidden query can ultimately be abstracted to an operation of querying database records based on sequence number i, that is, you can think of this vector as a sequence, and the i-th one is 1 to indicate that this record is to be queried.
[0116] The selection vector b is decomposed in the browser security sandbox. In this embodiment, it is decomposed into two vectors, namely, a first selection vector b1 and a second selection vector b2, namely, b = b1 + b2 (eg Figure 4 as shown).
[0117] It should be noted that the decomposition of the selection vector b may also be the addition of multiple vectors.
[0118] The first selection vector b1 and the second selection vector b2 are respectively sent to the cloud TEE environment, such as cloud TEE1 and TEE2, through a secure channel, and remote authentication is performed to ensure data integrity.
[0119] S7: Perform online calculation in the cloud TEE environment, obtain the cloud environment vector, and send the cloud environment vector to the data server.
[0120] Specifically, as follows Figure 5 As shown: In the cloud TEE1 environment, based on the local first calculation vector v and the received vector b1, the following calculation is performed to obtain the first cloud environment calculation vector v1: v1 = v + b1.
[0121] In the cloud TEE2 environment, based on the local second calculation vector and the received vector b2, the following calculation is performed to obtain the second cloud environment calculation vector v2: v2 = v + b2.
[0122] The obtained first cloud environment calculation vector v1 and second cloud environment calculation vector v2 are sent to the data server.
[0123] S8: The data server performs online calculation based on the received cloud environment vector and returns the calculation result vector to the cloud TEE environment.
[0124] Specifically, the data server receives the first cloud environment calculation vector v1 from the cloud TEE1 environment and the second cloud vector v2 from the cloud TEE2 environment, and performs the following calculation based on the conversion matrix D generated during offline calculation to obtain the first calculation result (the first calculation result vector is recorded as x1) and the second calculation result (the first calculation result vector is recorded as x2): x1 = v1 * D and x2 = v2 * D (specifically, as Figure 6 as shown).
[0125] The first calculation result vector x1 is returned to the cloud TEE1 environment, and the second calculation result vector x2 is returned to the cloud TEE2 environment.
[0126] S9: After receiving the calculation result vector, the cloud TEE sends the calculation result vector and the local calculation vector to the browser.
[0127] Specifically, the cloud TEE1 environment sends the returned first calculation result vector x1 and the local second calculation vector t obtained during offline calculation to the browser, and the cloud TEE2 environment sends the returned second calculation result x2 and the local second calculation vector t obtained during offline calculation to the browser.
[0128] It should be noted that if each cloud TEE environment uses an independent random key s and perturbation vector e, the local first calculation vector v1 t1, v2 t2 is calculated respectively, and the data server executes vb1=v1+b1, vb2=v2+b2 respectively. The calculation of the final assembled query result is D[i]= x1 – t1 + x2 – t2
[0129] S10: The browser assembles the received calculation result vector and the local calculation vector to display the query result.
[0130] Specifically, the browser receives the first calculation result vector x1 and the local second calculation vector t from the cloud TEE1 environment and the second calculation result vector x2 and the local second calculation vector t from the cloud TEE2 environment.
[0131] Verify the consistency of the local second calculation vector t from the cloud TEE1 environment and the local second calculation vector t from the cloud TEE2 environment in the browser security sandbox; if they are consistent, display and calculate the query result: D[i]=x1+ x2–t (such as Figure 7 As shown); if they are inconsistent, it means that one of the nodes is illegal, the algorithm is terminated, and an alarm is issued.
[0132] Furthermore, this embodiment also includes:
[0133] Q1: Periodically refresh random numbers.
[0134] Specifically, after the query operation is completed, the browser updates the random number according to the security policy and repeats the offline calculation steps in the cloud TEE environment.
[0135] And Q2: Dynamic adjustment and recalculation of common parameters.
[0136] Specifically, when the database of the data server is updated, the public parameter P is recalculated using a new seed, and the cloud TEE environment synchronously updates the parameter and performs a new round of offline calculations.
[0137] This embodiment has the following advantages:
[0138] (1) The present invention utilizes the built-in security sandbox of the browser and establishes a trusted execution environment (TEE) in the cloud, distributes the hidden query algorithm in the browser, the cloud TEE trusted execution environment and the data server, and constructs a three-layer hidden query solution, which not only optimizes resource allocation, but also significantly improves the security of the system through physical and logical isolation.
[0139] (2) By creating a cloud-based TEE environment, we ensure that sensitive computing tasks are executed in a protected environment, and by establishing a secure connection between the cloud-based TEE environment and the browser, a large number of computing tasks can be transferred to the TEE for execution, effectively reducing the computing pressure on the browser side and ensuring the security of the computing process.
[0140] (3) By utilizing the browser security sandbox mechanism, a secure and isolated execution environment is created for the key steps of the hidden query algorithm. In this environment, operations involving privacy, such as key management, preliminary construction of query parameters, query vector decomposition, and secure channel establishment, are performed to ensure that the algorithm runs under secure and controlled conditions, preventing intrusion from other browser components and external applications.
[0141] (4) Adopting an offline and online hybrid computing strategy, the burden of online computing is reduced by utilizing offline computing, which improves the real-time nature and response speed of queries. When querying online, the browser only needs to perform a small amount of computing and interact with the cloud, which significantly improves query efficiency and reduces the risk of privacy exposure.
[0142] (5) The query request is split and processed to ensure that each part alone cannot leak the query information. Only when all the split parts are merged in the browser's security sandbox can the complete query result be restored. This mechanism further disperses trust and improves security, ensuring that even if a single TEE is attacked, the query content will not be leaked.
[0143] (6) The browser integrates the user's physical security devices, such as USB Key or TrustZone of mobile devices, for private key management, authentication and encryption operations. This integration not only further enhances the security of the client, but also improves the efficiency of the browser's hidden query technology.
[0144] In summary, this embodiment effectively overcomes the problem of resource limitation in the browser environment, constructs an efficient and secure hidden query method, and has high practical value and broad application prospects.
[0145] Embodiment 2:
[0146] This embodiment provides a browser-oriented hidden query system, including: a browser, a cloud-based TEE executable environment, and a data server.
[0147] (1) Browser refers to a client application used by users to access Internet resources to interact with users. The browser has a built-in security sandbox function, which provides users with an isolated execution space through the security sandbox. The execution space is used to execute lightweight and sensitive hidden query calculations locally, thereby ensuring that the execution steps of the hidden query algorithm run under secure and controlled conditions.
[0148] Specifically, the browser includes:
[0149] The browser hidden query calculation module is used to perform hidden query calculations in the browser security sandbox. It includes: a query segmentation unit, which is used to segment the query conditions entered by the user and convert them into secure and decentralized query instructions, and send the query instructions to different remote TEEs, thereby ensuring that each cloud TEE environment alone cannot reconstruct the complete query. A query result merging unit is used to merge the vectors from different cloud TEEs to generate the final query result.
[0150] The browser hidden query calculation module divides and distributes the query conditions to multiple cloud TEEs, and merges and calculates the vectors from multiple cloud TEEs to generate the final query results, ensuring that no single cloud TEE can independently recover the query information, thereby improving the security of the query.
[0151] The secure hardware access and management module is used to integrate, manage and coordinate security devices such as USB Key, TPM, smart card or Trustzone of mobile devices to provide additional hardware security for key management, authentication and encryption operations.
[0152] The key management and cryptographic calculation module is used to manage the keys and authentication required for hidden queries, as well as security functions such as random number generation, key generation, key storage and use (encryption and decryption operations).
[0153] The TEE secure channel module is used to realize the encrypted connection between the browser and the cloud trusted execution environment, coordinate the computing task allocation and management of the cloud TEE, and ensure the confidentiality and integrity of data transmission.
[0154] The interactive interface module is used to provide a user-friendly interactive interface through which users submit query requests, perform identity authentication, and view query results.
[0155] (2) Cloud TEE environment refers to a trusted execution environment built in the cloud, which is used to execute complex computing tasks such as hidden queries that are not suitable to be executed on the user's browser. Complex computing tasks include: LWE-based encryption and decryption calculations, matrix calculations and other intensive computing tasks.
[0156] Specifically include:
[0157] The TEE management module is used to manage the life cycle of cloud TEE, including: creating, configuring, monitoring and destroying TEE, etc., to ensure the security and availability of the TEE environment.
[0158] The cloud hidden query calculation module is used to execute the hidden query algorithm based on LWE, which includes an offline calculation algorithm and an online calculation algorithm.
[0159] The cloud security communication module is used to connect with the TEE security channel module to achieve secure communication between the cloud TEE and the browser, and to establish secure communication with the data server, thereby ensuring transmission security and identity authentication during the query process.
[0160] (3) Data server is the server-side resource carrier for the execution of hidden query tasks. It is used to store and manage large amounts of data, provide hidden query services, and respond to hidden query requests from cloud TEE.
[0161] Specifically include:
[0162] Database, used to store data.
[0163] Storage and management module, used for secure storage, backup, recovery and daily management of data.
[0164] The hidden query offline calculation module is used for offline calculation of hidden queries, which includes data sharding, calculation of public parameters and data update calculation.
[0165] Among them, the hidden query offline calculation module includes: a data conversion and sharding module, which is used to shard and convert the data stored in the storage and management module to generate a matrix with a dimension of m*n (for the convenience of description, the matrix is recorded as matrix D), wherein each row in the generated matrix D represents a data record.
[0166] The hidden query request response module is responsible for receiving requests and triggering the corresponding data calculation process when the cloud TEE sends a hidden query request.
[0167] The server security communication module is used to connect the data server with the cloud security communication module to ensure the security of data transmission between the data server and the cloud TEE, and exchange data through an encrypted channel.
[0168] Embodiment 3:
[0169] This embodiment provides a computer-readable storage medium, which includes a stored program. When the program is running, the device where the computer-readable storage medium is located is controlled to execute the browser-oriented hidden query method described in Embodiment 1.
[0170] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0171] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0172] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, it should be noted that the flowchart in the accompanying drawings shows the method of the embodiment of the present disclosure. In the corresponding description in the flowchart or block diagram in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be performed substantially in parallel, and they can sometimes be performed in the opposite order, which can depend on the functions involved. Each block in the block diagram and / or flow chart, and the combination of blocks in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0174] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A browser-oriented hidden query method, characterized in that: include: Step 1: The data server performs hidden query offline calculation to obtain public parameters; Step 2: Publicize and distribute the acquired public parameters; Step 3: Create a cloud TEE environment and establish secure communication between the browser and the cloud TEE environment; Step 4: Download the public parameters to the cloud TEE environment, perform hidden query offline calculation based on the downloaded public parameters in the cloud TEE environment, and obtain the local calculation vector of the cloud TEE environment; Step 5: Enter the query conditions through the browser to construct the selection vector and decompose the selection vector and send it to the cloud TEE environment; Step 6: Based on the decomposed selection vector and the local calculation vector, online calculation is performed in the cloud TEE to obtain the cloud environment vector, and the cloud environment vector is sent to the data server; Step 7: The data server performs online calculation based on the received cloud environment vector and public parameters, and returns the calculation result vector to the cloud; Step 8: The cloud sends the calculation result vector and the local calculation vector to the browser; Step 9: The browser assembles the received calculation result vector and the local calculation vector to display the query result; The step one comprises: The data server processes the data to be queried in the database in slices to generate views and convert them into transformation matrices; The data server randomly generates a seed and sets an algorithm of a pseudo-random generator to construct a random matrix based on the randomly generated seed according to the dimension of the transformation matrix and a predetermined compression ratio; The conversion matrix and the random matrix are multiplied to obtain a compression matrix, wherein the compression matrix, the randomly generated seed and the algorithm of the pseudo-random generator are public parameters; The step three comprises: Create a secure environment in the browser and the cloud, and establish secure communication between the browser and the cloud; And perform hidden query offline calculation in the cloud TEE environment to obtain local calculation vectors; The step of creating a secure environment in the browser and the cloud and establishing secure communication between the browser and the cloud includes: Start the security sandbox in the browser and create a cloud TEE environment; Use USB Key or local TEE hardware device or browser's own security component to establish a secure TLS channel or IP tunnel, and perform cloud TEE remote authentication, so that the browser security sandbox and cloud TEE environment establish a secure channel; The method of performing hidden query offline calculation in the cloud TEE environment to obtain a local calculation vector includes: Generate two random numbers in the browser sandbox using a USB key or local TEE hardware device or the browser's own security component, and send the generated two random numbers to the cloud TEE environment through a secure channel; Download the compressed matrix, the randomly generated seed and the pseudo-random generator algorithm, and restore the random matrix through the randomly generated seed and the pseudo-random generator algorithm; The cloud TEE environment uses the two generated random numbers as seeds to generate a random key vector and a perturbation vector; Obtaining a local first calculation vector through a random key vector, a random matrix and a perturbation vector; A local second calculation vector is obtained through a random key vector and a compression matrix; wherein the local vector includes a local first calculation vector and a local second calculation vector.
2. The browser-oriented hidden query method according to claim 1, characterized in that: The steps also include: Dynamically adjust and recalculate public parameters and periodically perform hidden query offline calculations in the cloud TEE environment.
3. A browser-oriented hidden query system based on the browser-oriented hidden query method according to any one of claims 1 to 2, characterized in that: include: A browser with a built-in security sandbox, which is used to provide users with an isolated execution space through the security sandbox to perform lightweight sensitive hidden query calculations in the execution space, thereby ensuring that the execution steps of the hidden query algorithm are run under secure and controlled conditions, wherein the hidden query calculation includes receiving query conditions, segmenting the query conditions and converting them into secure and decentralized query instructions, and sending the query instructions to different remote TEEs, as well as receiving vectors from different cloud TEEs and performing merge calculations to generate the final query results; The cloud TEE environment module is used to execute complex hidden query computing tasks that are not suitable for execution on the user's browser. The complex computing tasks include hidden query computing tasks based on LWE and matrix computing tasks. Among them, the hidden query computing tasks based on LWE include online computing and offline computing. Data server, used to store and manage large amounts of data, and provide anonymous query services to respond to anonymous query requests from cloud TEEs; The data server comprises: Database, used to store data; Storage and management modules, used for secure storage, backup, recovery and daily management of data; The hidden query offline calculation module is used for offline calculation of hidden queries, which includes data sharding, calculation of public parameters and data update calculation; The hidden query request response module is responsible for receiving requests and triggering the corresponding data calculation process when a hidden query request is sent in the cloud TEE environment.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the browser-oriented hidden query method described in any one of claims 1 to 2.
Citation Information
Patent Citations
Privacy computing system and method based on trusted execution environment
CN115412275A
Distributed multi-party asynchronous isolation security retrieval method and device
CN117407424A
