Home | Trees | Indices | Help |
|
---|
|
Equality protocol. The mixin class defined here provide an :meth:`equal` method to the :class:`Runtime <viff.runtime.Runtime>` it is mixed with.
|
|||
ProbabilisticEqualityMixin This class implements probabilistic constant-round secure equality-testing of secret shared numbers. |
|
|||
|
|
Return the legendre symbol ``legendre(a, p)`` where *p* is the order of the field of *a*. The legendre symbol is -1 if *a* is not a square mod *p*, 0 if ``gcd(a, p)`` is not 1, and 1 if *a* is a square mod *p*: >>> from viff.field import GF >>> legendre_mod_p(GF(5)(2)) -1 >>> legendre_mod_p(GF(5)(5)) 0 >>> legendre_mod_p(GF(5)(4)) 1 |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 19 16:43:36 2009 | http://epydoc.sourceforge.net |