I am wondering how the precomputed table for scalar multiplication for elliptic curve (in my case 25519) is generated/precomputed?
I am talking about this [https://github.com/WhisperSystems/libsignal-protocol-javascript/blob/master/native/ed25519/base.h
The piece of code which uses this header file is:
/* base[i][j] = (j+1)*256^i*B */
/*static const ge_precomp base[32][8] = {
#include "base.h"
} ;*/
ge_precomp is defined as
ge_precomp (Duif): (y+x,y-x,2dxy)
Is there a paper or a piece of code where I can see how this table is generated? I am not trying to learn more about elliptic curves, I simply want to precompute this myself because of the specifics of my project.
I guess I would have to add point B to itself for (j+1)*256^i mod p times for each i and j. Is there a less compute intensive way to do this on an e.g. Raspberry Pi?
Thanks in advance!