115 const int32_t f0 = f[0];
116 const int32_t f1 = f[1];
117 const int32_t f2 = f[2];
118 const int32_t f3 = f[3];
119 const int32_t f4 = f[4];
120 const int32_t f5 = f[5];
121 const int32_t f6 = f[6];
122 const int32_t f7 = f[7];
123 const int32_t f8 = f[8];
124 const int32_t f9 = f[9];
126 const int32_t g0 = g[0];
127 const int32_t g1 = g[1];
128 const int32_t g2 = g[2];
129 const int32_t g3 = g[3];
130 const int32_t g4 = g[4];
131 const int32_t g5 = g[5];
132 const int32_t g6 = g[6];
133 const int32_t g7 = g[7];
134 const int32_t g8 = g[8];
135 const int32_t g9 = g[9];
137 const int32_t g1_19 = 19 * g1;
138 const int32_t g2_19 = 19 * g2;
139 const int32_t g3_19 = 19 * g3;
140 const int32_t g4_19 = 19 * g4;
141 const int32_t g5_19 = 19 * g5;
142 const int32_t g6_19 = 19 * g6;
143 const int32_t g7_19 = 19 * g7;
144 const int32_t g8_19 = 19 * g8;
145 const int32_t g9_19 = 19 * g9;
146 const int32_t f1_2 = 2 * f1;
147 const int32_t f3_2 = 2 * f3;
148 const int32_t f5_2 = 2 * f5;
149 const int32_t f7_2 = 2 * f7;
150 const int32_t f9_2 = 2 * f9;
152 const int64_t f0g0 = f0 *
static_cast<int64_t
>(g0);
153 const int64_t f0g1 = f0 *
static_cast<int64_t
>(g1);
154 const int64_t f0g2 = f0 *
static_cast<int64_t
>(g2);
155 const int64_t f0g3 = f0 *
static_cast<int64_t
>(g3);
156 const int64_t f0g4 = f0 *
static_cast<int64_t
>(g4);
157 const int64_t f0g5 = f0 *
static_cast<int64_t
>(g5);
158 const int64_t f0g6 = f0 *
static_cast<int64_t
>(g6);
159 const int64_t f0g7 = f0 *
static_cast<int64_t
>(g7);
160 const int64_t f0g8 = f0 *
static_cast<int64_t
>(g8);
161 const int64_t f0g9 = f0 *
static_cast<int64_t
>(g9);
162 const int64_t f1g0 = f1 *
static_cast<int64_t
>(g0);
163 const int64_t f1g1_2 = f1_2 *
static_cast<int64_t
>(g1);
164 const int64_t f1g2 = f1 *
static_cast<int64_t
>(g2);
165 const int64_t f1g3_2 = f1_2 *
static_cast<int64_t
>(g3);
166 const int64_t f1g4 = f1 *
static_cast<int64_t
>(g4);
167 const int64_t f1g5_2 = f1_2 *
static_cast<int64_t
>(g5);
168 const int64_t f1g6 = f1 *
static_cast<int64_t
>(g6);
169 const int64_t f1g7_2 = f1_2 *
static_cast<int64_t
>(g7);
170 const int64_t f1g8 = f1 *
static_cast<int64_t
>(g8);
171 const int64_t f1g9_38 = f1_2 *
static_cast<int64_t
>(g9_19);
172 const int64_t f2g0 = f2 *
static_cast<int64_t
>(g0);
173 const int64_t f2g1 = f2 *
static_cast<int64_t
>(g1);
174 const int64_t f2g2 = f2 *
static_cast<int64_t
>(g2);
175 const int64_t f2g3 = f2 *
static_cast<int64_t
>(g3);
176 const int64_t f2g4 = f2 *
static_cast<int64_t
>(g4);
177 const int64_t f2g5 = f2 *
static_cast<int64_t
>(g5);
178 const int64_t f2g6 = f2 *
static_cast<int64_t
>(g6);
179 const int64_t f2g7 = f2 *
static_cast<int64_t
>(g7);
180 const int64_t f2g8_19 = f2 *
static_cast<int64_t
>(g8_19);
181 const int64_t f2g9_19 = f2 *
static_cast<int64_t
>(g9_19);
182 const int64_t f3g0 = f3 *
static_cast<int64_t
>(g0);
183 const int64_t f3g1_2 = f3_2 *
static_cast<int64_t
>(g1);
184 const int64_t f3g2 = f3 *
static_cast<int64_t
>(g2);
185 const int64_t f3g3_2 = f3_2 *
static_cast<int64_t
>(g3);
186 const int64_t f3g4 = f3 *
static_cast<int64_t
>(g4);
187 const int64_t f3g5_2 = f3_2 *
static_cast<int64_t
>(g5);
188 const int64_t f3g6 = f3 *
static_cast<int64_t
>(g6);
189 const int64_t f3g7_38 = f3_2 *
static_cast<int64_t
>(g7_19);
190 const int64_t f3g8_19 = f3 *
static_cast<int64_t
>(g8_19);
191 const int64_t f3g9_38 = f3_2 *
static_cast<int64_t
>(g9_19);
192 const int64_t f4g0 = f4 *
static_cast<int64_t
>(g0);
193 const int64_t f4g1 = f4 *
static_cast<int64_t
>(g1);
194 const int64_t f4g2 = f4 *
static_cast<int64_t
>(g2);
195 const int64_t f4g3 = f4 *
static_cast<int64_t
>(g3);
196 const int64_t f4g4 = f4 *
static_cast<int64_t
>(g4);
197 const int64_t f4g5 = f4 *
static_cast<int64_t
>(g5);
198 const int64_t f4g6_19 = f4 *
static_cast<int64_t
>(g6_19);
199 const int64_t f4g7_19 = f4 *
static_cast<int64_t
>(g7_19);
200 const int64_t f4g8_19 = f4 *
static_cast<int64_t
>(g8_19);
201 const int64_t f4g9_19 = f4 *
static_cast<int64_t
>(g9_19);
202 const int64_t f5g0 = f5 *
static_cast<int64_t
>(g0);
203 const int64_t f5g1_2 = f5_2 *
static_cast<int64_t
>(g1);
204 const int64_t f5g2 = f5 *
static_cast<int64_t
>(g2);
205 const int64_t f5g3_2 = f5_2 *
static_cast<int64_t
>(g3);
206 const int64_t f5g4 = f5 *
static_cast<int64_t
>(g4);
207 const int64_t f5g5_38 = f5_2 *
static_cast<int64_t
>(g5_19);
208 const int64_t f5g6_19 = f5 *
static_cast<int64_t
>(g6_19);
209 const int64_t f5g7_38 = f5_2 *
static_cast<int64_t
>(g7_19);
210 const int64_t f5g8_19 = f5 *
static_cast<int64_t
>(g8_19);
211 const int64_t f5g9_38 = f5_2 *
static_cast<int64_t
>(g9_19);
212 const int64_t f6g0 = f6 *
static_cast<int64_t
>(g0);
213 const int64_t f6g1 = f6 *
static_cast<int64_t
>(g1);
214 const int64_t f6g2 = f6 *
static_cast<int64_t
>(g2);
215 const int64_t f6g3 = f6 *
static_cast<int64_t
>(g3);
216 const int64_t f6g4_19 = f6 *
static_cast<int64_t
>(g4_19);
217 const int64_t f6g5_19 = f6 *
static_cast<int64_t
>(g5_19);
218 const int64_t f6g6_19 = f6 *
static_cast<int64_t
>(g6_19);
219 const int64_t f6g7_19 = f6 *
static_cast<int64_t
>(g7_19);
220 const int64_t f6g8_19 = f6 *
static_cast<int64_t
>(g8_19);
221 const int64_t f6g9_19 = f6 *
static_cast<int64_t
>(g9_19);
222 const int64_t f7g0 = f7 *
static_cast<int64_t
>(g0);
223 const int64_t f7g1_2 = f7_2 *
static_cast<int64_t
>(g1);
224 const int64_t f7g2 = f7 *
static_cast<int64_t
>(g2);
225 const int64_t f7g3_38 = f7_2 *
static_cast<int64_t
>(g3_19);
226 const int64_t f7g4_19 = f7 *
static_cast<int64_t
>(g4_19);
227 const int64_t f7g5_38 = f7_2 *
static_cast<int64_t
>(g5_19);
228 const int64_t f7g6_19 = f7 *
static_cast<int64_t
>(g6_19);
229 const int64_t f7g7_38 = f7_2 *
static_cast<int64_t
>(g7_19);
230 const int64_t f7g8_19 = f7 *
static_cast<int64_t
>(g8_19);
231 const int64_t f7g9_38 = f7_2 *
static_cast<int64_t
>(g9_19);
232 const int64_t f8g0 = f8 *
static_cast<int64_t
>(g0);
233 const int64_t f8g1 = f8 *
static_cast<int64_t
>(g1);
234 const int64_t f8g2_19 = f8 *
static_cast<int64_t
>(g2_19);
235 const int64_t f8g3_19 = f8 *
static_cast<int64_t
>(g3_19);
236 const int64_t f8g4_19 = f8 *
static_cast<int64_t
>(g4_19);
237 const int64_t f8g5_19 = f8 *
static_cast<int64_t
>(g5_19);
238 const int64_t f8g6_19 = f8 *
static_cast<int64_t
>(g6_19);
239 const int64_t f8g7_19 = f8 *
static_cast<int64_t
>(g7_19);
240 const int64_t f8g8_19 = f8 *
static_cast<int64_t
>(g8_19);
241 const int64_t f8g9_19 = f8 *
static_cast<int64_t
>(g9_19);
242 const int64_t f9g0 = f9 *
static_cast<int64_t
>(g0);
243 const int64_t f9g1_38 = f9_2 *
static_cast<int64_t
>(g1_19);
244 const int64_t f9g2_19 = f9 *
static_cast<int64_t
>(g2_19);
245 const int64_t f9g3_38 = f9_2 *
static_cast<int64_t
>(g3_19);
246 const int64_t f9g4_19 = f9 *
static_cast<int64_t
>(g4_19);
247 const int64_t f9g5_38 = f9_2 *
static_cast<int64_t
>(g5_19);
248 const int64_t f9g6_19 = f9 *
static_cast<int64_t
>(g6_19);
249 const int64_t f9g7_38 = f9_2 *
static_cast<int64_t
>(g7_19);
250 const int64_t f9g8_19 = f9 *
static_cast<int64_t
>(g8_19);
251 const int64_t f9g9_38 = f9_2 *
static_cast<int64_t
>(g9_19);
253 int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
254 int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19;
255 int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38;
256 int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19;
257 int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38;
258 int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19;
259 int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38;
260 int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19;
261 int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38;
262 int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
316 return FE_25519(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9);
347 for(
size_t i = 0; i != iter; ++i) {
348 const int32_t f0_2 = 2 * f0;
349 const int32_t f1_2 = 2 * f1;
350 const int32_t f2_2 = 2 * f2;
351 const int32_t f3_2 = 2 * f3;
352 const int32_t f4_2 = 2 * f4;
353 const int32_t f5_2 = 2 * f5;
354 const int32_t f6_2 = 2 * f6;
355 const int32_t f7_2 = 2 * f7;
356 const int32_t f5_38 = 38 * f5;
357 const int32_t f6_19 = 19 * f6;
358 const int32_t f7_38 = 38 * f7;
359 const int32_t f8_19 = 19 * f8;
360 const int32_t f9_38 = 38 * f9;
362 const int64_t f0f0 = f0 *
static_cast<int64_t
>(f0);
363 const int64_t f0f1_2 = f0_2 *
static_cast<int64_t
>(f1);
364 const int64_t f0f2_2 = f0_2 *
static_cast<int64_t
>(f2);
365 const int64_t f0f3_2 = f0_2 *
static_cast<int64_t
>(f3);
366 const int64_t f0f4_2 = f0_2 *
static_cast<int64_t
>(f4);
367 const int64_t f0f5_2 = f0_2 *
static_cast<int64_t
>(f5);
368 const int64_t f0f6_2 = f0_2 *
static_cast<int64_t
>(f6);
369 const int64_t f0f7_2 = f0_2 *
static_cast<int64_t
>(f7);
370 const int64_t f0f8_2 = f0_2 *
static_cast<int64_t
>(f8);
371 const int64_t f0f9_2 = f0_2 *
static_cast<int64_t
>(f9);
372 const int64_t f1f1_2 = f1_2 *
static_cast<int64_t
>(f1);
373 const int64_t f1f2_2 = f1_2 *
static_cast<int64_t
>(f2);
374 const int64_t f1f3_4 = f1_2 *
static_cast<int64_t
>(f3_2);
375 const int64_t f1f4_2 = f1_2 *
static_cast<int64_t
>(f4);
376 const int64_t f1f5_4 = f1_2 *
static_cast<int64_t
>(f5_2);
377 const int64_t f1f6_2 = f1_2 *
static_cast<int64_t
>(f6);
378 const int64_t f1f7_4 = f1_2 *
static_cast<int64_t
>(f7_2);
379 const int64_t f1f8_2 = f1_2 *
static_cast<int64_t
>(f8);
380 const int64_t f1f9_76 = f1_2 *
static_cast<int64_t
>(f9_38);
381 const int64_t f2f2 = f2 *
static_cast<int64_t
>(f2);
382 const int64_t f2f3_2 = f2_2 *
static_cast<int64_t
>(f3);
383 const int64_t f2f4_2 = f2_2 *
static_cast<int64_t
>(f4);
384 const int64_t f2f5_2 = f2_2 *
static_cast<int64_t
>(f5);
385 const int64_t f2f6_2 = f2_2 *
static_cast<int64_t
>(f6);
386 const int64_t f2f7_2 = f2_2 *
static_cast<int64_t
>(f7);
387 const int64_t f2f8_38 = f2_2 *
static_cast<int64_t
>(f8_19);
388 const int64_t f2f9_38 = f2 *
static_cast<int64_t
>(f9_38);
389 const int64_t f3f3_2 = f3_2 *
static_cast<int64_t
>(f3);
390 const int64_t f3f4_2 = f3_2 *
static_cast<int64_t
>(f4);
391 const int64_t f3f5_4 = f3_2 *
static_cast<int64_t
>(f5_2);
392 const int64_t f3f6_2 = f3_2 *
static_cast<int64_t
>(f6);
393 const int64_t f3f7_76 = f3_2 *
static_cast<int64_t
>(f7_38);
394 const int64_t f3f8_38 = f3_2 *
static_cast<int64_t
>(f8_19);
395 const int64_t f3f9_76 = f3_2 *
static_cast<int64_t
>(f9_38);
396 const int64_t f4f4 = f4 *
static_cast<int64_t
>(f4);
397 const int64_t f4f5_2 = f4_2 *
static_cast<int64_t
>(f5);
398 const int64_t f4f6_38 = f4_2 *
static_cast<int64_t
>(f6_19);
399 const int64_t f4f7_38 = f4 *
static_cast<int64_t
>(f7_38);
400 const int64_t f4f8_38 = f4_2 *
static_cast<int64_t
>(f8_19);
401 const int64_t f4f9_38 = f4 *
static_cast<int64_t
>(f9_38);
402 const int64_t f5f5_38 = f5 *
static_cast<int64_t
>(f5_38);
403 const int64_t f5f6_38 = f5_2 *
static_cast<int64_t
>(f6_19);
404 const int64_t f5f7_76 = f5_2 *
static_cast<int64_t
>(f7_38);
405 const int64_t f5f8_38 = f5_2 *
static_cast<int64_t
>(f8_19);
406 const int64_t f5f9_76 = f5_2 *
static_cast<int64_t
>(f9_38);
407 const int64_t f6f6_19 = f6 *
static_cast<int64_t
>(f6_19);
408 const int64_t f6f7_38 = f6 *
static_cast<int64_t
>(f7_38);
409 const int64_t f6f8_38 = f6_2 *
static_cast<int64_t
>(f8_19);
410 const int64_t f6f9_38 = f6 *
static_cast<int64_t
>(f9_38);
411 const int64_t f7f7_38 = f7 *
static_cast<int64_t
>(f7_38);
412 const int64_t f7f8_38 = f7_2 *
static_cast<int64_t
>(f8_19);
413 const int64_t f7f9_76 = f7_2 *
static_cast<int64_t
>(f9_38);
414 const int64_t f8f8_19 = f8 *
static_cast<int64_t
>(f8_19);
415 const int64_t f8f9_38 = f8 *
static_cast<int64_t
>(f9_38);
416 const int64_t f9f9_38 = f9 *
static_cast<int64_t
>(f9_38);
418 int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
419 int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
420 int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
421 int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
422 int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
423 int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
424 int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
425 int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
426 int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
427 int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
444 f0 =
static_cast<int32_t
>(h0);
445 f1 =
static_cast<int32_t
>(h1);
446 f2 =
static_cast<int32_t
>(h2);
447 f3 =
static_cast<int32_t
>(h3);
448 f4 =
static_cast<int32_t
>(h4);
449 f5 =
static_cast<int32_t
>(h5);
450 f6 =
static_cast<int32_t
>(h6);
451 f7 =
static_cast<int32_t
>(h7);
452 f8 =
static_cast<int32_t
>(h8);
453 f9 =
static_cast<int32_t
>(h9);
456 return FE_25519(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
476 const int32_t f0 = f[0];
477 const int32_t f1 = f[1];
478 const int32_t f2 = f[2];
479 const int32_t f3 = f[3];
480 const int32_t f4 = f[4];
481 const int32_t f5 = f[5];
482 const int32_t f6 = f[6];
483 const int32_t f7 = f[7];
484 const int32_t f8 = f[8];
485 const int32_t f9 = f[9];
486 const int32_t f0_2 = 2 * f0;
487 const int32_t f1_2 = 2 * f1;
488 const int32_t f2_2 = 2 * f2;
489 const int32_t f3_2 = 2 * f3;
490 const int32_t f4_2 = 2 * f4;
491 const int32_t f5_2 = 2 * f5;
492 const int32_t f6_2 = 2 * f6;
493 const int32_t f7_2 = 2 * f7;
494 const int32_t f5_38 = 38 * f5;
495 const int32_t f6_19 = 19 * f6;
496 const int32_t f7_38 = 38 * f7;
497 const int32_t f8_19 = 19 * f8;
498 const int32_t f9_38 = 38 * f9;
499 const int64_t f0f0 = f0 *
static_cast<int64_t
>(f0);
500 const int64_t f0f1_2 = f0_2 *
static_cast<int64_t
>(f1);
501 const int64_t f0f2_2 = f0_2 *
static_cast<int64_t
>(f2);
502 const int64_t f0f3_2 = f0_2 *
static_cast<int64_t
>(f3);
503 const int64_t f0f4_2 = f0_2 *
static_cast<int64_t
>(f4);
504 const int64_t f0f5_2 = f0_2 *
static_cast<int64_t
>(f5);
505 const int64_t f0f6_2 = f0_2 *
static_cast<int64_t
>(f6);
506 const int64_t f0f7_2 = f0_2 *
static_cast<int64_t
>(f7);
507 const int64_t f0f8_2 = f0_2 *
static_cast<int64_t
>(f8);
508 const int64_t f0f9_2 = f0_2 *
static_cast<int64_t
>(f9);
509 const int64_t f1f1_2 = f1_2 *
static_cast<int64_t
>(f1);
510 const int64_t f1f2_2 = f1_2 *
static_cast<int64_t
>(f2);
511 const int64_t f1f3_4 = f1_2 *
static_cast<int64_t
>(f3_2);
512 const int64_t f1f4_2 = f1_2 *
static_cast<int64_t
>(f4);
513 const int64_t f1f5_4 = f1_2 *
static_cast<int64_t
>(f5_2);
514 const int64_t f1f6_2 = f1_2 *
static_cast<int64_t
>(f6);
515 const int64_t f1f7_4 = f1_2 *
static_cast<int64_t
>(f7_2);
516 const int64_t f1f8_2 = f1_2 *
static_cast<int64_t
>(f8);
517 const int64_t f1f9_76 = f1_2 *
static_cast<int64_t
>(f9_38);
518 const int64_t f2f2 = f2 *
static_cast<int64_t
>(f2);
519 const int64_t f2f3_2 = f2_2 *
static_cast<int64_t
>(f3);
520 const int64_t f2f4_2 = f2_2 *
static_cast<int64_t
>(f4);
521 const int64_t f2f5_2 = f2_2 *
static_cast<int64_t
>(f5);
522 const int64_t f2f6_2 = f2_2 *
static_cast<int64_t
>(f6);
523 const int64_t f2f7_2 = f2_2 *
static_cast<int64_t
>(f7);
524 const int64_t f2f8_38 = f2_2 *
static_cast<int64_t
>(f8_19);
525 const int64_t f2f9_38 = f2 *
static_cast<int64_t
>(f9_38);
526 const int64_t f3f3_2 = f3_2 *
static_cast<int64_t
>(f3);
527 const int64_t f3f4_2 = f3_2 *
static_cast<int64_t
>(f4);
528 const int64_t f3f5_4 = f3_2 *
static_cast<int64_t
>(f5_2);
529 const int64_t f3f6_2 = f3_2 *
static_cast<int64_t
>(f6);
530 const int64_t f3f7_76 = f3_2 *
static_cast<int64_t
>(f7_38);
531 const int64_t f3f8_38 = f3_2 *
static_cast<int64_t
>(f8_19);
532 const int64_t f3f9_76 = f3_2 *
static_cast<int64_t
>(f9_38);
533 const int64_t f4f4 = f4 *
static_cast<int64_t
>(f4);
534 const int64_t f4f5_2 = f4_2 *
static_cast<int64_t
>(f5);
535 const int64_t f4f6_38 = f4_2 *
static_cast<int64_t
>(f6_19);
536 const int64_t f4f7_38 = f4 *
static_cast<int64_t
>(f7_38);
537 const int64_t f4f8_38 = f4_2 *
static_cast<int64_t
>(f8_19);
538 const int64_t f4f9_38 = f4 *
static_cast<int64_t
>(f9_38);
539 const int64_t f5f5_38 = f5 *
static_cast<int64_t
>(f5_38);
540 const int64_t f5f6_38 = f5_2 *
static_cast<int64_t
>(f6_19);
541 const int64_t f5f7_76 = f5_2 *
static_cast<int64_t
>(f7_38);
542 const int64_t f5f8_38 = f5_2 *
static_cast<int64_t
>(f8_19);
543 const int64_t f5f9_76 = f5_2 *
static_cast<int64_t
>(f9_38);
544 const int64_t f6f6_19 = f6 *
static_cast<int64_t
>(f6_19);
545 const int64_t f6f7_38 = f6 *
static_cast<int64_t
>(f7_38);
546 const int64_t f6f8_38 = f6_2 *
static_cast<int64_t
>(f8_19);
547 const int64_t f6f9_38 = f6 *
static_cast<int64_t
>(f9_38);
548 const int64_t f7f7_38 = f7 *
static_cast<int64_t
>(f7_38);
549 const int64_t f7f8_38 = f7_2 *
static_cast<int64_t
>(f8_19);
550 const int64_t f7f9_76 = f7_2 *
static_cast<int64_t
>(f9_38);
551 const int64_t f8f8_19 = f8 *
static_cast<int64_t
>(f8_19);
552 const int64_t f8f9_38 = f8 *
static_cast<int64_t
>(f9_38);
553 const int64_t f9f9_38 = f9 *
static_cast<int64_t
>(f9_38);
555 int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
556 int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
557 int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
558 int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
559 int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
560 int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
561 int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
562 int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
563 int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
564 int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
593 return FE_25519(h0, h1, h2, h3, h4, h5, h6, h7, h8, h9);
662 const int64_t X25 = (1 << 25);
664 int32_t h0 = m_fe[0];
665 int32_t h1 = m_fe[1];
666 int32_t h2 = m_fe[2];
667 int32_t h3 = m_fe[3];
668 int32_t h4 = m_fe[4];
669 int32_t h5 = m_fe[5];
670 int32_t h6 = m_fe[6];
671 int32_t h7 = m_fe[7];
672 int32_t h8 = m_fe[8];
673 int32_t h9 = m_fe[9];
676 q = (19 * h9 + ((
static_cast<int32_t
>(1) << 24))) >> 25;
702 int32_t carry9 = h9 >> 25;
713 s[0] =
static_cast<uint8_t
>(h0 >> 0);
714 s[1] =
static_cast<uint8_t
>(h0 >> 8);
715 s[2] =
static_cast<uint8_t
>(h0 >> 16);
716 s[3] =
static_cast<uint8_t
>((h0 >> 24) | (h1 << 2));
717 s[4] =
static_cast<uint8_t
>(h1 >> 6);
718 s[5] =
static_cast<uint8_t
>(h1 >> 14);
719 s[6] =
static_cast<uint8_t
>((h1 >> 22) | (h2 << 3));
720 s[7] =
static_cast<uint8_t
>(h2 >> 5);
721 s[8] =
static_cast<uint8_t
>(h2 >> 13);
722 s[9] =
static_cast<uint8_t
>((h2 >> 21) | (h3 << 5));
723 s[10] =
static_cast<uint8_t
>(h3 >> 3);
724 s[11] =
static_cast<uint8_t
>(h3 >> 11);
725 s[12] =
static_cast<uint8_t
>((h3 >> 19) | (h4 << 6));
726 s[13] =
static_cast<uint8_t
>(h4 >> 2);
727 s[14] =
static_cast<uint8_t
>(h4 >> 10);
728 s[15] =
static_cast<uint8_t
>(h4 >> 18);
729 s[16] =
static_cast<uint8_t
>(h5 >> 0);
730 s[17] =
static_cast<uint8_t
>(h5 >> 8);
731 s[18] =
static_cast<uint8_t
>(h5 >> 16);
732 s[19] =
static_cast<uint8_t
>((h5 >> 24) | (h6 << 1));
733 s[20] =
static_cast<uint8_t
>(h6 >> 7);
734 s[21] =
static_cast<uint8_t
>(h6 >> 15);
735 s[22] =
static_cast<uint8_t
>((h6 >> 23) | (h7 << 3));
736 s[23] =
static_cast<uint8_t
>(h7 >> 5);
737 s[24] =
static_cast<uint8_t
>(h7 >> 13);
738 s[25] =
static_cast<uint8_t
>((h7 >> 21) | (h8 << 4));
739 s[26] =
static_cast<uint8_t
>(h8 >> 4);
740 s[27] =
static_cast<uint8_t
>(h8 >> 12);
741 s[28] =
static_cast<uint8_t
>((h8 >> 20) | (h9 << 6));
742 s[29] =
static_cast<uint8_t
>(h9 >> 2);
743 s[30] =
static_cast<uint8_t
>(h9 >> 10);
744 s[31] =
static_cast<uint8_t
>(h9 >> 18);