Skip to content

Commit

Permalink
docs(mpc-dualdp): update readme and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivacyGo committed Jan 23, 2024
1 parent 5c4b022 commit dac41d5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
20 changes: 15 additions & 5 deletions mpc-dualdp/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# MPC-DualDP
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)

Secure multiparty computation (MPC) is a desired tool to provide privacy to the input data and intermediate results during secure computation. However, MPC can not help if the computation results leak information about the input data. To bound information leakage in outputs of protocols, we can apply differential privacy such that the MPC outputs are perturbed by the addition of noise before the outputs are revealed. Therefore, we need a mechanism that allows MPC servers to collaboratively generate random noise in a secret fashion.

MPC-DualDP is a distributed protocol for generating shared differential privacy noise in a two-server setting. MPC-DualDP leverages MPC to sample random noise according to specific distributions, and outputs the noise in the form of secret sharing.

Currently, we support the generation of noise following binomial distribution, and more distributions might be supported in the future. As for the security model, our protocol and implementation provide security and privacy against two semi-honest servers. The round complexity of our protocol is 1, and the communication complexity is $O(n)$ if we consider a binomial distribution $Bin(n,p = 0.5)$.
While secure multiparty computation (MPC) protects input data and interim outcomes, it falters when exposing input specifics through outputs.
To curtail these data leaks, differential privacy proves effective.
This involves injecting noise into MPC outputs before their disclosure.
Thus, a discreetly collaborative method for MPC servers to generate random noise becomes indispensable.

Our MPC-DualDP protocol is designed for dual-party scenarios, where two servers collaborate to generate shared noise for the purpose of ensuring differential privacy.
Currently, we support the generation of noise following a binomial distribution, and more distributions might be supported in the future.
As for the security model, our protocol and implementation provide security and privacy against two semi-honest servers.
In terms of the protocol's efficiency, it involves only one round of communication, and if we consider a binomial distribution $Bin(n, p)$, the communication complexity scales as $O(n)$.

MPC-DualDP guarantees that neither the adversary nor any party possesses knowledge about any portion of the noise generated, ensuring the fulfillment of the differential privacy guarantee.
As a result, excessive noise injection by each party, a characteristic of other related approaches, can be eliminated.
This leads to better data utility.
Consequently, MPC-DualDP stands out in comparison to other similar methods.
The concealed nature of noise generation for each party also guarantees the coherence of the final output in the MPC process for both parties.

## How to use MPC-DualDP

Expand Down
13 changes: 7 additions & 6 deletions mpc-dualdp/src/mpc-dualdp/mpc_dualdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,22 @@ class MPCDualDP {
~MPCDualDP() = default;

/**
* @brief Initialize psi and mpc protocol.
* @brief Initializes party id and net io channel.
* @param[in] party_id The id of party.
* @param[in] net Net io channel.
* @return None.
* @param[in] net The network interface.
* @return None
*/
void initialize(const std::size_t party_id, const std::shared_ptr<IOBase>& net);

/**
* @brief MPC-DualDP protocol.
* @brief Samples secret-shared DP noise from binomial distribution Bin(binomial_n, 0.5).
* binomial_n is calculated based on DP parameters (delta, epsilon, and sensitivity).
* @param[in] n Amount of noise to be generated.
* @param[in] epsilon DP parameter $epsilon$.
* @param[in] delta DP parameter $delta$.
* @param[in] sensitivity DP parameter $sensitivity$.
* @param[out] noise DP noise secret shares.
* @return none
* @param[out] noise Secret-shared DP noise in $Z_{2^{64}}$.
* @return None
*/
void binomial_sampling(const std::size_t n, const double epsilon, const double delta, const double sensitivity,
std::vector<int64_t>& noise);
Expand Down

0 comments on commit dac41d5

Please sign in to comment.