Closed MarcT0K closed 1 year ago
By the way, the problem is present for any M above 1
The problem is probably because you let each party generate its own random numpy matrix. In the 1-party mode this is no problem, but in the $m$-party mode with $m>1$ the parties will start from inconsistent states.
The MPyC demos show several approaches to work with randomly generated input in the multiparty setting. Basically, there are two ways.
One way is to let the parties jointly generate a random value. A first example is to jointly generate the seed for a one-way hash chain:
Another example is the distributed key generation (DKG) protocol for the threshold ElGamal cryptogsystem:
This way no party knows the random value, it is like a shared secret.
Another way is to let one party (usually party with mpc.pid == 0
) first generate a random value locally. If it is OK that this value is public, for all parties to see, we can use mpc.transfer()
to broadcast the value to all parties. Here is an example close to your case:
And here's a more advanced example, where party 0 first broadcasts a random seed, and then all parties locally generate the same synthesized data:
I hope this solves your problem?
Hi,
Thank you very much for this pointer! Indeed, it solved my problem. I know better understand how the scripts are executed by the various parties and what is the interest of mpc.transfer()
.
Hi, Sorry to bother you but I bumped into a behaviour I cannot explain. To put it simply, I am doing some secure linear algebra experiments. I start from a random numpy matrix and transform it into a list of secure numbers to compute some stuff.
Initially, I tested everything in the 1-party mode. All my results were correct.
Today, I changed the number of parties to M=3. All my results are now false. When M=1, my secure list have coherent values but when M=3, the values are all incorrect. I suppose that I have done a mistake in the transformation from numpy object to secure list but I am not sure were. I struggle to pin point where is my mistake. The data transformation looks like this:
If ever you have a little nudge for me, I would be glad to hear it!
PS: in addition to the correct result, one of my coroutine even crashes with the following traceback. Something seems definitely wrong with my share generation...