Safety browser data encryption protection method and system based on fully homomorphic encryption

By launching a lightweight fully homomorphic encryption engine in the browser kernel to encrypt sensitive information and generate session-level key pairs, the compatibility and key management issues of fully homomorphic encryption in the browser kernel are resolved, realizing a closed-loop encrypted state for web page data throughout the entire process and preventing the leakage of sensitive data.

CN121664392APending Publication Date: 2026-03-13CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511801346.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing web security technologies cannot achieve fully homomorphic encryption in the browser kernel, making sensitive data vulnerable to leakage during transmission and server-side storage. Furthermore, traditional browser sandbox isolation mechanisms cannot prevent kernel vulnerabilities and cannot support core functions such as DOM tree construction and CSS rendering.

Method used

A lightweight fully homomorphic encryption engine is launched in the browser kernel to generate session-level key pairs, perform fully homomorphic encryption on sensitive information, generate ciphertext request packets, and perform encrypted DOM tree construction and CSS style calculation on the browser side. It supports encrypted execution of instructions, and the private key is stored in fragments through a threshold secret sharing scheme to ensure key security.

Benefits of technology

It achieves a fully encrypted closed loop from web page data request to page rendering, completely eliminating the plaintext exposure of sensitive data in the transmission link, server storage and browser memory, thus improving browser security and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664392A_ABST
    Figure CN121664392A_ABST
Patent Text Reader

Abstract

The invention discloses a security browser data encryption protection method and system based on fully homomorphic encryption, and belongs to the technical field of data security. The method comprises the following steps: starting a lightweight fully homomorphic encryption engine in a browser kernel, constructing an encryption browsing pipeline, and when a user initiates a webpage access request through a browser, generating a session-level key pair based on the fully homomorphic encryption engine; sending a ciphertext request packet to a server through the encrypted browsing pipeline, and receiving an encrypted response packet returned by the server after the server executes calculation on the ciphertext request packet based on the browser; and generating a webpage corresponding to the webpage access request. According to the method, the problem of sensitive data leakage risk caused by transmission layer encryption and server / browser memory plaintext processing in the existing Web security scheme is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, and more specifically, to a secure browser data encryption protection method and system based on fully homomorphic encryption. Background Technology

[0002] As web applications penetrate deeper into sensitive areas, the security of user data during browser-server interactions is becoming increasingly prominent. Existing web security technologies mainly rely on the HTTPS protocol for transport layer encryption, but this has inherent flaws: HTTPS only guarantees the security of data transmission; the server must decrypt the received data before processing it, and the data exists in plaintext in the server's memory and database, making it vulnerable to internal leaks, server compromise, and other security threats. Furthermore, traditional browser sandbox isolation mechanisms can only defend against surface-level threats such as cross-site scripting (XSS) attacks and cannot prevent plaintext data theft caused by kernel vulnerabilities.

[0003] Fully homomorphic encryption (FHE), as a core technology for privacy computing, allows computational operations to be performed directly in ciphertext without decryption, providing a theoretical possibility for end-to-end security. However, existing FHE technologies suffer from three major application bottlenecks: First, the computational complexity is extremely high; the computational efficiency of traditional FHE algorithms is less than one-thousandth that of plaintext computation, failing to meet the performance requirements of real-time browser rendering and script execution. Second, compatibility is lacking; existing FHE implementations are not deeply integrated with the browser kernel, unable to support core Web functions such as DOM tree construction and CSS rendering. Third, there are key management risks; centralized key storage is prone to single-point leakage and lacks a dynamic key mechanism tailored to browser session characteristics.

[0004] Existing browser security solutions either rely on server-side encryption strategies (such as database encryption), which cannot cover the entire data processing process; or they use lightweight encryption technologies (such as symmetric encryption), which cannot achieve encrypted computation. Summary of the Invention

[0005] To address the above problems, this invention proposes a secure browser data encryption protection method based on fully homomorphic encryption, comprising:

[0006] A lightweight fully homomorphic encryption engine is launched in the browser kernel, and an encrypted browsing pipeline is built. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine.

