chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e4c266
)
utils/curve25519.sage: Remove redundant coercion to field k.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 19 Oct 2017 23:35:57 +0000
(
00:35
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 19 Oct 2017 23:37:06 +0000
(
00:37
+0100)
utils/curve25519.sage
patch
|
blob
|
blame
|
history
diff --git
a/utils/curve25519.sage
b/utils/curve25519.sage
index f5375a79bcb894bd26843ef3afd6a75b06dfb875..6fa3cd342e3cddc07578c9b8ab240d8118b3ba2c 100644
(file)
--- a/
utils/curve25519.sage
+++ b/
utils/curve25519.sage
@@
-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)