STDA045 November 2026 MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0G3518 , MSPM0G3519
Before multiplication starts, Curve25519: New Diffie-Hellman Speed Records computes several helper values:
g1_19 = 19 * g1;
g2_19 = 19 * g2;
...
g9_19 = 19 * g9;
f1_2 = 2 * f1;
f3_2 = 2 * f3;
...
f9_2 = 2 * f9;
The output coefficients are accumulated into ten 64-bit variables (the following shows the calculation result of h[0]):
int64_t h0;
h0 = f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 +f6*g4_19+f7_2*g3_19+f8*g2_19+f9_2*g1_19;