[0007] Based on the browser's identification of sensitive information in the webpage access request data, and the use of the public key Pk in the session-level key pair to perform fully homomorphic encryption on the sensitive information, a ciphertext request packet is generated. The ciphertext request packet is then sent to the server through the encrypted browsing pipeline. Based on the browser's receipt of the encrypted response packet returned by the server after performing calculations on the ciphertext request packet;

[0008] Using the private key Sk of the session-level key pair based on the fully homomorphic encryption engine, the encrypted DOM tree is constructed, CSS styles are calculated and the page is rendered according to the encrypted response packet, the web page JavaScript code is generated, the web page JavaScript code is converted into encrypted execution instructions, the encrypted execution instructions are executed, and the web page corresponding to the web page access request is generated.

[0009] Optional, fully homomorphic encryption engines include:

[0010] The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

[0011] Optionally, a key generation module based on a fully homomorphic encryption engine generates a session-level key pair: a public key Pk and a private key Sk;

[0012] The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

[0013] Optionally, after the browser identifies sensitive information in the webpage access request data, the method further includes:

[0014] For non-sensitive information, keep it in plaintext.

[0015] Optionally, the ciphertext rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to perform encrypted DOM tree construction, CSS style calculation and page rendering based on the encrypted response packet;

[0016] Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

[0017] Optionally, the cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

[0018] Optionally, a threshold secret sharing scheme can be generated using the Shamir threshold algorithm, with a threshold value t=2, a number of fragments n=3, and the private key Sk divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

[0019] Optionally, session-level key pairs are generated based on Chinese national cryptographic algorithms.

[0020] Furthermore, this invention also proposes a secure browser data encryption protection system based on fully homomorphic encryption, comprising:

[0021] The initial unit is used to start a lightweight fully homomorphic encryption engine in the browser kernel and build an encrypted browsing pipeline. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine.

[0022] The encryption unit is used to identify sensitive information in the webpage access request data based on the browser, perform fully homomorphic encryption on the sensitive information using the public key Pk in the session-level key pair, generate a ciphertext request packet, send the ciphertext request packet to the server through the encrypted browsing pipeline, and receive an encrypted response packet returned by the server after the browser performs calculations on the ciphertext request packet.

[0023] The transmission unit is used to construct an encrypted DOM tree, calculate CSS styles, and render the page according to the encrypted response packet based on the private key Sk of the session-level key pair using a fully homomorphic encryption engine, generate web page JavaScript code, convert the web page JavaScript code into encrypted execution instructions, execute the encrypted execution instructions, and generate the web page corresponding to the web page access request.

[0024] Optional, fully homomorphic encryption engines include:

[0025] The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

[0026] Optionally, a key generation module based on a fully homomorphic encryption engine generates a session-level key pair: a public key Pk and a private key Sk;

[0027] The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

[0028] Optionally, after the browser identifies sensitive information in the webpage access request data, the method further includes:

[0029] For non-sensitive information, keep it in plaintext.

[0030] Optionally, the ciphertext rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to perform encrypted DOM tree construction, CSS style calculation and page rendering based on the encrypted response packet;

[0031] Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

[0032] Optionally, the cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

[0033] Optionally, a threshold secret sharing scheme can be generated using the Shamir threshold algorithm, with a threshold value t=2, a number of fragments n=3, and the private key Sk divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

[0034] Optionally, session-level key pairs are generated based on Chinese national cryptographic algorithms.

[0035] In another aspect, the present invention also provides a computing device, comprising: one or more processors;

[0036] A processor is used to execute one or more programs;

[0037] When the one or more programs are executed by the one or more processors, the method described above is implemented.

[0038] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described above.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0040] This invention provides a secure browser data encryption protection method based on fully homomorphic encryption, comprising: starting a lightweight fully homomorphic encryption engine in the browser kernel and constructing an encrypted browsing pipeline; when a user initiates a webpage access request through the browser, generating a session-level key pair based on the fully homomorphic encryption engine; identifying sensitive information in the webpage access request data based on the browser, and performing fully homomorphic encryption on the sensitive information using the public key Pk in the session-level key pair to generate a ciphertext request packet, and sending the ciphertext request packet to the server through the encrypted browsing pipeline; receiving an encrypted response packet returned by the server after performing calculations on the ciphertext request packet based on the browser; using the private key Sk of the session-level key pair based on the fully homomorphic encryption engine, constructing an encrypted DOM tree, calculating CSS styles, and rendering the page according to the encrypted response packet to generate webpage JavaScript code, converting the webpage JavaScript code into encrypted execution instructions, executing the encrypted execution instructions, and generating the webpage corresponding to the webpage access request. This invention solves the risk of sensitive data leakage caused by "transport layer encryption + plaintext processing in server / browser memory" in existing web security solutions. It realizes a closed-loop encrypted state for web page data from request initiation, server-side calculation to page rendering, and completely eliminates the problem of sensitive data being exposed in plaintext in the transmission link, server-side storage, and browser memory. Attached Figure Description

[0041] Figure 1 This is a flowchart of the method of the present invention;

[0042] Figure 2 This is a flowchart of an embodiment of the method of the present invention;

[0043] Figure 3 This is a structural diagram of the system of the present invention. Detailed Implementation

[0044] Exemplary embodiments of the invention will now be described with reference to the accompanying drawings. However, the invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to fully and completely disclose the invention and to fully convey its scope to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the drawings is not intended to limit the invention. In the drawings, the same units / elements are referred to by the same reference numerals.

[0045] Unless otherwise stated, the terms used herein (including technical terms) have their common meaning as understood by one of ordinary skill in the art. Furthermore, it is understood that terms defined in commonly used dictionaries should be understood to have a meaning consistent with the context of their relevant field, and not to be interpreted as having an idealized or overly formal meaning.

[0046] Example 1:

[0047] This invention proposes a secure browser data encryption protection method S100 based on fully homomorphic encryption, such as... Figure 1 As shown, it includes:

[0048] S101, A lightweight fully homomorphic encryption engine is started in the browser kernel, and an encrypted browsing pipeline is built. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine.

[0049] S102, based on the browser's identification of sensitive information in the webpage access request data, and using the public key Pk in the session-level key pair to perform fully homomorphic encryption on the sensitive information, generating a ciphertext request packet, and sending the ciphertext request packet to the server through the encrypted browsing pipeline, and based on the browser receiving the encrypted response packet returned by the server after performing calculation on the ciphertext request packet;

[0050] S103, using the private key Sk of the session-level key pair based on the fully homomorphic encryption engine, constructs an encrypted DOM tree, calculates CSS styles and renders the page according to the encrypted response packet, generates web page JavaScript code, converts the web page JavaScript code into encrypted execution instructions, executes the encrypted execution instructions, and generates the web page corresponding to the web page access request.

[0051] The fully homomorphic encryption engine includes:

[0052] The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

[0053] Among them, the key generation module based on the fully homomorphic encryption engine generates a session-level key pair: public key Pk and private key Sk;

[0054] The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

[0055] Optionally, after the browser identifies sensitive information in the webpage access request data, the method further includes:

[0056] For non-sensitive information, keep it in plaintext.

[0057] Among them, the ciphertext rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to construct the encrypted DOM tree, calculate CSS styles and render the page according to the encrypted response packet;

[0058] Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

[0059] Specifically, the cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

[0060] The Shamir threshold algorithm is used to generate a threshold secret sharing scheme with a threshold value of t=2 and a number of fragments of n=3. The private key Sk is divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

[0061] The session-level key pairs are generated based on the national cryptographic algorithm.

[0062] The invention will be further illustrated below with specific examples:

[0063] like Figure 2 As shown, the specific implementation process includes:

[0064] S1. Start a lightweight fully homomorphic encryption engine in the browser kernel to build an encrypted browsing pipeline. The fully homomorphic encryption engine includes a ciphertext rendering module, a ciphertext execution module, and a key generation module.

[0065] S2. When a user initiates a webpage access request, the browser generates a session-level key pair (public key Pk, private key Sk) through the key generation module. The private key Sk is stored in a secure area on the device through a threshold secret sharing scheme, and the public key Pk is transmitted to the target server through a TLS channel.

