Like mul, Runtime.xor should do a local computation if one of the
operands is a known constant.
Right now it just wraps whatever it gets and calls add and mul, and
because of the wrapping a slow multiplication will take place.
Maybe the wrapping is wrong?
Or maybe we should start tracking the sharing degree of all Share
objects. I think that would be the most general and most precise
solution, and it would also enable the lazy Shamir sharing talked
about in Issue 9.
|