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) {
1492 struct tls_decrypt_ctx *dctx;
1528 aead_size = ALIGN(aead_size, __alignof__(*dctx));
1529 mem = kmalloc(aead_size + struct_size(dctx, sg, size_add(n_sgin, n_sgout)),
1538 dctx = (struct tls_decrypt_ctx *)(mem + aead_size);
1539 dctx->sk = sk;
1540 sgin = &dctx->sg[0];
1541 sgout = &dctx->sg[n_sgin];
1546 dctx->iv[0] = TLS_AES_CCM_IV_B0_BYTE;
1550 dctx->iv[0] = TLS_SM4_CCM_IV_B0_BYTE;
1558 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv,
1562 &dctx->iv[iv_offset] + prot->salt_size,
1566 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv, prot->salt_size);
1568 tls_xor_iv_with_seq(prot, &dctx->iv[iv_offset], tls_ctx->rx.rec_seq);
1571 tls_make_aad(dctx->aad, rxm->full_len - prot->overhead_size +
1577 sg_set_buf(&sgin[0], dctx->aad, prot->aad_size);
1586 sg_set_buf(&sgout[0], dctx->aad, prot->aad_size);
1594 sg_set_buf(&sgout[0], dctx->aad, prot->aad_size);
1603 sg_set_buf(&sgout[pages + 1], &dctx->tail,
1610 dctx->free_sgout = !!pages;
1613 err = tls_do_decryption(sk, sgin, sgout, dctx->iv,
1635 darg->tail = dctx->tail;