This makes things faster; about 39x faster for verification on my machine.
We pass to homogeneous coordinates and add an auxiliary coordinate, so
a point P = (x, y) is represented now as (X : Y : Z : T), where
x = X/Z, y = Y/Z, xy = T/Z. The homogeneous coordinates allow us to
avoid any inversion in the Edwards addition, and the auxiliary
coordinate T saves another multiply or so.
Patch supplied by Mike Hamburg mike@shiftleft.org against upstream
ed25519.py. He released his modifications into the public domain.
I rebased and added the short comment and this commit message.
This makes things faster; about 39x faster for verification on my machine.
We pass to homogeneous coordinates and add an auxiliary coordinate, so a point P = (x, y) is represented now as (X : Y : Z : T), where x = X/Z, y = Y/Z, xy = T/Z. The homogeneous coordinates allow us to avoid any inversion in the Edwards addition, and the auxiliary coordinate T saves another multiply or so.
Patch supplied by Mike Hamburg mike@shiftleft.org against upstream ed25519.py. He released his modifications into the public domain. I rebased and added the short comment and this commit message.