Edwards normal form: Difference between revisions

From Elliptic Curve Crypto
r code
Line 21: Line 21:


== Point group arithmetic ==
== Point group arithmetic ==
 
[[Image:Ed448x-R.svg|frame|left|The [[point group operation]] as defined here is plotted on the “untwisted” [[Ed448]] curve (with ''d''=-39081 and the twist parameter ''a''=1.) When the points indicated with hollow circles are “added,” the result point is shown with a filled-in circle.]]
The [[point group operation]] on an elliptic curve in the twisted Edwards form as defined above is defined as <ref>Daniel J. Bernstein, Peter Birkner, Marc Joye, Tanja Lange, and Christiane Peters. “Twisted Edwards Curves.” ''Cryptology ePrint Archive,'' vol. 2008, no. 013 https://eprint.iacr.org/2008/013.pdf</ref>
The [[point group operation]] on an elliptic curve in the twisted Edwards form as defined above is defined as <ref>Daniel J. Bernstein, Peter Birkner, Marc Joye, Tanja Lange, and Christiane Peters. “Twisted Edwards Curves.” ''Cryptology ePrint Archive,'' vol. 2008, no. 013 https://eprint.iacr.org/2008/013.pdf</ref>


Line 28: Line 28:
\frac{y_1y_2-ax_1x_2}{1-dx_1x_2y_1y_2}
\frac{y_1y_2-ax_1x_2}{1-dx_1x_2y_1y_2}
\right)</math>.
\right)</math>.


Protestants find it offensive to refer to arithmetic or other ''operations'' as of some “law” or as works done through or under the “law” so to speak, although that term does appear as such in the original literature. It is something vaguely felt to be grammatically repulsive, almost as if in Spanish to imply, “bajo la ley” and not “sobre la ley” or above-board.
Protestants find it offensive to refer to arithmetic or other ''operations'' as of some “law” or as works done through or under the “law” so to speak, although that term does appear as such in the original literature. It is something vaguely felt to be grammatically repulsive, almost as if in Spanish to imply, “bajo la ley” and not “sobre la ley” or above-board.
Line 34: Line 35:
Federal Bureau of Investigation. “Finding a Way Forward on Lawful Access: Bringing Child Predators out of the Shadows:
Federal Bureau of Investigation. “Finding a Way Forward on Lawful Access: Bringing Child Predators out of the Shadows:
Remarks as delivered.” ''Department of Justice Lawful Access Summit,'' Washington, D.C. October 4, 2019. https://www.fbi.gov/news/speeches/finding-a-way-forward-on-lawful-access</ref><ref>Zack Whittaker. “US attorney general William Barr says Americans should accept security risks of encryption backdoors.” ''TechCrunch,'' July 23, 2019. https://techcrunch.com/2019/07/23/william-barr-consumers-security-risks-backdoors/</ref>.
Remarks as delivered.” ''Department of Justice Lawful Access Summit,'' Washington, D.C. October 4, 2019. https://www.fbi.gov/news/speeches/finding-a-way-forward-on-lawful-access</ref><ref>Zack Whittaker. “US attorney general William Barr says Americans should accept security risks of encryption backdoors.” ''TechCrunch,'' July 23, 2019. https://techcrunch.com/2019/07/23/william-barr-consumers-security-risks-backdoors/</ref>.
== Example program in R ==
The point group “sum” of any two points on the curve should be derivable from geometric considerations of lines intersecting the curve and reflecting across axes as in the case of the [[Weierstraß normal form]], but the precise rules seem a little bit more complicated, exactly which reflections to take where with so many axes of symmetry.
The [https://www.r-project.org/ <big>'''R'''</big>] code here picks two points on the [[Ed448]] curve at random and “sums” them.
<syntaxhighlight lang="r" line>
#! /usr/bin/R -f
f <- function(x){sqrt((1-x^2)/(1+39081*x^2))}
g <- function(x1,y1,x2,y2,d=-39081){
(x1*y2 + y1*x2) / (1 + d*x1*x2*y1*y2)
}
h <- function(x1,y1,x2,y2,d=-39081,a=1){
(y1*y2 - a*x1*x2) / (1 - d*x1*x2*y1*y2)
}
x <- seq(0,1,0.0001); x <- c(rev(x),-x)
y <- f(x)
x <- c(x,rev(x)); y <- c(y,rev(-y))
xp <- (rbinom(2,100,0.5)-50)/100
yp <- f(xp) * (-1)^sample.int(2,1)
plot(x,y,type="l")
points(xp,yp)
points(g(xp[1],yp[1],xp[2],yp[2]),h(xp[1],yp[1],xp[2],yp[2]),pch=19)
</syntaxhighlight>

Revision as of 08:35, 31 December 2024


Elliptic curve known as Ed448 “Goldilocks” in Edwards normal form with

An elliptic curve is in Edwards normal form[1] if it can be described by the equation

The more general original Edwards form has another parameter c

but it is very simple to eliminate the scale parameter c and reduce this equation to its normal form for ease of performing algebraic group operations on rational points or finite fields.

The twist


This elliptic curve in a so-called twisted Edwards form is the one used in the Ed25519 digital signature scheme [2].

There is also a “twisted” Edwards form

And this brings us back to the ancient Greek word στραγγός with the idea of using something “twisted” for strong cryptography.

Point group arithmetic

The point group operation as defined here is plotted on the “untwisted” Ed448 curve (with d=-39081 and the twist parameter a=1.) When the points indicated with hollow circles are “added,” the result point is shown with a filled-in circle.

The point group operation on an elliptic curve in the twisted Edwards form as defined above is defined as [3]

.


Protestants find it offensive to refer to arithmetic or other operations as of some “law” or as works done through or under the “law” so to speak, although that term does appear as such in the original literature. It is something vaguely felt to be grammatically repulsive, almost as if in Spanish to imply, “bajo la ley” and not “sobre la ley” or above-board.

The term “law” is normally reserved in mathematical contexts for a formal probability measure over an event space. The abuse of the term in the cryptologic literature (hint, hint, there’s an arbitrary “law” involved in a mathematical operation) cannot be a coincidence. The FBI under Christopher Wray has for many years, and under other directors as well, been demanding “lawful access” to break the aforementioned encryption at will, and as usual, it’s “for the children” [4][5].

Example program in R

The point group “sum” of any two points on the curve should be derivable from geometric considerations of lines intersecting the curve and reflecting across axes as in the case of the Weierstraß normal form, but the precise rules seem a little bit more complicated, exactly which reflections to take where with so many axes of symmetry.

The R code here picks two points on the Ed448 curve at random and “sums” them.

#! /usr/bin/R -f

f <- function(x){sqrt((1-x^2)/(1+39081*x^2))}
g <- function(x1,y1,x2,y2,d=-39081){
	(x1*y2 + y1*x2) / (1 + d*x1*x2*y1*y2)
}
h <- function(x1,y1,x2,y2,d=-39081,a=1){
	(y1*y2 - a*x1*x2) / (1 - d*x1*x2*y1*y2)
}

x <- seq(0,1,0.0001); x <- c(rev(x),-x)
y <- f(x)
x <- c(x,rev(x)); y <- c(y,rev(-y))

xp <- (rbinom(2,100,0.5)-50)/100
yp <- f(xp) * (-1)^sample.int(2,1)

plot(x,y,type="l")
points(xp,yp)

points(g(xp[1],yp[1],xp[2],yp[2]),h(xp[1],yp[1],xp[2],yp[2]),pch=19)
  1. Harold M. Edwards. “A normal form for elliptic curves.” Bulletin of the American Mathematical Society, vol. 44, no. 3, Jul 2007, pp. 393–422. https://www.ams.org/journals/bull/2007-44-03/S0273-0979-07-01153-6/
  2. Wikipedia: EdDSA https://en.wikipedia.org/wiki/EdDSA#Ed25519
  3. Daniel J. Bernstein, Peter Birkner, Marc Joye, Tanja Lange, and Christiane Peters. “Twisted Edwards Curves.” Cryptology ePrint Archive, vol. 2008, no. 013 https://eprint.iacr.org/2008/013.pdf
  4. Christopher Wray, Director Federal Bureau of Investigation. “Finding a Way Forward on Lawful Access: Bringing Child Predators out of the Shadows: Remarks as delivered.” Department of Justice Lawful Access Summit, Washington, D.C. October 4, 2019. https://www.fbi.gov/news/speeches/finding-a-way-forward-on-lawful-access
  5. Zack Whittaker. “US attorney general William Barr says Americans should accept security risks of encryption backdoors.” TechCrunch, July 23, 2019. https://techcrunch.com/2019/07/23/william-barr-consumers-security-risks-backdoors/