chiark
/
gitweb
/
~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
math/: Improve some commentary in the binary-field arithmetic.
[catacomb]
/
math
/
ec-bin.c
diff --git
a/math/ec-bin.c
b/math/ec-bin.c
index d91b034340237d472ed53326223cadd813d7de2b..c7fe96d499fd08e67ddafc8d6879ccc6c21e7588 100644
(file)
--- a/
math/ec-bin.c
+++ b/
math/ec-bin.c
@@
-73,6
+73,7
@@
static ec *ecfind(ec_curve *c, ec *d, mp *x)
v = F_MUL(f, v, u, y); /* %$B = A x^{-2} = x + a + b x^{-2}$% */
y = F_QUADSOLVE(f, y, v); /* %$z^2 + z = B$% */
if (y) y = F_MUL(f, y, y, x); /* %$y = z x$% */
+ /* Hence %$y^2 + x y = (z^2 + z) x^2 = A$% */
}
MP_DROP(u);
MP_DROP(v);