changeset 1398:44ac3a04f413

Orlandi: Renamed pypaillier.tripple to pypaillier.tripple_2c.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Fri, 27 Nov 2009 11:21:50 +0100
parents 866a0167ddeb
children 2cbe81569dd0
files viff/orlandi.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/viff/orlandi.py	Thu Nov 12 11:40:17 2009 +0100
+++ b/viff/orlandi.py	Fri Nov 27 11:21:50 2009 +0100
@@ -28,7 +28,7 @@
 from hash_broadcast import HashBroadcastMixin
 
 try:
-    from pypaillier import encrypt_r, decrypt, tripple
+    from pypaillier import encrypt_r, decrypt, tripple_2c, tripple_3a
     import commitment
     commitment.set_reference_string(23434347834783478783478L,
                                     489237823478234783478020L)
@@ -929,8 +929,8 @@
             ls = decrypt_gammas(gammas)
             ci = sum(ls, field(0)) - sum(dijs, field(0))
             # (b) pick random t_i in (Z_p)^2.
-            t1 = random_number(field. modulus)
-            t2 = random_number(field. modulus)
+            t1 = random_number(field.modulus)
+            t2 = random_number(field.modulus)
             t = (t1, t2)
             # C_i = Com_ck(c_i, t_i).
             Ci = commitment.commit(ci.value, t1.value, t2.value)
@@ -960,7 +960,7 @@
                 # choose random d_i,j in Z_p^3
                 dij = random_number(p3)
                 # gamma_ij = alpha_i^b_j Enc_ek_i(1;1)^d_ij
-                gammaij = tripple(alphas[pi - 1], bj.value, dij.value, self.players[pi].pubkey)
+                gammaij = tripple_2c(alphas[pi - 1], bj.value, dij.value, self.players[pi].pubkey)
                 # Broadcast gamma_ij
                 if pi != self.id:
                     self.protocols[pi].sendData(pc, PAILLIER, str(gammaij))
@@ -1215,7 +1215,7 @@
                     if dij >= (modulus_3):
                         raise OrlandiException("Inconsistent random value dij %i from player %i" % (dij, j + 1))
                     # gamma_ij = alpha_i^b_j Enc_ek_i(1;1)^d_ij
-                    gammaij = tripple(alphas[self.id - 1], bis[j][0].value, 
+                    gammaij = tripple_2c(alphas[self.id - 1], bis[j][0].value, 
                                       dij.value, self.players[self.id].pubkey)
                     if gammaij != gammas[j]:
                         raise OrlandiException("Inconsistent gammaij, %i, %i" % (gammaij, gammas[j]))