Coder Social home page Coder Social logo

osu-crypto / multipartypsi Goto Github PK

View Code? Open in Web Editor NEW
88.0 3.0 34.0 9.8 MB

Practical Multi-party Private Set Intersection from Symmetric-Key Techniques[ACM CCS 2017]

License: The Unlicense

CMake 0.74% PowerShell 0.11% C++ 96.66% Assembly 2.39% C 0.10%
multiparty-psi programmable-oprf oprf

multipartypsi's People

Contributors

nitrieu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multipartypsi's Issues

std::runtime_error about cryptoTools/Network/BtIOService.cpp:121

Dear author, thank you for sharing your open source code.
When I set the party number (n) to 10 and the size (m) to 2^20, an error occurs while running the program. The error message states: "terminate called after throwing an instance of 'std::runtime_error' what(): rt error at /MultipartyPSI/cryptoTools/Network/BtIOService.cpp:121 ec=End of file. else bytesTransfered != 4".
However, when I set the party number n to less than 10 and the size m to less than 2^20, the program runs normally.
What steps can I take to resolve this IOService bug?

Is there an SDK for python to call?

Hello,

I find that currently use MultipartyPSI by only the way of running command lines. Is there an SDK for python to call some api to complete a psi job?
In addition,if I encapsulate an SDK, and the network communication need be handled by Python instead C++. Can you give me some suggestions?

Thank you!

Failed to find boost at need system thread

After I excute "cmake .", there occurs an error :
“-- Could NOT find Boost: missing: system thread (found /usr/local/boost/lib/cmake/Boost-1.79.0/BoostConfig.cmake (found version "1.79.0"))
CMake Error at cryptoTools/CMakeLists.txt:74 (message): Failed to find boost at Need system thread”

what 's the reason?

Some questions about the code and the paper

Hi, we're very interested in this amazing work and trying to dive into this project and the paper. But we met some questions:

  1. We tried to run the frontend.exe by
./bin/frontend.exe -n 3 -r 1 -m 12 -p 0 
& ./bin/frontend.exe -n 3 -r 1 -m 12 -p 1 
& ./bin/frontend.exe -n 3 -r 1 -m 12 -p 2

and find the output intersection is changeable and always less than the expected intersection. We thought there must be some problems in the function party3(), but after we checked the code and the paper, we haven't find the problems yet. The only thing we find is that the recvPayLoads in secret sharing part is changeable.
2. In the function tparties(), we found that the leader doesn't seem to join the secret sharing part, which is inconsistent with the algorithm told in the paper. Is there any reasons for this inconsistency?
3. When we tried to test the function aug_parties with my own inputs, we found that the element that should be in the intersection will not be counted to the output intersection if its index is not same in all the inputs. For example, if P1 has input (1, 2, 3), P2 has input (1, 3, 4), P3 has input (1, 3, 5), then only 1 will be counted in the intersection, which is not correct. And in the paper, we don't understand what the ind means in the augmented semi-honest PSI model. The index of the element? Or the element itself?

Thanks for any reply!

Build project meet error about boost

Hello! When I build the project in the step "cmake ." after bashing all_linux.get, the error occured:

-- Could NOT find Boost: missing: system thread (found /usr/local/lib/cmake/Boost-1.77.0/BoostConfig.cmake (found version "1.77.0"))
CMake Error at cryptoTools/CMakeLists.txt:74 (message):
  Failed to find boost at Need system thread


-- Configuring incomplete, errors occurred!
See also "/home/starkirby/MultipartyPSI/CMakeFiles/CMakeOutput.log".

But the terminal remind me that I have done the previous step successfully, how to solve that? Thanks.

Bug: coredump if length of inputs is less than 5

This is caused by dividing by zero.

codes:

mBinCount[0] = mParams.mBinScaler[0]*n;

mBinCount[0] = (mParams.mBinScaler[0] ) * n;

u64 addrStash = *(u64*)&hashs[j][k] % mBinCount[1] + mBinCount[0];

w.curAddrs[i] = (mHashesView.data() + inputIdxs[i] * width)[w.curHashIdxs[i]] % mBinCount[0];

fix

  mBinCount[0] = std::max(mParams.mBinScaler[0] * n, 1);
  mBinCount[1] = std::max(mParams.mBinScaler[1] * n, 1);

invalid use of template-name boost::asio::strand

When I compile the project ( make ), there is an error that "invalid use of template-name boost::asio::io_service::strand...". Then after I changed boost::asio::strand to boost::asio::io_service::strand, compile succeed.

Works for larger item sets?

I just wanted to make sure if the code works for the larger item sets. With these set of commands on a fresh Ubuntu 18.04 setup the example Frontend command is busy on some processes and returns abruptly on some other processes, ie. does not complete successfully.

Steps used to reproduce:

1. Setup

git clone https://github.com/osu-crypto/MultipartyPSI
sudo apt-get update
sudo apt-get install build-essential nasm cmake

cd MultipartyPSI/thirdparty
bash ./all_linux.get
cd ..

cmake .
make

2. Run with itemset 2^12 works in 11 secs

echo "./bin/frontend.exe -n 5 -t 2 -m 12 -p 0 & ./bin/frontend.exe -n 5 -t 2 -m 12 -p 1 & ./bin/frontend.exe -n 5 -t 2 -m 12 -p 2 & ./bin/frontend.exe -n 5 -t 2 -m 12 -p 3 & ./bin/frontend.exe -n 5 -t 2 -m 12 -p 4" > run.sh
time bash run.sh

