Lines Matching defs:cctx
392 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
397 aesni_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks);
398 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
399 &cctx->ks, (block128_f)aesni_encrypt);
400 cctx->str = enc?(ccm128_f)aesni_ccm64_encrypt_blocks :
402 cctx->key_set = 1;
406 memcpy(ctx->iv, iv, 15 - cctx->L);
407 cctx->iv_set = 1;
1157 EVP_AES_CCM_CTX *cctx = c->cipher_data;
1161 cctx->key_set = 0;
1162 cctx->iv_set = 0;
1163 cctx->L = 8;
1164 cctx->M = 12;
1165 cctx->tag_set = 0;
1166 cctx->len_set = 0;
1174 cctx->L = arg;
1184 cctx->tag_set = 1;
1187 cctx->M = arg;
1191 if (!c->encrypt || !cctx->tag_set)
1193 if(!CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg))
1195 cctx->tag_set = 0;
1196 cctx->iv_set = 0;
1197 cctx->len_set = 0;
1209 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
1217 vpaes_set_encrypt_key(key, ctx->key_len*8, &cctx->ks);
1218 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
1219 &cctx->ks, (block128_f)vpaes_encrypt);
1220 cctx->str = NULL;
1221 cctx->key_set = 1;
1225 AES_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks);
1226 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,
1227 &cctx->ks, (block128_f)AES_encrypt);
1228 cctx->str = NULL;
1229 cctx->key_set = 1;
1233 memcpy(ctx->iv, iv, 15 - cctx->L);
1234 cctx->iv_set = 1;
1242 EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
1243 CCM128_CONTEXT *ccm = &cctx->ccm;
1245 if (!cctx->iv_set && !cctx->key_set)
1247 if (!ctx->encrypt && !cctx->tag_set)
1253 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L,len))
1255 cctx->len_set = 1;
1259 if (!cctx->len_set && len)
1268 if (!cctx->len_set)
1270 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1272 cctx->len_set = 1;
1276 if (cctx->str ? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len,
1277 cctx->str) :
1280 cctx->tag_set = 1;
1286 if (cctx->str ? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
1287 cctx->str) :
1291 if (CRYPTO_ccm128_tag(ccm, tag, cctx->M))
1293 if (!memcmp(tag, ctx->buf, cctx->M))
1299 cctx->iv_set = 0;
1300 cctx->tag_set = 0;
1301 cctx->len_set = 0;