[viff-devel] The function shamir_share
Martin Geisler
mg at daimi.au.dk
Mon Feb 9 01:52:20 PST 2009
Martin Geisler <mg at daimi.au.dk> writes:
> Håvard Vegge <havardv at 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/.
More information about the viff-devel
mailing list