Lines Matching refs:key
27 @param key The RSA key to use
32 rsa_key *key)
41 LTC_ARGCHK(key != NULL);
43 /* is the key of the right type for the operation? */
44 if (which == PK_PRIVATE && (key->type != PK_PRIVATE)) {
58 if (mp_cmp(key->N, tmp) == LTC_MP_LT) {
63 /* are we using the private exponent and is the key optimized? */
66 if ((err = mp_exptmod(tmp, key->dP, key->p, tmpa)) != CRYPT_OK) { goto error; }
69 if ((err = mp_exptmod(tmp, key->dQ, key->q, tmpb)) != CRYPT_OK) { goto error; }
73 if ((err = mp_mulmod(tmp, key->qP, key->p, tmp)) != CRYPT_OK) { goto error; }
76 if ((err = mp_mul(tmp, key->q, tmp)) != CRYPT_OK) { goto error; }
80 if ((err = mp_exptmod(tmp, key->e, key->N, tmp)) != CRYPT_OK) { goto error; }
84 x = (unsigned long)mp_unsigned_bin_size(key->N);
92 if (mp_unsigned_bin_size(tmp) > mp_unsigned_bin_size(key->N)) {