Lines Matching defs:tmp
245 struct bignum *tmp, *a = NULL, *b = NULL;
252 tmp = bignum_init();
253 if (tmp == NULL)
256 if (bignum_set_unsigned_bin(tmp, in, inlen) < 0)
258 if (bignum_cmp(key->n, tmp) < 0) {
266 * up calculation. This is equivalent to tmp = tmp^d mod n
282 /* a = tmp^dmp1 mod p */
283 if (bignum_exptmod(tmp, key->dmp1, key->p, a) < 0)
286 /* b = tmp^dmq1 mod q */
287 if (bignum_exptmod(tmp, key->dmq1, key->q, b) < 0)
290 /* tmp = (a - b) * (1/q mod p) (mod p) */
291 if (bignum_sub(a, b, tmp) < 0 ||
292 bignum_mulmod(tmp, key->iqmp, key->p, tmp) < 0)
295 /* tmp = b + q * tmp */
296 if (bignum_mul(tmp, key->q, tmp) < 0 ||
297 bignum_add(tmp, b, tmp) < 0)
301 /* tmp = tmp^e mod N */
302 if (bignum_exptmod(tmp, key->e, key->n, tmp) < 0)
312 if (bignum_get_unsigned_bin_len(tmp) > modlen)
318 tmp, out +
319 (modlen - bignum_get_unsigned_bin_len(tmp)), NULL) < 0)
325 bignum_deinit(tmp);