data61 / MP-SPDZ

Versatile framework for multi-party computation
Other
942 stars 279 forks source link

Benchmarking Shuffle and Radix Sort #1530

Open sambux1 opened 6 hours ago

sambux1 commented 6 hours ago

Hello! I'm trying to benchmark the oblivious shuffle protocol and the radix sort protocol.

To start with, I'm assuming the following is the optimal way of invoking the protocols, where v is a randomly generated Array. Is this correct? Is there any more efficient way of invoking them that you would prefer be used for benchmarks?

v.secure_shuffle()
v.sort()

Additionally, I'm curious about the scenarios in which these protocols are supported. I believe another issue (#1505) mentioned that shuffling binary secret-shared values is not supported. Is this still the case, and is this true for all protocols? Does radix sort have any similar restrictions?

Finally, is radix sort supported for all protocols? I'm particularly interested in semi-honest replicated 3pc (Araki et. al.), Fantastic Four, and semi-honest 2pc.

mkskeller commented 5 hours ago

To start with, I'm assuming the following is the optimal way of invoking the protocols, where v is a randomly generated Array. Is this correct? Is there any more efficient way of invoking them that you would prefer be used for benchmarks?

You don't need to generate a random array because MPC protocols have run times independent of secret inputs (otherwise there would be leakage).

Additionally, I'm curious about the scenarios in which these protocols are supported. I believe another issue (#1505) mentioned that shuffling binary secret-shared values is not supported. Is this still the case, and is this true for all protocols? Does radix sort have any similar restrictions?

Yes.

Finally, is radix sort supported for all protocols? I'm particularly interested in semi-honest replicated 3pc (Araki et. al.), Fantastic Four, and semi-honest 2pc.

Radix sort is supported for all arithmetic protocols, i.e., where the domain is modulo a prime or a larger power of two.