From 592fafe2062f71237beb36f0cb30065ef4d73aeb Mon Sep 17 00:00:00 2001 From: Dimitris Mouris Date: Wed, 1 Nov 2023 20:53:31 -0400 Subject: [PATCH] Update README and Dockerfile --- Dockerfile | 10 ++++++++-- README.md | 41 +++++++++++++++++++++++++++-------------- protocol/Cargo.toml | 4 ++-- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16f3754..5101da3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,14 @@ cp bin/release/pjc-client exec && \ cp bin/release/pjc-server exec && \ cp bin/release/datagen exec && \ cp bin/release/private-id-multi-key-server exec && \ -cp bin/release/private-id-multi-key-client exec - +cp bin/release/private-id-multi-key-client exec && \ +cp bin/release/dpmc-company-server exec && \ +cp bin/release/dpmc-helper exec && \ +cp bin/release/dpmc-partner-server exec && \ +cp bin/release/dspmc-company-server exec && \ +cp bin/release/dspmc-helper-server exec && \ +cp bin/release/dspmc-partner-server exec && \ +cp bin/release/dspmc-shuffler exec # thin container with binaries # base image is taken from here https://hub.docker.com/_/debian/ diff --git a/README.md b/README.md index 928e891..cad6a09 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,28 @@ # Private-ID -Private-ID is a collection of algorithms to match records between two parties, while preserving the privacy of these records. We present two algorithms to do this---one of which does an outer join between parties and another does a inner join and then generates additive shares that can then be input to a Multi Party Compute system like [CrypTen](https://github.com/facebookresearch/CrypTen). Please refer to our [paper](https://eprint.iacr.org/2020/599.pdf) for more details. The MultiKey Private-ID [paper](https://eprint.iacr.org/2021/770.pdf) and the Delegated Private-ID [paper](https://eprint.iacr.org/2023/012.pdf) extend Private-ID. +Private-ID is a collection of algorithms to match records between two or parties, while preserving the privacy of these records. We present multiple algorithms to do this---one of which does an outer join between parties, and others do inner or left join and then generate additive shares that can then be input to a Multi Party Compute system like [CrypTen](https://github.com/facebookresearch/CrypTen). Please refer to our [paper](https://eprint.iacr.org/2020/599.pdf) for more details. The MultiKey Private-ID [paper](https://eprint.iacr.org/2021/770.pdf) and the Delegated Private-ID [paper](https://eprint.iacr.org/2023/012.pdf) extend Private-ID. ## Build -Private-ID is implemented in Rust to take advantage of the languages security features and to leverage the encryption libraries that we depend on. It should compile with the nightly Rust toolchain. +Private-ID is implemented in Rust to take advantage of the language's security features and to leverage the encryption libraries that we depend on. It should compile with the nightly Rust toolchain. The following should build and run the unit tests for the building blocks used by the protocols -- `cargo build --release`, `cargo test` +```bash +cargo build --release +cargo test --release +``` + +Each protocol involves two (or more) parties and they have to be run in their own shell environment. We call one party Company and another party Partner. Some protocols also involve additional parties such as the Helper and the Shuffler. -Each protocol involves two parties and they have to be run in its own shell environment. We call one party Company and another party Partner. +Run the script at etc/example/generate_cert.sh to generate dummy_certs directory if you want to test protocol with TLS on local. -Run the script at etc/example/generate_cert.sh to generate dummy_certs directroy if you want to test protocol with tls on local. +### Build With Docker + +Build the Docker image: +```bash +docker build -t private-id . +``` ## Private-ID @@ -60,7 +70,7 @@ env RUST_LOG=info cargo run --release --bin private-id-multi-key-client -- \ ## PS3I -This protocol does an inner join based on email addresses as keys and then generates additive share of a feature associated with that email address. The shares are generated in the designated output files as 64 bit numbers +This protocol does an inner join based on email addresses as keys and then generates additive share of a feature associated with that email address. The shares are generated in the designated output files as 64-bit numbers To run Company: ```bash @@ -82,7 +92,7 @@ env RUST_LOG=info cargo run --release --bin cross-psi-client -- \ ## PS3I XOR -This protocol does an inner join based on email addresses as keys and then generates XOR share of a feature associated with that email address. The shares are generated in the designated output files as 64 bit numbers +This protocol does an inner join based on email addresses as keys and then generates XOR share of a feature associated with that email address. The shares are generated in the designated output files as 64-bit numbers To run Company: ```bash @@ -104,7 +114,7 @@ env RUST_LOG=info cargo run --release --bin cross-psi-xor-client -- \ The `--output` option provides prefix for the output files that contain the shares. In this case, Company generates two files; `output_company_company_feature.csv` and `output_company_partner_feature.csv`. They contain Company's share of company and parter features respectively. Similarly Partner generates two files; `output_partner_company_feature.csv` and `output_partner_partner_feature.csv`. They contain Partner's share of company and partner features respectively. -Thus `output_company_company_feature.csv` and `output_partner_company_feature.csv` are XOR shares of Company's features. Similarly `output_partner_company_feature.csv` and `output_partner_partner_feature.csv` are XOR shares of Partner's features. +Thus `output_company_company_feature.csv` and `output_partner_company_feature.csv` are XOR shares of Company's features. Similarly, `output_partner_company_feature.csv` and `output_partner_partner_feature.csv` are XOR shares of Partner's features. ### Private Join and Compute This is an implementation of Google's [Private Join and Compute](https://github.com/google/private-join-and-compute) protocol, that does a inner join based on email addresses and computes a sum of the corresponding feature for the Partner. @@ -153,7 +163,7 @@ The output will be ElGamal encrypted Universal IDs assigned to each entry in the ## Delegated Private Matching for Compute (DPMC) -We extend the Multi-key Private-ID protocol to multiple partners. Please refer to our [paper](TODO) for more details. +We extend the Multi-key Private-ID protocol to multiple partners. Please refer to our [paper](https://eprint.iacr.org/2023/012) for more details. To run Company: ```bash @@ -310,17 +320,20 @@ To cite Private-ID in academic papers, please use the following BibTeX entries. ## Delegated Private-ID ``` -@Misc{EPRINT:MMTSBC23, +@Article{PoPETS:MMTSBC23, author = "Dimitris Mouris and Daniel Masny and Ni Trieu and Shubho Sengupta and Prasad Buddhavarapu and Benjamin M Case", - title = "Delegated Private Matching for Compute", - year = 2023, - howpublished = "Cryptology ePrint Archive, Report 2023/012", - note = "\url{https://eprint.iacr.org/2023/012}", + title = "{Delegated Private Matching for Compute}", + volume = 2024, + month = Jul, + year = 2024, + journal = "{Proceedings on Privacy Enhancing Technologies}", + number = 2, + pages = 1--24", } ``` diff --git a/protocol/Cargo.toml b/protocol/Cargo.toml index 508ebb0..f96b887 100644 --- a/protocol/Cargo.toml +++ b/protocol/Cargo.toml @@ -27,5 +27,5 @@ num-traits = "0.2" zeroize = "1.5.5" tempfile = "3.2.0" mockall = "0.10.2" -fernet = { git = "https://github.com/mozilla-services/fernet-rs", rev = "ff7a8dcb" } -base64 = { git = "https://github.com/marshallpierce/rust-base64", rev = "7f81bafe" } +fernet = { git = "https://github.com/mozilla-services/fernet-rs", rev = "ff7a8dcb" } # "0.2.1" +base64 = { git = "https://github.com/marshallpierce/rust-base64", rev = "7f81bafe" } # "0.21.5"