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