diff options
author | cclauss <cclauss@me.com> | 2020-01-28 01:38:54 +0100 |
---|---|---|
committer | cclauss <cclauss@me.com> | 2020-01-28 01:38:54 +0100 |
commit | 3208a74f906c116e93074c6ed0559df1cbfe58d1 (patch) | |
tree | c43d03841d5c29d4a8fc29793ef71eebc065d989 /src/ext/ed25519 | |
parent | aba31e2187808257b250bf469895330f273d7746 (diff) | |
download | tor-3208a74f906c116e93074c6ed0559df1cbfe58d1.tar.gz tor-3208a74f906c116e93074c6ed0559df1cbfe58d1.zip |
Use print() function in both Python 2 and Python 3
Diffstat (limited to 'src/ext/ed25519')
-rw-r--r-- | src/ext/ed25519/ref10/base.py | 14 | ||||
-rw-r--r-- | src/ext/ed25519/ref10/base2.py | 10 | ||||
-rw-r--r-- | src/ext/ed25519/ref10/d.py | 2 | ||||
-rw-r--r-- | src/ext/ed25519/ref10/d2.py | 2 | ||||
-rw-r--r-- | src/ext/ed25519/ref10/sqrtm1.py | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/ext/ed25519/ref10/base.py b/src/ext/ed25519/ref10/base.py index 8bfaab0568..3d477c5c39 100644 --- a/src/ext/ed25519/ref10/base.py +++ b/src/ext/ed25519/ref10/base.py @@ -56,15 +56,15 @@ def radix255(x): Bi = B for i in range(32): - print "{" + print("{") Bij = Bi for j in range(8): - print " {" - print " {",radix255(Bij[1]+Bij[0]),"}," - print " {",radix255(Bij[1]-Bij[0]),"}," - print " {",radix255(2*d*Bij[0]*Bij[1]),"}," + print(" {") + print(" {",radix255(Bij[1]+Bij[0]),"},") + print(" {",radix255(Bij[1]-Bij[0]),"},") + print(" {",radix255(2*d*Bij[0]*Bij[1]),"},") Bij = edwards(Bij,Bi) - print " }," - print "}," + print(" },") + print("},") for k in range(8): Bi = edwards(Bi,Bi) diff --git a/src/ext/ed25519/ref10/base2.py b/src/ext/ed25519/ref10/base2.py index 5923e43a7b..3f8e3d25d2 100644 --- a/src/ext/ed25519/ref10/base2.py +++ b/src/ext/ed25519/ref10/base2.py @@ -57,9 +57,9 @@ def radix255(x): Bi = B for i in range(8): - print " {" - print " {",radix255(Bi[1]+Bi[0]),"}," - print " {",radix255(Bi[1]-Bi[0]),"}," - print " {",radix255(2*d*Bi[0]*Bi[1]),"}," - print " }," + print(" {") + print(" {",radix255(Bi[1]+Bi[0]),"},") + print(" {",radix255(Bi[1]-Bi[0]),"},") + print(" {",radix255(2*d*Bi[0]*Bi[1]),"},") + print(" },") Bi = edwards(B,edwards(B,Bi)) diff --git a/src/ext/ed25519/ref10/d.py b/src/ext/ed25519/ref10/d.py index 3fbb175077..5b875de666 100644 --- a/src/ext/ed25519/ref10/d.py +++ b/src/ext/ed25519/ref10/d.py @@ -30,4 +30,4 @@ def radix255(x): return result d = -121665 * inv(121666) -print radix255(d) +print(radix255(d)) diff --git a/src/ext/ed25519/ref10/d2.py b/src/ext/ed25519/ref10/d2.py index 3e533730b7..f59a1bc62a 100644 --- a/src/ext/ed25519/ref10/d2.py +++ b/src/ext/ed25519/ref10/d2.py @@ -30,4 +30,4 @@ def radix255(x): return result d = -121665 * inv(121666) -print radix255(d*2) +print(radix255(d*2)) diff --git a/src/ext/ed25519/ref10/sqrtm1.py b/src/ext/ed25519/ref10/sqrtm1.py index a276d4e673..df9f26ee1d 100644 --- a/src/ext/ed25519/ref10/sqrtm1.py +++ b/src/ext/ed25519/ref10/sqrtm1.py @@ -30,4 +30,4 @@ def radix255(x): return result I = expmod(2,(q-1)/4,q) -print radix255(I) +print(radix255(I)) |