Two comparison protocols have been implemented in VIFF. They are available in the classes ComparisonToft05Mixin and ComparisonToft07Mixin. Both protocols have been designed by Tomas Toft.
The classes are mixin classes which means that they are meant to be used (“mixed”) with other classes to build a finished usable class. Two standard “flavors” are provided in the Toft05Runtime and Toft07Runtime.
Comparison by Tomas Toft, 2005.
Default mix of ComparisonToft05Mixin and PassiveRuntime.
Efficient comparison by Tomas Toft 2007. This mixin provides a greater_than_equal() method which can compare Zp field elements and gives a secret result shared over Zp.
Compute share_a >= share_b.
Both arguments must be shares from the same field. The result is a new 0/1 share from the field.
Default mix of ComparisonToft07Mixin and PassiveRuntime.