Lines Matching defs:dctx
193 struct tls_decrypt_ctx *dctx;
212 aead_size = ALIGN(aead_size, __alignof__(*dctx));
213 dctx = (void *)((u8 *)aead_req + aead_size);
215 sk = dctx->sk;
228 if (dctx->free_sgout) {
1477 struct tls_decrypt_ctx *dctx;
1513 aead_size = ALIGN(aead_size, __alignof__(*dctx));
1514 mem = kmalloc(aead_size + struct_size(dctx, sg, size_add(n_sgin, n_sgout)),
1523 dctx = (struct tls_decrypt_ctx *)(mem + aead_size);
1524 dctx->sk = sk;
1525 sgin = &dctx->sg[0];
1526 sgout = &dctx->sg[n_sgin];
1531 dctx->iv[0] = TLS_AES_CCM_IV_B0_BYTE;
1535 dctx->iv[0] = TLS_SM4_CCM_IV_B0_BYTE;
1543 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv,
1547 &dctx->iv[iv_offset] + prot->salt_size,
1551 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv, prot->salt_size);
1553 tls_xor_iv_with_seq(prot, &dctx->iv[iv_offset], tls_ctx->rx.rec_seq);
1556 tls_make_aad(dctx->aad, rxm->full_len - prot->overhead_size +
1562 sg_set_buf(&sgin[0], dctx->aad, prot->aad_size);
1571 sg_set_buf(&sgout[0], dctx->aad, prot->aad_size);
1579 sg_set_buf(&sgout[0], dctx->aad, prot->aad_size);
1588 sg_set_buf(&sgout[pages + 1], &dctx->tail,
1595 dctx->free_sgout = !!pages;
1598 err = tls_do_decryption(sk, sgin, sgout, dctx->iv,
1620 darg->tail = dctx->tail;