-
Notifications
You must be signed in to change notification settings - Fork 3
/
client.py
26 lines (16 loc) · 900 Bytes
/
client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
__author__ = 'pawan'
from Bloom import Bloom
from OTRecv import OTRecv
clientSet = [3,4,5,6, 7 ]
bloomClient = Bloom(clientSet)
bloomClient.generateBloom()
BFc = bloomClient.getBloom()
generator = 2045999832912957017696899038249723031652808586302786492701737751786256859920910559231421909153586598647911069920255352007045971901844488687357123721071418415
prime = 3989530240576982954905516988490555817184633741429235826809988606295372830739893893426271188667859430615399162320627698099477463527541398969175342947764145393
q = 4889130196785518327090094348640387030863521741947592925012240939087466704338105261551802927289043419871812698922337865317987087656300734030852135965397237
OTc = OTRecv(generator, prime, q)
lam = bloomClient.getLambda()
print "started"
GBFi = OTc.obliviouslyReceive(BFc, len(BFc), lam)
for share in clientSet:
print share, bloomClient.queryGarbled(share, GBFi)