some small fixes

This commit is contained in:
Mari Wahl 2014-10-13 19:22:13 -04:00
parent 205c732ea0
commit c351a52951
2 changed files with 7 additions and 8 deletions

View File

@ -24,10 +24,12 @@ def bs_paillier(lo, hi, s):
if 'None' in ans:
print "Found it!"
return mid + 1
elif 'Your secret' in ans:
return bs_paillier(lo, mid-1, s)
elif 'Your secret is' in ans:
print "too high"
return bs_paillier(mid, hi, s)
else:
return bs_paillier(mid+1, hi, s)
print "too low"
return bs_paillier(lo, mid, s)
@ -42,8 +44,7 @@ def get_mod_paillier():
s.recv(4096)
# start binary search
hi = pow(11,307)
lo = pow(10,307)
hi, lo = 11**307, 10**307
mod = bs_paillier(lo, hi, s)
print mod

View File

@ -2,9 +2,7 @@
All in one big bag.
More [here].
[here]: https://gist.github.com/bt3gl/8e3aa9538d6122f74274
![](http://i.imgur.com/4WNqTJS.png)
![](http://i.imgur.com/4WNqTJS.png)