[0066] S3. The browser identifies sensitive information in the request data, enables full homomorphic encryption only for sensitive data, keeps non-sensitive UI elements in plaintext, applies the public key Pk to perform full homomorphic encryption on sensitive data, generates a ciphertext request packet, and sends it to the server through the encrypted browsing pipeline. After receiving it, the server performs calculations in the ciphertext state and returns an encrypted response packet.

[0067] S4. After receiving the encrypted response packet, the browser uses the encrypted rendering module of the fully homomorphic encryption engine to complete the construction of the encrypted DOM tree, calculation of CSS styles and rendering of the page without decrypting the plaintext; at the same time, the fully homomorphic encryption just-in-time compiler converts the web page JavaScript code into encrypted execution instructions to realize the execution of the script in the encrypted state.

[0068] In steps S2 and S4, the threshold secret sharing scheme adopts the Shamir threshold algorithm, with a threshold value t=2, a number of fragments n=3, and the private key Sk is divided into 3 fragments, which are stored in the device security chip (TPM 2.0, Apple Secure Enclave, Android Keystore), the browser memory security area, and the user-authorized local encrypted storage, respectively. At least 2 fragments are required to work together to complete decryption.

[0069] In step S4, the encrypted rendering module constructs an encrypted DOM tree with state markers and renders it securely. During rendering output, a threshold secret sharing scheme is applied to temporarily restore the private key Sk, and Sk is used to decrypt the DOM tree into pixel data. Immediately after rendering is complete, the encrypted cache in the video memory is cleared.

[0070] In step S1, the fully homomorphic engine adopts a variant of the BFV (Brakerski / Fan-Vercauteren) algorithm, which supports dense addition, multiplication and cyclic shift operations under 128-bit security strength through circuit-level parallel optimization, dynamic adaptation of polynomial ring dimensions, module length hierarchical optimization and SIMD instruction set parallel processing.

[0071] In step S1, the fully homomorphic engine employs a homomorphic instruction caching and encryption offloading mechanism. The homomorphic instruction caching uses an LRU eviction policy, constructing a two-level cache pool at the process and tab levels. The encryption offloading mechanism determines the fully homomorphic encryption operation mode based on the browser's operating environment, including a device capability detection module that identifies the CPU / GPU / NPU model, computing power, and driver support, allocating time-consuming operations such as ciphertext multiplication and polynomial operations to compatible hardware.

[0072] In step S2, the session-level key pair (public key Pk, private key Sk) can be protected by key encryption based on the national cryptographic algorithm SM2 or RSA-4096.

[0073] In step S3, the encrypted request packet adopts a layered structure of "TLS transport encryption + fully homomorphic application layer encryption". The transport layer adopts the TLS 1.3 protocol and the TLS_AES_256_GCM_SHA384 encryption suite. A lightweight fully homomorphic encryption computing agent is deployed on the server side. The fully homomorphic encryption computing agent is in the form of an NGINX / Apache plugin.

[0074] In step S4, the encrypted DOM tree is constructed using the "ciphertext node tagging" technology. Each DOM node carries a data-enc-status attribute with values ​​including "full-enc", "part-enc", and "plain". The rendering engine uses a dedicated ciphertext shader to splice and render ciphertext data with plaintext UI elements, which is compatible with HTML5 and CSS3 specifications.

[0075] The invention will be further described below with reference to another specific example:

[0076] Before implementation, the system architecture must first be deployed, including:

[0077] This system is deployed on user terminal devices (PCs and mobile devices). The browser kernel is based on a modified Chromium architecture, embedding a fully homomorphic encryption kernel enhancement module between the Blink rendering engine and the V8 JavaScript engine. This requires no changes to user habits and is fully compatible with the existing web application ecosystem. On the server side, a fully homomorphic encryption computation proxy (supporting NGINX / Apache plugins) is deployed to receive encryption requests and perform cryptographic computations, without requiring modification to the existing web service code.

[0078] Implementation is carried out on the deployed system, including:

[0079] Step S1: Startup and initialization of the fully homomorphic encryption engine:

[0080] When the browser starts, the fully homomorphic encryption kernel enhancement module automatically initializes, loading the optimized BFV algorithm library and hardware acceleration driver. The device capability detection submodule detects the terminal hardware: if the device supports GPU / NPU acceleration (such as an NVIDIA graphics card supporting CUDA, or a mobile chip supporting neural network acceleration), then hardware offloading mode is enabled; if it is a low-performance device, the scale of the fully homomorphic encryption parameters is automatically reduced (e.g., adjusting the polynomial degree to 16384) to ensure basic performance meets browsing requirements.

[0081] After the fully homomorphic encryption engine is initialized, global public parameters (including polynomial ring dimension, modulus, noise parameters, etc.) are generated for subsequent key generation and ciphertext calculation. The public parameters are ensured to be intact through a hash verification mechanism to prevent tampering.

[0082] Step S2: Key generation and distribution:

[0083] When a user opens a new tab and initiates their first visit, the key generation submodule generates a session-level key pair (Pk, Sk) based on the national cryptographic algorithm SM2:

[0084] The public key Pk is used to encrypt request data and is transmitted to the server-side fully homomorphic encrypted computation agent through a TLS 1.3 channel. The server only stores Pk for encrypting the response and does not access the private key Sk.

[0085] The key pair's validity period is bound to the browser session. It is automatically destroyed when the session is closed, and a new key pair is generated on the next visit, achieving "one-time key".

[0086] The key generation formula is defined as follows:

[0087] plaintext(Pk,Sk)=FHE.KeyGen(Params,SecLevel=128,Alg=SM2)

[0088] Sk = (Sk1, Sk2, Sk3)

[0089] Params represents the common parameters for fully homomorphic encryption, SecLevel represents the security strength (128 bits), and Alg represents the key algorithm (SM2). The private key Sk is divided into three parts (Sk1, Sk2, and Sk3) using the threshold secret sharing scheme Shamir: Sk1 is stored in the device's security chip (such as TPM 2.0), Sk2 is stored in the browser's secure memory area (protected by kernel isolation and automatically cleared after the process exits), and Sk3 is stored in local encrypted storage (requires authorization upon first user access and uses AES-256 encryption).

[0090] Step S3: Encrypted Request and Server Processing:

[0091] When a user enters the target URL (e.g., https: / / bank.example.com) and makes a request:

[0092] The browser automatically distinguishes between sensitive data (such as account numbers, passwords, and transaction amounts) and non-sensitive data (such as static text and layout parameters) through a sensitive data identification module, and performs full homomorphic encryption only on sensitive data;

[0093] The encrypted browsing pipeline module encapsulates encrypted sensitive data and plaintext non-sensitive data into HTTPZ request packets, which are then encrypted using TLS 1.3 at the transport layer.

[0094] The server-side fully homomorphic encrypted computation proxy receives HTTPZ request packets, extracts ciphertext data and plaintext parameters, and calls the local fully homomorphic encrypted computation library to perform computations in encrypted mode: for example, when querying a database, it retrieves target data in encrypted mode through ciphertext index matching technology and generates encrypted response content R_enc.

[0095] R_enc encapsulates the data into an encrypted response packet through a fully homomorphic encrypted computation proxy and returns it to the browser, without requiring the decryption of plaintext data throughout the process.

[0096] During this process, the server only processes the ciphertext. Even if the server is compromised or there is an internal leak, the attacker can only obtain the ciphertext and cannot recover the sensitive information.

[0097] Step S4: Dense-state rendering and script execution:

[0098] After the browser receives the encrypted response packet, the fully homomorphic encryption engine starts the ciphertext processing flow:

[0099] The encrypted rendering submodule extracts encrypted HTML / CSS data from R_enc and constructs an encrypted DOM tree using "encrypted node tagging" technology: each DOM node carries a data-enc-status property (with a value of "full-enc" / "part-enc" / "plain") to identify the encryption status of the node data;

