Lines Matching refs:dctx
32 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
35 memset(dctx, 0, sizeof(*dctx));
36 memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE);
57 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
59 u8 *buf = dctx->buffer;
61 if (dctx->bytes) {
62 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes);
64 n = min(srclen, dctx->bytes);
65 dctx->bytes -= n;
71 if (!dctx->bytes) {
72 cpacf_kimd(CPACF_KIMD_GHASH, dctx, buf,
79 cpacf_kimd(CPACF_KIMD_GHASH, dctx, src, n);
85 dctx->bytes = GHASH_BLOCK_SIZE - srclen;
92 static int ghash_flush(struct ghash_desc_ctx *dctx)
94 u8 *buf = dctx->buffer;
96 if (dctx->bytes) {
97 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes);
99 memset(pos, 0, dctx->bytes);
100 cpacf_kimd(CPACF_KIMD_GHASH, dctx, buf, GHASH_BLOCK_SIZE);
101 dctx->bytes = 0;
109 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
112 ret = ghash_flush(dctx);
114 memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE);