Lines Matching defs:evp
92 EVP_CIPHER_CTX *evp;
94 struct aesctr_ctx ac_ctx; /* XXX union with evp? */
320 if ((cc->evp = EVP_CIPHER_CTX_new()) == NULL) {
324 if (EVP_CipherInit(cc->evp, type, NULL, (const u_char *)iv,
330 !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_IV_FIXED,
335 klen = EVP_CIPHER_CTX_key_length(cc->evp);
337 if (EVP_CIPHER_CTX_set_key_length(cc->evp, keylen) == 0) {
344 if (EVP_CipherInit_ex(cc->evp, NULL, NULL, __UNCONST(key), NULL, -1) == 0) {
357 EVP_CIPHER_CTX_free(cc->evp);
403 if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
408 !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_TAG,
414 EVP_Cipher(cc->evp, NULL, (const u_char *)src, aadlen) < 0)
420 if (EVP_Cipher(cc->evp, dest + aadlen, (const u_char *)src + aadlen,
425 if (EVP_Cipher(cc->evp, NULL, NULL, 0) < 0)
429 !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_GET_TAG,
462 EVP_CIPHER_CTX_free(cc->evp);
463 cc->evp = NULL;
491 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
499 if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN, len, iv))
501 } else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len))
521 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
528 if (!EVP_CIPHER_CTX_ctrl(cc->evp,
532 memcpy(EVP_CIPHER_CTX_iv_noconst(cc->evp), iv, evplen);