changeset 1399:2cbe81569dd0

Orlandi: Use tripple_3a.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Fri, 27 Nov 2009 16:13:56 +0100
parents 44ac3a04f413
children 3a225dcdaccb
files viff/orlandi.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/viff/orlandi.py	Fri Nov 27 11:21:50 2009 +0100
+++ b/viff/orlandi.py	Fri Nov 27 16:13:56 2009 +0100
@@ -926,8 +926,12 @@
                       broadcast ``C_i = Com_ck(c_i, t_i)``
             """
             # c_i = SUM_j Dec_sk_i(gamma_ij) - SUM_j d_ji mod p.
-            ls = decrypt_gammas(gammas)
-            ci = sum(ls, field(0)) - sum(dijs, field(0))
+            dls = []
+            for dij in dijs:
+                dls.append(dij.value)
+
+            ls = [list(x) for x in zip(gammas, dls)]
+            ci = field(tripple_3a(ls, self.players[self.id].seckey))
             # (b) pick random t_i in (Z_p)^2.
             t1 = random_number(field.modulus)
             t2 = random_number(field.modulus)