fix: python3.12 compatibility
This commit is contained in:
parent
290025958f
commit
a1bae33e06
2 changed files with 3 additions and 2 deletions
|
@ -90,7 +90,7 @@ def pow2(x, p):
|
|||
|
||||
|
||||
def inv(z):
|
||||
"""$= z^{-1} \mod q$, for z != 0"""
|
||||
"""$= z^{-1} \\mod q$, for z != 0"""
|
||||
# Adapted from curve25519_athlon.c in djb's Curve25519.
|
||||
z2 = z * z % q # 2
|
||||
z9 = pow2(z2, 2) * z % q # 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue