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()
59 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
61 u8 *buf = dctx->buffer; in ghash_update()
64 if (dctx->bytes) { in ghash_update()
65 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
67 n = min(srclen, dctx->bytes); in ghash_update()
68 dctx->bytes -= n; in ghash_update()
74 if (!dctx->bytes) { in ghash_update()
75 ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, in ghash_update()
84 ret = crypt_s390_kimd(KIMD_GHASH, dctx, src, n); in ghash_update()
92 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
99 static int ghash_flush(struct ghash_desc_ctx *dctx) in ghash_flush() argument
101 u8 *buf = dctx->buffer; in ghash_flush()
104 if (dctx->bytes) { in ghash_flush()
105 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_flush()
107 memset(pos, 0, dctx->bytes); in ghash_flush()
109 ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, GHASH_BLOCK_SIZE); in ghash_flush()
113 dctx->bytes = 0; in ghash_flush()
121 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_final() local
124 ret = ghash_flush(dctx); in ghash_final()
126 memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE); in ghash_final()