Exemple #1
0
 def __init__(self, F, n, t, numTrip):
     self.n = n
     b = ss.share(F, np.random.choice([-1, 1]), t, n)
     self.distribute_shares('b', b)
     triplets = [proc.triplet(F, n, t) for i in range(numTrip)]
     for i in range(n):
         l = []
         for j in range(numTrip):
             l.append(triplets[j][i])
         sock.TCPclient(party_addr[i][0], party_addr[i][1], ['triplets', l])
Exemple #2
0
 def __init__(self, F, n, t, numTrip, l=7):
     #        self.b = ss.share(F,np.random.choice([-1,1]), t, n)
     self.triplets = [proc.triplet(F, n, t) for i in range(numTrip)]