Visa-Research / volepsi

Efficient Private Set Intersection base on VOLE
MIT License
98 stars 31 forks source link

deploy this on two machines. #19

Closed yellow123Nike closed 1 year ago

yellow123Nike commented 1 year ago

Hello, how can I deploy this on two machines. The sender command is as follows: ./frontend -in /volepsi/Data/DATA.csv -r 0 -out /volepsi/Data -csv -ip 127:00:00:101:4212 receiver command is as follows: ./frontend -in /volepsi1/Data/DATA.csv -out /volepsi/Data -csv -ip 127:00:00:100:1212 -r 1 But an error is reported:

image
ladnir commented 1 year ago

This has to do with your settings & firewalls, not the library.

So if you have machine A & B with IPs IP_A,IP_B, and you want machine A to be the tcp server on port 1212, then what you will use is

Machine A: ./frontend -in /volepsi/Data/DATA.csv -out /volepsi/Data -csv -ip IP_A:1212 -r 0 -server 1 Machine B: ./frontend -in /volepsi1/Data/DATA.csv -out /volepsi/Data -csv -ip IP_A:1212 -r 1 -server 0

Both parties input the server's IP and port. Moreover, the way you write IP address are XX.XX.XX.XX:YY, note the . .

You also need to use an IP address that is visible to the TCP client. 127.0.0.1 is localhost. This is a private IP address that is visible only on the local machine. No one else can access this address. To get your 'public' address thats visible on your LAN, run ifconfig or ip address show on the server, you should have a device with name like eth0. Use that IP.

yellow123Nike commented 1 year ago

Thanks! Hello, it seems that the size of the elements has no effect on the performance of the protocol? Both in terms of computation and communication?

ladnir commented 1 year ago

Correct, the first thing that happens is that it hashes your inputs into 128 bit values. Assuming you don't have crazy long elements, it should be just as fast as short elements.

yellow123Nike commented 1 year ago

But element size seems to have an effect on communication time and Baxos codecs?

ladnir commented 1 year ago

Before the PSI even starts, your input elements are transformed into a std::vector<block>, block is a 128 bit value. https://github.com/Visa-Research/volepsi/blob/main/volePSI/fileBased.cpp#L88

Secondly, the Baxos is not on your set elements. Instead its on a hash of them. See figure 11, the Baxos key is x and its value is H(x). https://github.com/Visa-Research/volepsi/blob/main/misc/blazingFastPSI.pdf

yellow123Nike commented 1 year ago

Thank you very much, I need to look more closely at the code and the paper. I'll probably bother you again later!

yellow123Nike commented 1 year ago

Hello, is it possible to replace F_128 with F_64. This will reduce the size of the vector and may be faster in a 10Mbps environment?

ladnir commented 1 year ago

See the discussion about subfield vole. That's what this does. There are limitations though. Also see https://eprint.iacr.org/2022/334.pdf

ladnir commented 1 year ago

Yeah, not sure. Pretty close to 1.28... Maybe something isn't setup quite right.

yellow123Nike commented 1 year ago

What other parameters do I need to set then? set size n=2^20 ,weight w=3, clustering lbs=15

ladnir commented 1 year ago

I'm not sure. Does it matter?

yellow123Nike commented 1 year ago

I now have an IDEAS and need to use your OKVS . The bandwidth is limited to 10Mbps. For my papers data to look a little better, the expansion ratio e shorter the communication time will be. I tried to use Paxos, but the codec time is much worse than baxos. So I chose to try to reduce the expansion rate e of Baxos as much as possible

ladnir commented 1 year ago

Well you can edit the code to set it to 1.28. But otherwise I don't know. But I can't imagine 4% is significant.

yellow123Nike commented 1 year ago

thanks,The bottleneck for the papers is now in the communication time, so I optimize the communication as much as possible.