[0100] The rendering engine calls a dedicated encrypted shader to perform style calculations and layout on encrypted DOM nodes: for "full-enc" nodes, the rendering coordinates are calculated directly based on the encrypted data; for "part-enc" nodes, the encrypted sensitive fields are concatenated with the plaintext UI elements for rendering, ensuring that the page display effect is consistent with that of traditional browsers.

[0101] For JavaScript code in web pages, the fully homomorphic encryption just-in-time compiler identifies data manipulation instructions through syntax tree parsing: operations involving sensitive data (such as form validation and data formatting) are converted into encrypted execution instructions, while non-sensitive operations (such as DOM event binding and page animation) are executed in plaintext.

[0102] The V8 engine calls the fully homomorphic encryption engine through kernel hooks to execute encrypted instructions. The execution results are temporarily stored in video memory in encrypted form. They are only decrypted into pixel data in fragments using a private key during rendering output. The encrypted cache in video memory is cleared immediately after rendering is complete to prevent memory leaks.

[0103] The deployed system has the following functions:

[0104] Performance optimization and intelligent uninstallation:

[0105] To address the performance issues of fully homomorphic encryption computation, this invention employs a triple optimization mechanism to ensure a smooth browsing experience:

[0106] Hardware offloading: The device capability detection submodule identifies hardware acceleration support and offloads time-consuming operations such as encrypted multiplication and polynomial operations to the GPU via the CUDA / OpenCL interface.

[0107] Homomorphic instruction caching: A cache pool is established for repeatedly executed cryptic instructions (such as the same rendering operation when the page is refreshed, and cryptic operations of fixed scripts). The cache validity period is dynamically adjusted according to the frequency of instruction repetition, with an average hit rate of ≥85%, reducing the overhead of repeated calculations.

[0108] Plaintext-Security Integration: Through a sensitive data identification rule base (supporting user customization and automatic updates), fully homomorphic encryption is enabled only for sensitive information such as accounts, passwords, and transaction data, while non-sensitive data such as page layout, static text, and icons are kept in plaintext, reducing the overall computational load.

[0109] Key rotation and security protection:

[0110] The system monitors access behavior in real time through an abnormal behavior detection module and identifies risky behaviors based on the following rules:

[0111] Initiating ≥5 encrypted browsing requests within a short period of time (e.g., within 1 minute);

[0112] The IP address does not match the device hardware characteristics (such as frequent switching of IP addresses in different locations);

[0113] Attempt to access sensitive attributes of encrypted DOM nodes (such as reading the content of a node with data-enc-status="full-enc" via JavaScript);

[0114] The browser kernel detected abnormal memory read behavior (possibly an attempt to exploit a vulnerability).

[0115] When risky behavior is detected, the corresponding security policy is triggered:

[0116] Low-risk anomalies (such as 3-4 requests within 1 minute): Automatically update private key fragments Sk2 and Sk3, while Sk1 remains unchanged to ensure key security;

[0117] Medium-risk anomalies (such as frequent IP address switching): trigger key rotation, generate a new key pair (Pk', Sk'), and retain the original key pair for 30 minutes to accommodate incomplete requests;

[0118] High-risk anomalies (such as kernel vulnerability exploitation attempts): Immediately isolate the current encrypted browsing context, close the corresponding tab, clear the private key fragment cache, and prompt the user to perform a security scan.

[0119] In addition, users can manually trigger key rotation through the browser's security center, supporting two modes: "single tab key reset" and "global key update" to meet privacy protection needs in different scenarios.

[0120] Module interaction:

[0121] The fully homomorphic encryption kernel enhancement module and the encrypted browsing pipe module communicate through the kernel message queue (IPC channel). Operations such as request encryption and response decryption are triggered by asynchronous messages and do not block the main thread.

[0122] The distributed key management module and the encrypted browsing pipeline module interact through a secure encrypted channel (AES-256-GCM), transmitting public key data only during session initialization and key rotation, and preventing tampering through hash verification during the transmission process;

[0123] The intelligent unloading acceleration module collects hardware load data (CPU / GPU utilization, memory usage) in real time, feeds back the load status to the fully homomorphic encryption kernel enhancement module, and dynamically adjusts the computing task allocation strategy (automatically reducing the scale of fully homomorphic encryption parameters when the load is ≥80%).

