Lines Matching refs:cipher
78 static int cryptodev_max_iv(int cipher);
79 static int cryptodev_key_length_valid(int cipher, int len);
90 static int cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
210 cryptodev_max_iv(int cipher)
215 if (ciphers[i].id == cipher)
227 cryptodev_key_length_valid(int cipher, int len)
232 if (ciphers[i].id == cipher)
272 sess.cipher = ciphers[i].id;
310 sess.cipher = 0;
384 if ((inl % ctx->cipher->block_size) != 0)
398 if (ctx->cipher->iv_len) {
401 iiv = (void *) in + inl - ctx->cipher->iv_len;
402 memcpy(save_iv, iiv, ctx->cipher->iv_len);
414 if (ctx->cipher->iv_len) {
416 iiv = (void *) out + inl - ctx->cipher->iv_len;
419 memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
430 int cipher;
432 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef)
435 if (ctx->cipher->iv_len > cryptodev_max_iv(cipher))
438 if (!cryptodev_key_length_valid(cipher, ctx->key_len))
448 sess->cipher = cipher;
496 * gets called when libcrypto requests a cipher NID.
572 cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
575 if (!cipher)
580 *cipher = &cryptodev_3des_cbc;
583 *cipher = &cryptodev_des_cbc;
586 *cipher = &cryptodev_bf_cbc;
589 *cipher = &cryptodev_cast_cbc;
592 *cipher = &cryptodev_aes_cbc;
595 *cipher = NULL;
598 return (*cipher != NULL);