chiark / gitweb /
utils/curve25519.sage: Remove redundant coercion to field k.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 19 Oct 2017 23:35:57 +0000 (00:35 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 19 Oct 2017 23:37:06 +0000 (00:37 +0100)
utils/curve25519.sage

index f5375a79bcb894bd26843ef3afd6a75b06dfb875..6fa3cd342e3cddc07578c9b8ab240d8118b3ba2c 100644 (file)
@@ -267,7 +267,7 @@ assert x25519(x, Y[0]) == x25519(y, X[0]) == Z[0]
 ### Edwards curve parameters and conversion.
 
 a = k(-1)
-d = k(-A0/(A0 + 1))
+d = -A0/(A0 + 1)
 
 def mont_to_ed(u, v):
   return sqrt(-A - 2)*u/v, (u - 1)/(u + 1)