[0124] The encryption context isolation module creates an independent encryption sandbox for each website. Data cross-access is prevented between sandboxes through kernel process isolation mechanism. Sensitive data is only processed in the encrypted environment within the current sandbox. All encrypted caches are automatically destroyed when the sandbox is closed.

[0125] Example 2:

[0126] Furthermore, this invention also proposes a secure browser data encryption protection system 200 based on fully homomorphic encryption, such as... Figure 3 As shown, it includes:

[0127] The initial unit 201 is used to start a lightweight fully homomorphic encryption engine in the browser kernel and build an encrypted browsing pipeline. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine.

[0128] The encryption unit 202 is used to identify sensitive information in the webpage access request data based on the browser, perform fully homomorphic encryption on the sensitive information using the public key Pk in the session-level key pair, generate a ciphertext request packet, send the ciphertext request packet to the server through the encrypted browsing pipeline, and receive an encrypted response packet returned by the server after the browser performs calculations on the ciphertext request packet.

[0129] The transmission unit 203 is used to construct an encrypted DOM tree, calculate CSS styles, and render the page according to the encrypted response packet based on the private key Sk of the session-level key pair using a fully homomorphic encryption engine, generate web page JavaScript code, convert the web page JavaScript code into encrypted execution instructions, execute the encrypted execution instructions, and generate the web page corresponding to the web page access request.

[0130] The fully homomorphic encryption engine includes:

[0131] The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

[0132] Among them, the key generation module based on the fully homomorphic encryption engine generates a session-level key pair: public key Pk and private key Sk;

[0133] The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

[0134] The method further includes, after the browser identifies sensitive information in the webpage access request data, the following:

[0135] For non-sensitive information, keep it in plaintext.

[0136] Among them, the ciphertext rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to construct the encrypted DOM tree, calculate CSS styles and render the page according to the encrypted response packet;

[0137] Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

[0138] Specifically, the cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

[0139] The Shamir threshold algorithm is used to generate a threshold secret sharing scheme with a threshold value of t=2 and a number of fragments of n=3. The private key Sk is divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

[0140] The session-level key pairs are generated based on the national cryptographic algorithm.

[0141] This invention solves the risk of sensitive data leakage caused by "transport layer encryption + plaintext processing in server / browser memory" in existing web security solutions. It realizes a closed-loop encrypted state for web page data from request initiation, server-side calculation to page rendering, and completely eliminates the problem of sensitive data being exposed in plaintext in the transmission link, server-side storage, and browser memory.

[0142] Example 3:

[0143] Based on the same inventive concept, this invention also provides a computer device, which includes a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or 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. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement corresponding method flows or corresponding functions, thereby implementing the steps of the methods in the above embodiments.

[0144] Example 4:

[0145] Based on the same inventive concept, this invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of the method in the above embodiments.

[0146] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0147] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0148] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0149] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0150] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

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

Claims

1. A secure browser data encryption protection method based on fully homomorphic encryption, characterized in that, include: A lightweight fully homomorphic encryption engine is launched in the browser kernel, and an encrypted browsing pipeline is built. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine. Based on the browser's identification of sensitive information in the webpage access request data, and the use of the public key Pk in the session-level key pair to perform fully homomorphic encryption on the sensitive information, a ciphertext request packet is generated. The ciphertext request packet is then sent to the server through the encrypted browsing pipeline. Based on the browser's receipt of the encrypted response packet returned by the server after performing calculations on the ciphertext request packet; Using the private key Sk of the session-level key pair based on the fully homomorphic encryption engine, the encrypted DOM tree is constructed, CSS styles are calculated and the page is rendered according to the encrypted response packet, the web page JavaScript code is generated, the web page JavaScript code is converted into encrypted execution instructions, the encrypted execution instructions are executed, and the web page corresponding to the web page access request is generated.

2. The secure browser data encryption protection method according to claim 1, characterized in that, The fully homomorphic encryption engine includes: The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

3. The secure browser data encryption protection method according to claim 1, characterized in that, The key generation module based on the fully homomorphic encryption engine generates a session-level key pair: public key Pk and private key Sk; The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

