# US 2020/0394316 A1 · Secure sublinear time differentially private median computation

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

- Number: US 2020/0394316 A1
- Document ID: US20200394316A1
- Status: Published application
- Kind: A1
- Application number: 16/442,212
- Filed: 2019-06-14
- Published: 2020-12-17
- Earliest claimed: 2019-06-14
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Jonas Boehler; Florian Kerschbaum
- Web page: https://patentgrep.com/patent/US20200394316A1

## CPC

- G06F 21/602: {Providing cryptographic facilities or services}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- H04L 9/085: {Secret sharing or secret splitting, e.g. threshold schemes}
- H04L 9/088: {Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms (network architectures or network communication protocols for using time-dependent keys in a packet data network H04L63/068)}
- H04L 2209/46: Secure multiparty computation, e.g. millionaire problem
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Techniques for efficient, accurate, and secure computation of a differentially private median of the union of two large confidential datasets are disclosed. In some example embodiments, a computer-implemented method comprises obtaining secret shares of a first dataset of a first entity, secret shares of a second dataset of a second entity, secret shares of gap values for the first dataset, secret shares of gap values for the second dataset, secret shares of probability mass values for the first dataset, and secret shares of probability mass values for the second dataset. The probability mass values may be computed via an exponential mechanism. In some example embodiments, the computer-implemented method further comprises determining a median of a union of the first dataset and the second dataset using an inverse transform sampling algorithm based on the obtained secret shares, and then performing a function of a networked computer system using the determined median.

## Claims

### Claim 1

A computer-implemented method comprising:
obtaining, by at least one hardware processor, secret shares of a first dataset of a first entity, secret shares of a second dataset of a second entity, secret shares of gap values for the first dataset, secret shares of gap values for the second dataset, secret shares of probability mass values for the first dataset, and secret shares of probability mass values for the second dataset;
determining, by the at least one hardware processor, a differentially private median of a union of the first dataset and the second dataset using an inverse transform sampling algorithm based on the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of the probability mass values for the second dataset; and
performing, by the at least one hardware processor, a function of a networked computer system using the determined median.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the function of the networked computer system comprises causing the determined median to be displayed on a computing device.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the determining the median is performed using a garbled circuit protocol.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the obtaining comprises:
generating secret shares of a sorted union of at least a portion of the first dataset and at least a portion of the second dataset using a bitonic merging algorithm; and
computing the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of probability mass values for the second dataset using the secret shares of the sorted union.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein the generating the secret shares of the union is performed using a garbled circuit protocol.

### Claim 6 (depends on 4)

The computer-implemented method of claim 4, wherein the obtaining further comprises generating the at least a portion of the first dataset using a pruning algorithm, the pruning algorithm being configured to, for multiple iterations:
determine whether a median value of the first dataset is less than a median value of the second dataset;
if the median value of the first dataset is less than the median value of the second dataset, then prune the lower half of the first dataset to generate the at least a portion of the first dataset as being absent the lower half; and
if the median value of the first dataset is not less than the median value of the second dataset, then prune the upper half of the first dataset to generate the at least a portion of the first dataset as being absent the upper half.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the generating the at least a portion of the first dataset or the at least a portion of the second dataset is performed using a garbled circuit protocol.

### Claim 8

A system comprising:
at least one processor; and
a non-transitory computer-readable medium storing executable instructions that, when executed, cause the at least one processor to perform operations comprising:
obtaining secret shares of a first dataset of a first entity, secret shares of a second dataset of a second entity, secret shares of gap values for the first dataset, secret shares of gap values for the second dataset, secret shares of probability mass values for the first dataset, and secret shares of probability mass values for the second dataset;
determining a differentially private median of a union of the first dataset and the second dataset using an inverse transform sampling algorithm based on the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of the probability mass values for the second dataset; and
performing a function of a networked computer system using the determined median.

### Claim 9 (depends on 8)

The system of claim 8, wherein the function of the networked computer system comprises causing the determined median to be displayed on a computing device.

### Claim 10 (depends on 8)

The system of claim 8, wherein the determining the median is performed using a garbled circuit protocol.

### Claim 11 (depends on 8)

The system of claim 8, wherein the obtaining comprises:
generating secret shares of a sorted union of at least a portion of the first dataset and at least a portion of the second dataset using a bitonic merging algorithm; and
computing the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of probability mass values for the second dataset using the secret shares of the sorted union.

### Claim 12 (depends on 11)

The system of claim 11, wherein the generating the secret shares of the union is performed using a garbled circuit protocol.

### Claim 13 (depends on 11)

The system of claim 11, wherein the obtaining further comprises generating the at least a portion of the first dataset using a pruning algorithm, the pruning algorithm being configured to, for multiple iterations:
determine whether a median value of the first dataset is less than a median value of the second dataset;
if the median value of the first dataset is less than the median value of the second dataset, then prune the lower half of the first dataset to generate the at least a portion of the first dataset as being absent the lower half; and
if the median value of the first dataset is not less than the median value of the second dataset, then prune the upper half of the first dataset to generate the at least a portion of the first dataset as being absent the upper half.

### Claim 14 (depends on 13)

The system of claim 13, wherein the generating the at least a portion of the first dataset or the at least a portion of the second dataset is performed using a garbled circuit protocol.

### Claim 15

A non-transitory machine-readable storage medium, tangibly embodying a set of instructions that, when executed by at least one processor, causes the at least one processor to perform operations comprising:
obtaining secret shares of a first dataset of a first entity, secret shares of a second dataset of a second entity, secret shares of gap values for the first dataset, secret shares of gap values for the second dataset, secret shares of probability mass values for the first dataset, and secret shares of probability mass values for the second dataset;
determining a differentially private median of a union of the first dataset and the second dataset using an inverse transform sampling algorithm based on the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of the probability mass values for the second dataset; and
performing a function of a networked computer system using the determined median.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the function of the networked computer system comprises causing the determined median to be displayed on a computing device.

### Claim 17 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the determining the median is performed using a garbled circuit protocol.

### Claim 18 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the obtaining comprises:
generating secret shares of a sorted union of at least a portion of the first dataset and at least a portion of the second dataset using a bitonic merging algorithm; and
computing the secret shares of the first dataset, the secret shares of the second dataset, the secret shares of the gap values for the first dataset, the secret shares of the gap values for the second dataset, the secret shares of the probability mass values for the first dataset, and the secret shares of probability mass values for the second dataset using the secret shares of the sorted union.

### Claim 19 (depends on 18)

The non-transitory machine-readable storage medium of claim 18, wherein the generating the secret shares of the union is performed using a garbled circuit protocol.

### Claim 20 (depends on 18)

The non-transitory machine-readable storage medium of claim 18, wherein the obtaining further comprises generating the at least a portion of the first dataset using a pruning algorithm, the pruning algorithm being configured to, for multiple iterations:
determine whether a median value of the first dataset is less than a median value of the second dataset;
if the median value of the first dataset is less than the median value of the second dataset, then prune the lower half of the first dataset to generate the at least a portion of the first dataset as being absent the lower half; and
if the median value of the first dataset is not less than the median value of the second dataset, then prune the upper half of the first dataset to generate the at least a portion of the first dataset as being absent the upper half.
