Lines Matching refs:cipher
291 /* Symmetric cipher and digest support functions */
301 static int pk11_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
326 PK11_CIPHER *cipher);
432 * called when libcrypto requests a cipher NID.
1108 * count how many ciphers and digests to support. Since the cipher and
1133 * if an application forgets to clear one cipher context. In case of a
2251 if (ctx->cipher->nid == NID_aes_128_ctr ||
2252 ctx->cipher->nid == NID_aes_192_ctr ||
2253 ctx->cipher->nid == NID_aes_256_ctr)
2310 index = cipher_nid_to_pk11(ctx->cipher->nid);
2316 * iv_len in the ctx->cipher structure is the maximum IV length for the
2317 * current cipher and it must be less or equal to the IV length in our
2319 * all cipher modes that the PKCS#11 engine supports only RC4 allows a
2324 * Note that the reason why the IV length in ctx->cipher might be
2329 if (ctx->cipher->iv_len < p_ciph_table_row->iv_len ||
2457 /* RC4 is the only stream cipher we support */
2458 if (ctx->cipher->nid != NID_rc4 && (inl % ctx->cipher->block_size) != 0)
2551 pk11_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
2554 if (!cipher)
2560 *cipher = &pk11_3des_cbc;
2563 *cipher = &pk11_des_cbc;
2566 *cipher = &pk11_3des_ecb;
2569 *cipher = &pk11_des_ecb;
2572 *cipher = &pk11_aes_128_cbc;
2575 *cipher = &pk11_aes_192_cbc;
2578 *cipher = &pk11_aes_256_cbc;
2581 *cipher = &pk11_aes_128_ecb;
2584 *cipher = &pk11_aes_192_ecb;
2587 *cipher = &pk11_aes_256_ecb;
2590 *cipher = &pk11_aes_128_ctr;
2593 *cipher = &pk11_aes_192_ctr;
2596 *cipher = &pk11_aes_256_ctr;
2599 *cipher = &pk11_bf_cbc;
2602 *cipher = &pk11_rc4;
2605 *cipher = NULL;
2608 return (*cipher != NULL);
3224 DEBUG_SLOT_SEL("%s: == checking cipher/digest ==\n", PK11_DBG);
3247 DEBUG_SLOT_SEL("%s: best cipher/digest slot so far: %d\n",
3272 DEBUG_SLOT_SEL("%s: chosen cipher/digest slot: %d\n", PK11_DBG, SLOTID);
3295 PK11_CIPHER *cipher)
3300 DEBUG_SLOT_SEL("%s: checking mech: %x", PK11_DBG, cipher->mech_type);
3301 rv = pflist->C_GetMechanismInfo(slot_id, cipher->mech_type, &mech_info);
3312 if (mech_info.ulMinKeySize > cipher->min_key_len ||
3313 mech_info.ulMaxKeySize < cipher->max_key_len)
3317 cipher->min_key_len, cipher->max_key_len,
3322 if (nid_in_table(cipher->nid, hw_cnids))
3327 cipher->nid;