viff

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 diff
     1.1 --- a/viff/orlandi.py	Thu Nov 12 11:40:17 2009 +0100
     1.2 +++ b/viff/orlandi.py	Fri Nov 27 11:21:50 2009 +0100
     1.3 @@ -28,7 +28,7 @@
     1.4  from hash_broadcast import HashBroadcastMixin
     1.5  
     1.6  try:
     1.7 -    from pypaillier import encrypt_r, decrypt, tripple
     1.8 +    from pypaillier import encrypt_r, decrypt, tripple_2c, tripple_3a
     1.9      import commitment
    1.10      commitment.set_reference_string(23434347834783478783478L,
    1.11                                      489237823478234783478020L)
    1.12 @@ -929,8 +929,8 @@
    1.13              ls = decrypt_gammas(gammas)
    1.14              ci = sum(ls, field(0)) - sum(dijs, field(0))
    1.15              # (b) pick random t_i in (Z_p)^2.
    1.16 -            t1 = random_number(field. modulus)
    1.17 -            t2 = random_number(field. modulus)
    1.18 +            t1 = random_number(field.modulus)
    1.19 +            t2 = random_number(field.modulus)
    1.20              t = (t1, t2)
    1.21              # C_i = Com_ck(c_i, t_i).
    1.22              Ci = commitment.commit(ci.value, t1.value, t2.value)
    1.23 @@ -960,7 +960,7 @@
    1.24                  # choose random d_i,j in Z_p^3
    1.25                  dij = random_number(p3)
    1.26                  # gamma_ij = alpha_i^b_j Enc_ek_i(1;1)^d_ij
    1.27 -                gammaij = tripple(alphas[pi - 1], bj.value, dij.value, self.players[pi].pubkey)
    1.28 +                gammaij = tripple_2c(alphas[pi - 1], bj.value, dij.value, self.players[pi].pubkey)
    1.29                  # Broadcast gamma_ij
    1.30                  if pi != self.id:
    1.31                      self.protocols[pi].sendData(pc, PAILLIER, str(gammaij))
    1.32 @@ -1215,7 +1215,7 @@
    1.33                      if dij >= (modulus_3):
    1.34                          raise OrlandiException("Inconsistent random value dij %i from player %i" % (dij, j + 1))
    1.35                      # gamma_ij = alpha_i^b_j Enc_ek_i(1;1)^d_ij
    1.36 -                    gammaij = tripple(alphas[self.id - 1], bis[j][0].value, 
    1.37 +                    gammaij = tripple_2c(alphas[self.id - 1], bis[j][0].value, 
    1.38                                        dij.value, self.players[self.id].pubkey)
    1.39                      if gammaij != gammas[j]:
    1.40                          raise OrlandiException("Inconsistent gammaij, %i, %i" % (gammaij, gammas[j]))