# US 2025/0168146 A1 · Homomorphic encryption for web application firewall processing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0168146 A1
- Document ID: US20250168146A1
- Status: Published application
- Kind: A1
- Application number: 18/516,520
- Filed: 2023-11-21
- Published: 2025-05-22
- Earliest claimed: 2023-11-21
- Assignees: Salesforce, Inc.
- Applicants: Salesforce, Inc.
- Inventors: Jose Lejin P J
- Web page: https://patentgrep.com/patent/US20250168146A1

## CPC

- H04L 63/0227: {Filtering policies (mail message filtering H04L51/212)}
- H04L 9/008: {involving homomorphic encryption}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method and apparatus for avoiding exposure of data that was entered into a web application in the context of having that data scanned by a third-party web application firewall (WAF). The apparatus receives, in response to forwarding a request to a web application, a response from the web application that includes a web form. The apparatus forwards the response to a browser and in response receives a second request that includes a version of the web form modified by the browser such that data entered into a plurality of fields of the web form was extracted, aggregated, and homomorphically encrypted. The apparatus causes the second request to be scanned by the third party WAF using one or more homomorphic encryption signatures, and in response to the scanning determines whether to forward the second request to the web application or take corrective action.

## Claims

### Claim 1

A method for avoiding exposure of data that was entered into a web application running in a web browser on a client device for transmission to a web application on a server device in the context of having that data scanned by a third-party web application firewall (WAF) before reaching the server device, comprising, at an electronic device:
responsive to forwarding a first request from the browser to the web application, receiving a response from the web application that includes a web form;
forwarding the response to the browser;
responsive to forwarding the response to the browser, receiving a second request from the browser, wherein the second request includes a version of the web form that was completed at the browser but modified by the browser such that data entered into a plurality of fields of the web form was extracted, aggregated, and homomorphically encrypted using a public key provided by the web application to form a homomorphically encrypted aggregation of the data entered into the plurality of fields;
causing the second request to be scanned by the third party WAF using one or more homomorphic encryption signatures provided by the web application on the homomorphically encrypted aggregation of the data entered into the plurality of fields; and
depending on the scanning, determining whether to forward the second request to the web application or take corrective action.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating a set of one or more browser web app plugins configured to cause the browser to extract, aggregate, and homomorphically encrypt the data entered into the plurality of fields; and
modifying the response prior to the forwarding to the browser to include the generated set of web app plugins.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
retrieving, from a database, mapping data that identifies the plurality of fields, wherein at least one of the plugins of the set of plugins is generated based at least in part on the retrieved mapping data.

### Claim 4 (depends on 2)

The method of claim 2, wherein the set of one or more browser web app plugins cause the browser to:
extract, from the web form, the data entered into each of the plurality of fields and null the data entered into each of the plurality of fields in the web form;
generate a plurality of field-value pairs, each field-value pair including a first value corresponding to an identifier of a field of one of the plurality of fields, and a second value corresponding to the data that was extracted from the field identified by the first value;
generate, based on the plurality of field-value pairs, a first text string representing an aggregation all the second values in the plurality of field-value pairs, and generate a second text string representing indexing data for the first text string;
combine the first text string and second text string into a third text string;
encrypt the third text string using homomorphic encryption and the public key; and
add the encrypted third text string to the second request.

### Claim 5 (depends on 4)

The method of claim 4, wherein the set of one or more browser web app plugins cause the browser to randomize an ordering of the aggregated second values in the first text string.

### Claim 6 (depends on 4)

The method of claim 4, wherein the set of one or more browser web app plugins cause the browser to:
generate a ring buffer having a plurality of elements, and a pointer that points to a next element where data is to be inserted or extracted;
load each field-value pair, one pair at a time, into the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times between each pair to be loaded;
after all the field-value pairs have been loaded into the ring buffer, extract each field-value pair, one pair at a time, from the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times between each pair to be extracted; and
for each extracted field-value pair, appending the second value to the first text string and appending, to the second text string, the first value followed by data that provides information on the location of the second value within the first text string.

### Claim 7 (depends on 1)

The method of claim 1, wherein the response from the web application on the server device includes the public key.

### Claim 8

An apparatus comprising:
a set of one or more processors; and
a non-transitory machine-readable storage medium that provides instructions that, if executed by the set of one or more processors, are configurable to cause the apparatus to perform operations for avoiding exposure of data that was entered into a web application running in a web browser on a client device for transmission to a web application on a server device in the context of having that data scanned by a third-party web application firewall (WAF) before reaching the server device, the operations comprising:
responsive to forwarding a first request from the browser to the web application, receiving a response from the web application that includes a web form;
forwarding the response to the browser;
responsive to forwarding the response to the browser, receiving a second request from the browser, wherein the second request includes a version of the web form that was completed at the browser but modified by the browser such that data entered into a plurality of fields of the web form was extracted, aggregated, and homomorphically encrypted using a public key provided by the web application to form a homomorphically encrypted aggregation of the data entered into the plurality of fields;
causing the second request to be scanned by the third party WAF using one or more homomorphic encryption signatures provided by the web application on the homomorphically encrypted aggregation of the data entered into the plurality of fields; and
depending on the scanning, determining whether to forward the second request to the web application or take corrective action.

### Claim 9 (depends on 8)

The apparatus of claim 8, the operations further comprising:
generating a set of one or more browser web app plugins configured to cause the browser to extract, aggregate, and homomorphically encrypt the data entered into the plurality of fields; and
modifying the response prior to the forwarding to the browser to include the generated set of plugins.

### Claim 10 (depends on 9)

The apparatus of claim 9, the operations further comprising:
retrieving, from a database, mapping data that identifies the plurality of fields, wherein at least one of the plugins of the set of plugins is generated based at least in part on the retrieved mapping data.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein the set of one or more browser web app plugins cause the browser to:
extract, from the web form, the data entered into each of the plurality of fields and null the data entered into each of the plurality of fields in the web form;
generate a plurality of field-value pairs, each field-value pair including a first value corresponding to an identifier of a field of one of the plurality of fields, and a second value corresponding to the data that was extracted from the field identified by the first value;
generate, based on the plurality of field-value pairs, a first text string representing an aggregation all the second values in the plurality of field-value pairs, and generate a second text string representing indexing data for the first text string;
combine the first text string and second text string into a third text string;
encrypt the third text string using homomorphic encryption and the public key; and
add the encrypted third text string to the second request.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the set of one or more browser web app plugins cause the browser to randomize an ordering of the aggregated second values in the first text string.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the set of one or more browser web app plugins cause the browser to:
generate a ring buffer having a plurality of elements, and a pointer that points to a next element where data is to be inserted or extracted;
load each field-value pair, one pair at a time, into the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times clockwise and/or counterclockwise between each pair to be loaded;
after all the field-value pairs have been loaded into the ring buffer, extract each field-value pair, one pair at a time, from the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times between each pair to be extracted; and
for each extracted field-value pair, appending the second value to the first text string and appending, to the second text string, the first value followed by data that provides information on the location of the second value within the first text string.

### Claim 14 (depends on 8)

The apparatus of claim 8, wherein the response from the web application includes the public key.

### Claim 15

An article of manufacture comprising:
a non-transitory machine-readable storage medium that provides instructions that, if executed by a set of one or more processors implemented in an electronic device, are configurable to cause the electronic device to perform operations for avoiding exposure of data that was entered into a web application running in a web browser on a client device for transmission to a web application on a server device in the context of having that data scanned by a third-party web application firewall (WAF) before reaching the server device, the operations comprising:
responsive to forwarding a first request from the browser to the web application, receiving a response from the web application that includes a web form;
forwarding the response to the browser;
responsive to forwarding the response to the browser, receiving a second request from the browser, wherein the second request includes a version of the web form that was completed at the browser but modified by the browser such that data entered into a plurality of fields of the web form was extracted, aggregated, and homomorphically encrypted using a public key provided by the web application to form a homomorphically encrypted aggregation of the data entered into the plurality of fields;
causing the second request to be scanned by the third party WAF using one or more homomorphic encryption signatures provided by the web application on the homomorphically encrypted aggregation of the data entered into the plurality of fields; and
depending on the scanning, determining whether to forward the second request to the web application or take corrective action.

### Claim 16 (depends on 15)

The article of manufacture of claim 15, the operations further comprising:
generating a set of one or more browser web app plugins configured to cause the browser to extract, aggregate, and homomorphically encrypt the data entered into the plurality of fields; and
modifying the response prior to the forwarding to the browser to include the generated set of plugins.

### Claim 17 (depends on 16)

The article of manufacture of claim 16, the operations further comprising:
retrieving, from a database, mapping data that identifies the plurality of fields, wherein at least one of the plugins of the set of plugins is generated based at least in part on the retrieved mapping data.

### Claim 18 (depends on 16)

The article of manufacture of claim 16, wherein the set of one or more browser web app plugins cause the browser to:
extract, from the web form, the data entered into each of the plurality of fields and null the data entered into each of the plurality of fields in the web form;
generate a plurality of field-value pairs, each field-value pair including a first value corresponding to an identifier of a field of one of the plurality of fields, and a second value corresponding to the data that was extracted from the field identified by the first value;
generate, based on the plurality of field-value pairs, a first text string representing an aggregation all the second values in the plurality of field-value pairs, and generate a second text string representing indexing data for the first text string;
combine the first text string and second text string into a third text string;
encrypt the third text string using homomorphic encryption and the public key; and
add the encrypted third text string to the second request.

### Claim 19 (depends on 18)

The article of manufacture of claim 18, wherein the set of one or more browser web app plugins cause the browser to randomize an ordering of the aggregated second values in the first text string.

### Claim 20 (depends on 18)

The article of manufacture of claim 18, wherein the set of one or more browser web app plugins cause the browser to:
generate a ring buffer having a plurality of elements, and a pointer that points to a next element where data is to be inserted or extracted;
load each field-value pair, one pair at a time, into the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times between each pair to be loaded;
after all the field-value pairs have been loaded into the ring buffer, extract each field-value pair, one pair at a time, from the ring buffer at the element pointed to by the pointer, where the pointer is advanced a random number of times between each pair to be extracted; and
for each extracted field-value pair, appending the second value to the first text string and appending, to the second text string, the first value followed by data that provides information on the location of the second value within the first text string.
