Skip to content

Commit

Permalink
Merge pull request #14 from enedil/master
Browse files Browse the repository at this point in the history
Change / into // in `lift` for compatibility with Python 3
  • Loading branch information
nazywam authored Jul 28, 2020
2 parents 3a1f766 + 245a43c commit 4237a5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto_commons/rsa/rsa_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def lift(f, df, p, k, previous):
dfr = df(lower_solution)
fr = f(lower_solution)
if dfr % p != 0:
t = (-(extended_gcd(dfr, p)[1]) * int(fr / p ** (k - 1))) % p
t = (-(extended_gcd(dfr, p)[1]) * (fr // p ** (k - 1))) % p
result.append(lower_solution + t * p ** (k - 1))
if dfr % p == 0:
if fr % p ** k == 0:
Expand Down

0 comments on commit 4237a5e

Please sign in to comment.