Martin Geisler <m...@daimi.au.dk> writes: > Håvard Vegge <hava...@stud.ntnu.no> writes: > >> Hi! >> >> In the following code line the variable ra1 from node 1, 2 and 3 is >> assigned to r1, r2 and r3, respectively. >> r1, r2, r3 = runtime.shamir_share([1, 2, 3], Zp, self.ra1) >> >> Is it possible that just node 1 have a variable ra1 to share? In my >> mind it would have looked like this: >> r1 = runtime.shamir_share([1], Zp, self.ra1) >> Shouldn't such a scenario be possible to achieve? > > Indeed it is possible, and it is not only in your mind that the code > looks like that :-) > > The only additional issue is that you must make sure that P2 and P3 > still participate. So the full code would look like this: > > if runtime.id == 1: > r1 = runtime.shamir_share([1], Zp, self.ra1) > else: > r1 = runtime.shamir_share([1], Zp) > > This way all players get their share, but it is only P1 who provides > any input.
I've updated the API docs, it should appear online here in a moment: http://viff.dk/doc/passive.html#viff.passive.PassiveRuntime.shamir_share Please let us know if you find other things that should be explained better. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. _______________________________________________ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk