Lines Matching refs:i

59 	int i;
61 for (i = 0; i < F25519_SIZE; i++)
62 dst[i] = zero[i] ^ (mask & (one[i] ^ zero[i]));
72 int i;
74 for (i = 0; i < F25519_SIZE; i++)
75 dst[i] = dst[i] ^ (mask & (src[i] ^ dst[i]));
87 int i;
89 for (i = 0; i < F25519_SIZE; i++) {
90 c += ((word16)x[i]) + ((word16)p[i]);
91 x[i] = (byte)c;
102 int i;
104 for (i = 0; i < F25519_SIZE; i++) {
105 c = ((word16)x[i]) - ((word16)p[i]) - c;
106 minusp[i] = (byte)c;
117 int i;
126 for (i = F25519_SIZE - 1; i >= 0; i--) {
127 shift &= ((shift ^ ((-p[i] | p[i]) >> 7)) & 1);
133 for (i = 0; i < 8; i++) {
134 shift &= ((-(x >> i) | (x >> i)) >> (7 - i) & 1);
164 int i,j;
168 for (i = prime_msb(modulus); i >= 0; i--) {
169 const byte bit = (b[i >> 3] >> (i & 7)) & 1;
190 int i;
192 for (i = 0; i < sizeof(c); i++) {
193 x[i] = c;
197 for (; i < F25519_SIZE; i++)
198 x[i] = 0;
204 int i; in fe_reduce() local
210 for (i = 0; i < F25519_SIZE; i++) { in fe_reduce()
211 c += x[i]; in fe_reduce()
212 x[i] = (byte)c; in fe_reduce()
221 int i; in fe_normalize() local
232 for (i = 0; i < F25519_SIZE - 1; i++) { in fe_normalize()
233 c += x[i]; in fe_normalize()
234 minusp[i] = (byte)c; in fe_normalize()
238 c += ((unsigned)x[i]) - 128; in fe_normalize()
248 int i; in lm_add() local
251 for (i = 0; i < F25519_SIZE; i++) { in lm_add()
253 c += ((unsigned)a[i]) + ((unsigned)b[i]); in lm_add()
254 r[i] = (byte)c; in lm_add()
264 int i; in lm_sub() local
268 for (i = 0; i < F25519_SIZE - 1; i++) { in lm_sub()
269 c += 65280 + ((word32)a[i]) - ((word32)b[i]); in lm_sub()
270 r[i] = c; in lm_sub()
283 int i;
287 for (i = 0; i < F25519_SIZE - 1; i++) {
288 c += 65280 - ((word32)a[i]);
289 r[i] = c;
302 int i; in fe_mul__distinct() local
304 for (i = 0; i < F25519_SIZE; i++) { in fe_mul__distinct()
308 for (j = 0; j <= i; j++) in fe_mul__distinct()
309 c += ((word32)a[j]) * ((word32)b[i - j]); in fe_mul__distinct()
313 ((word32)b[i + F25519_SIZE - j]) * 38; in fe_mul__distinct()
315 r[i] = c; in fe_mul__distinct()
334 int i; in fe_mul_c() local
336 for (i = 0; i < F25519_SIZE; i++) { in fe_mul_c()
338 c += b * ((word32)a[i]); in fe_mul_c()
339 r[i] = c; in fe_mul_c()
348 int i; in fe_inv__distinct() local
369 for (i = 0; i < 249; i++) { in fe_inv__distinct()
385 for (i = 0; i < 2; i++) { in fe_inv__distinct()
407 int i;
417 for (i = 0; i < 249; i++) {
435 byte i[F25519_SIZE];
445 fe_mul__distinct(i, x, y);
447 lm_sub(i, i, y);
451 fe_mul__distinct(r, x, i);
529 int i; in curve25519() local
570 for (i = 253; i >= 0; i--) { in curve25519()
571 const int bit = (e[i >> 3] >> (i & 7)) & 1; in curve25519()