Martin Geisler <[EMAIL PROTECTED]> writes: > 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) > > with code like this: > > if runtime.id == 1: > a, b = runtime.shamir_share([1, 2], Zp(123)) > if runtime.id == 2: > a, b = runtime.shamir_share([1, 2], Zp(456)) > if runtime.id == 3: > a, b = runtime.shamir_share([1, 2])
Just one more thing... The above code uses a new syntax for shamir_share that I would like to propose for all relevant commands: the first argument specifies the inputters and following that comes the arguments with the final argument(s) being optional. I am working on a patch in which the field of a given Share is passed explicitly around the code. That will change the signature of shamir_share to: shamir_share(self, inputters, field, number=None) More importantly, this change should save us half the bandwidth when sending Shares back and forth over the net since we no longer have to send the modulus -- the receiving side already knows what to expect. And that is not all: this change will also make it possible to remove the explicit field argument in the greater_than method, which in turn allows us to overload > on Share objects (and <, >=, <=, and == too) since these methods now only take two arguments. As always, let us know if you have any comments on these plans! -- Martin Geisler
pgp5OqfFdIHru.pgp
Description: PGP signature
_______________________________________________ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk