Lines Matching +full:480 +full:m
35 unsigned m; in mkrand() local
42 m = esize & 15; in mkrand()
43 if (m == 0) { in mkrand()
46 x[len] &= 0x7FFF >> (15 - m); in mkrand()
276 * Maximum values of m* at this point: in mkprime()
351 } else if (esize < 480) { in mkprime()
370 * Let p be a prime (p > 2^33, p = 3 mod 4). Let m = (p-1)/2, provided
380 invert_pubexp(uint16_t *d, const uint16_t *m, uint32_t e, uint16_t *t) in invert_pubexp() argument
386 t += 1 + ((m[0] + 15) >> 4); in invert_pubexp()
389 * Compute d = 1/e mod m. Since p = 3 mod 4, m is odd. in invert_pubexp()
391 br_i15_zero(d, m[0]); in invert_pubexp()
393 br_i15_zero(f, m[0]); in invert_pubexp()
397 r = br_i15_moddiv(d, f, m, br_i15_ninv15(m[1]), t); in invert_pubexp()
400 * We really want d = 1/e mod p-1, with p = 2m. By the CRT, in invert_pubexp()
401 * the result is either the d we got, or d + m. in invert_pubexp()
403 * Let's write e*d = 1 + k*m, for some integer k. Integers e in invert_pubexp()
404 * and m are odd. If d is odd, then e*d is odd, which implies in invert_pubexp()
405 * that k must be even; in that case, e*d = 1 + (k/2)*2m, and in invert_pubexp()
407 * is odd, and we must add m to d in order to get the correct in invert_pubexp()
410 br_i15_add(d, m, (uint32_t)(1 - (d[1] & 1))); in invert_pubexp()