Lines Matching defs:tmp
268 struct bignum *tmp, *a = NULL, *b = NULL;
275 tmp = bignum_init();
276 if (tmp == NULL)
279 if (bignum_set_unsigned_bin(tmp, in, inlen) < 0)
281 if (bignum_cmp(key->n, tmp) < 0) {
289 * up calculation. This is equivalent to tmp = tmp^d mod n
305 /* a = tmp^dmp1 mod p */
306 if (bignum_exptmod(tmp, key->dmp1, key->p, a) < 0)
309 /* b = tmp^dmq1 mod q */
310 if (bignum_exptmod(tmp, key->dmq1, key->q, b) < 0)
313 /* tmp = (a - b) * (1/q mod p) (mod p) */
314 if (bignum_sub(a, b, tmp) < 0 ||
315 bignum_mulmod(tmp, key->iqmp, key->p, tmp) < 0)
318 /* tmp = b + q * tmp */
319 if (bignum_mul(tmp, key->q, tmp) < 0 ||
320 bignum_add(tmp, b, tmp) < 0)
324 /* tmp = tmp^e mod N */
325 if (bignum_exptmod(tmp, key->e, key->n, tmp) < 0)
335 if (bignum_get_unsigned_bin_len(tmp) > modlen)
341 tmp, out +
342 (modlen - bignum_get_unsigned_bin_len(tmp)), NULL) < 0)
348 bignum_deinit(tmp);