Package viff :: Module comparison :: Class ComparisonToft05Mixin
[hide private]
[frames] | no frames]

Class ComparisonToft05Mixin

source code


Comparison by Tomas Toft, 2005.
Instance Methods [hide private]
 
convert_bit_share(self, share, dst_field)
Convert a 0/1 share into dst_field.
source code
 
decomposed_random_sharing(self, field, bits) source code
 
greater_than_equal(self, share_a, share_b)
Compute share_a >= share_b.
source code
 
_finish_greater_than_equal(self, results, l)
Finish the calculation.
source code
 
_diamond(self, (top_a, bot_a), (top_b, bot_b))
The "diamond-operator".
source code
Method Details [hide private]

greater_than_equal(self, share_a, share_b)

source code 

Compute share_a >= share_b.

Both arguments must be from the same field. The result is a GF256 <viff.field.GF256> share.

Decorators:
  • @profile

Warning: The result type (viff.field.GF256) is different from the argument types (general field elements).

_diamond(self, (top_a, bot_a), (top_b, bot_b))

source code 

The "diamond-operator".

Defined by:

(x, X) `diamond` (0, Y) = (0, Y)
(x, X) `diamond` (1, Y) = (x, X)