9
9
9
9
9
Client Idx: 0
setSize: 4096
offlineTime: 449 ms
hashingTime: 7 ms
getOPRFTime: 1096 ms
ss2DirTime: 5522 ms
ssRoundTime: 7 ms
intersection: 0 ms
onlineTime: 6632 ms
Total time: 7.081 s

=========avg==========
Client Idx: 0
numParty: 5 numCorrupted: 2 setSize: 4096 nTrials:1
offlineTime: 449 ms
hashingTime: 7 ms
getOPRFTime: 1096 ms
ssClientTime: 5522 ms
ssLeaderTime: 7 ms
intersection: 0 ms
onlineTime: 6632 ms
Total time: 7.081 s

Client Idx: 1
setSize: 4096
offlineTime: 472 ms
hashingTime: 7 ms
getOPRFTime: 10273 ms
ss2DirTime: 46 ms
ssRoundTime: 4 ms
intersection: 0 ms
onlineTime: 10330 ms
Total time: 10.802 s

Leader Idx: 4
#Output Intersection: 3664
#Expected Intersection: 3664
setSize: 4096
offlineTime: 466 ms
hashingTime: 14 ms
getOPRFTime: 18 ms
ss2DirTime: 0 ms
ssRoundTime: 10319 ms
intersection: 0 ms
onlineTime: 10351 ms
Total time: 10.817 s

=========avg==========
Leader Idx: 4
#Output Intersection: 3664
#Expected Intersection: 3664
numParty: 5 numCorrupted: 2 setSize: 4096 nTrials:1
offlineTime: 466 ms
hashingTime: 14 ms
getOPRFTime: 18 ms
ssClientTime: 0 ms
ssLeaderTime: 10319 ms
intersection: 0 ms
onlineTime: 10351 ms
Total time: 10.817 s

real 0m10.849s
user 0m20.239s
sys 0m13.523s

3. Run with itemset 2^13 works in 60 secs

echo "./bin/frontend.exe -n 5 -t 2 -m 13 -p 0 & ./bin/frontend.exe -n 5 -t 2 -m 13 -p 1 & ./bin/frontend.exe -n 5 -t 2 -m 13 -p 2 & ./bin/frontend.exe -n 5 -t 2 -m 13 -p 3 & ./bin/frontend.exe -n 5 -t 2 -m 13 -p 4" > run.sh
time bash run.sh

9
9
9
9
9
Client Idx: 0
setSize: 8192
offlineTime: 474 ms
hashingTime: 30 ms
getOPRFTime: 10952 ms
ss2DirTime: 47427 ms
ssRoundTime: 9 ms
intersection: 0 ms
onlineTime: 58418 ms
Total time: 58.892 s

=========avg==========
Client Idx: 0
numParty: 5 numCorrupted: 2 setSize: 8192 nTrials:1
offlineTime: 474 ms
hashingTime: 30 ms
getOPRFTime: 10952 ms
ssClientTime: 47427 ms
ssLeaderTime: 9 ms
intersection: 0 ms
onlineTime: 58418 ms
Total time: 58.892 s

Client Idx: 1
setSize: 8192
offlineTime: 466 ms
hashingTime: 17 ms
getOPRFTime: 58026 ms
ss2DirTime: 402 ms
ssRoundTime: 16 ms
intersection: 0 ms
onlineTime: 58461 ms
Total time: 58.927 s

Leader Idx: 4
#Output Intersection: 3664
#Expected Intersection: 3664
setSize: 8192
offlineTime: 494 ms
hashingTime: 18 ms
getOPRFTime: 36 ms
ss2DirTime: 0 ms
ssRoundTime: 58409 ms
intersection: 0 ms
onlineTime: 58463 ms
Total time: 58.957 s

=========avg==========
Leader Idx: 4
#Output Intersection: 3664
#Expected Intersection: 3664
numParty: 5 numCorrupted: 2 setSize: 8192 nTrials:1
offlineTime: 494 ms
hashingTime: 18 ms
getOPRFTime: 36 ms
ssClientTime: 0 ms
ssLeaderTime: 58409 ms
intersection: 0 ms
onlineTime: 58463 ms
Total time: 58.957 s

real 0m58.976s
user 1m45.432s
sys 0m56.946s

4. Run with itemset 2^14 fails practically every time

echo "./bin/frontend.exe -n 5 -t 2 -m 14 -p 0 & ./bin/frontend.exe -n 5 -t 2 -m 14 -p 1 & ./bin/frontend.exe -n 5 -t 2 -m 14 -p 2 & ./bin/frontend.exe -n 5 -t 2 -m 14 -p 3 & ./bin/frontend.exe -n 5 -t 2 -m 14 -p 4" > run.sh
time bash run.sh

9
9
9
9
9

After a couple of minutes one of clients outputs the beginning:

Client Idx: 1
setSize: 16384
offlineTime: 478 ms
hashingTime: 34 ms
getOPRFTime: 168878 ms
ss2DirTime: 5763 ms
ssRoundTime: 32 ms
intersection: 0 ms
onlineTime: 174707 ms
Total time: 175.185 s

image

Then one of the processes, the leader I suppose, just keeps calculating forever.

image

5. Run with itemset larger than 2^14 not tested

Any insights, things to test differently? @nitrieu or others?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.