4. The secure browser data encryption protection method according to claim 1, characterized in that, After the browser identifies sensitive information in the webpage access request data, the process further includes: For non-sensitive information, keep it in plaintext.

5. The secure browser data encryption protection method according to claim 1, characterized in that, The encrypted rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to construct the encrypted DOM tree, calculate CSS styles, and render the page based on the encrypted response packet. Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

6. The secure browser data encryption protection method according to claim 1, characterized in that, The cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

7. The secure browser data encryption protection method according to claim 3, characterized in that, The Shamir threshold algorithm is used to generate a threshold secret sharing scheme with a threshold value of t=2 and a number of fragments of n=3. The private key Sk is divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

8. The secure browser data encryption protection method according to claim 1, characterized in that, The session-level key pair is generated based on the national cryptographic algorithm.

9. A secure browser data encryption protection system based on fully homomorphic encryption, characterized in that, include: The initial unit is used to start a lightweight fully homomorphic encryption engine in the browser kernel and build an encrypted browsing pipeline. When a user initiates a webpage access request through the browser, a session-level key pair is generated based on the fully homomorphic encryption engine. The encryption unit is used to identify sensitive information in the webpage access request data based on the browser, perform fully homomorphic encryption on the sensitive information using the public key Pk in the session-level key pair, generate a ciphertext request packet, send the ciphertext request packet to the server through the encrypted browsing pipeline, and receive an encrypted response packet returned by the server after the browser performs calculations on the ciphertext request packet. The transmission unit is used to construct an encrypted DOM tree, calculate CSS styles, and render the page according to the encrypted response packet based on the private key Sk of the session-level key pair using a fully homomorphic encryption engine, generate web page JavaScript code, convert the web page JavaScript code into encrypted execution instructions, execute the encrypted execution instructions, and generate the web page corresponding to the web page access request.

10. The secure browser data encryption protection system according to claim 9, characterized in that, The fully homomorphic encryption engine includes: The module consists of a ciphertext rendering module, a ciphertext execution module, and a key generation module.

11. The secure browser data encryption protection system according to claim 9, characterized in that, The key generation module based on the fully homomorphic encryption engine generates a session-level key pair: public key Pk and private key Sk; The private key Sk is stored in fragments in a secure area on the device using a threshold secret sharing scheme, and the public key Pk is transmitted to the target server via a TLS channel.

12. The secure browser data encryption protection system according to claim 9, characterized in that, After the browser identifies sensitive information in the webpage access request data, the process further includes: For non-sensitive information, keep it in plaintext.

13. The secure browser data encryption protection system according to claim 9, characterized in that, The encrypted rendering module based on the fully homomorphic encryption engine uses the private key Sk of the session-level key pair to construct the encrypted DOM tree, calculate CSS styles, and render the page based on the encrypted response packet. Specifically: During page rendering, the application threshold secret sharing scheme temporarily restores the private key Sk, uses the private key Sk to decrypt the DOM tree into pixel data, and immediately clears the encrypted cache in the video memory after the page rendering is completed.

14. The secure browser data encryption protection system according to claim 9, characterized in that, The cryptographic execution module based on the fully homomorphic encryption engine executes the cryptographic execution instructions to generate the webpage corresponding to the webpage access request.

15. The secure browser data encryption protection system according to claim 11, characterized in that, The Shamir threshold algorithm is used to generate a threshold secret sharing scheme with a threshold value of t=2 and a number of fragments of n=3. The private key Sk is divided into 3 fragments, which are stored in the device's security chip, the browser's secure memory area, and authorized local encrypted storage, respectively. At least 2 fragments are required to complete decryption.

16. The secure browser data encryption protection system according to claim 9, characterized in that, The session-level key pair is generated based on the national cryptographic algorithm.

17. A computer device, characterized in that, include: One or more processors; A processor is used to execute one or more programs; When the one or more programs are executed by the one or more processors, the method described in any one of claims 1-8 is implemented.

18. A computer-readable storage medium, characterized in that, It contains a computer program, which, when executed, implements the method as described in any one of claims 1-8.