> >   if runtime.id == 1:
> >     a = runtime.broadcast(1, "foo")
> >     b = runtime.broadcast(2)
> >   if runtime.id == 2:
> >     a = runtime.broadcast(1)
> >     b = runtime.broadcast(2, "bar")
> >   if runtime.id == 3:
> >     a = runtime.broadcast(1)
> >     b = runtime.broadcast(2)
> >
> > This does not match the shamir_share method, which allows you to write
> >
> >   a, b = runtime.shamir_share([1, 2], input)
> >
> > where input is different for each of the two inputters.
>
> That code is actually wrong, the correct code would be:
>
>   if runtime.id == 1 or runtime.id == 2:
>     a, b = runtime.shamir_share([1, 2], input)
>   else:
>     a, b = runtime.shamir_share([1, 2])
This code assumes that the input is already determined above based on whether we
have id 1 or 2. So there is somehow the same branch as in the broadcast case,
only hidden here.


_______________________________________________
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk

Reply via email to