Martin Geisler <[EMAIL PROTECTED]> writes: > Martin Geisler <[EMAIL PROTECTED]> writes: > >> Mikkel and I restructured some code yesterday in preparation for >> implementing a Bracha broadcast, which in turn will help implement >> protocols for active security. > > As you might have seen on http://viff.dk/, Mikkel has committet a > Bracha broadcast, great! > > This is currently implemented fully asymmetrically, by which I mean > that only one player can give input. So for each player to broadcast a > value one would write > > 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]) That makes the difference between the broadcast and shamir_share methods even smaller. Is the magic still needed then? -- Martin Geisler _______________________________________________ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk