Skip to content

Commit

Permalink
some small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari Wahl committed Oct 13, 2014
1 parent 205c732 commit c351a52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 6 additions & 5 deletions CTFs_and_WarGames/2014-ASIS-CTF/crypto_paillier/binary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand All @@ -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

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

All in one big bag.

More [here].


[here]: https://gist.github.com/bt3gl/8e3aa9538d6122f74274

![](http:https://i.imgur.com/4WNqTJS.png)
![](http:https://i.imgur.com/4WNqTJS.png)

0 comments on commit c351a52

Please sign in to comment.