Lines Matching defs:cipher
82 static int cryptodev_max_iv(int cipher);
83 static int cryptodev_key_length_valid(int cipher, int len);
94 static int cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
216 cryptodev_max_iv(int cipher)
221 if (ciphers[i].id == cipher)
233 cryptodev_key_length_valid(int cipher, int len)
238 if (ciphers[i].id == cipher)
278 sess.cipher = ciphers[i].id;
317 sess.cipher = 0;
393 if ((inl % ctx->cipher->block_size) != 0)
407 if (ctx->cipher->iv_len) {
410 iiv = in + inl - ctx->cipher->iv_len;
411 memcpy(save_iv, iiv, ctx->cipher->iv_len);
423 if (ctx->cipher->iv_len) {
425 iiv = out + inl - ctx->cipher->iv_len;
428 memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
439 int cipher;
441 if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef)
444 if (ctx->cipher->iv_len > cryptodev_max_iv(cipher))
447 if (!cryptodev_key_length_valid(cipher, ctx->key_len))
457 sess->cipher = cipher;
505 * gets called when libcrypto requests a cipher NID.
581 cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
584 if (!cipher)
589 *cipher = &cryptodev_3des_cbc;
592 *cipher = &cryptodev_des_cbc;
595 *cipher = &cryptodev_bf_cbc;
598 *cipher = &cryptodev_cast_cbc;
601 *cipher = &cryptodev_aes_cbc;
604 *cipher = NULL;
607 return (*cipher != NULL);