Lines Matching refs:dctx
31 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
34 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
35 memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE); in ghash_init()
58 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
60 u8 *buf = dctx->buffer; in ghash_update()
63 if (dctx->bytes) { in ghash_update()
64 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
66 n = min(srclen, dctx->bytes); in ghash_update()
67 dctx->bytes -= n; in ghash_update()
73 if (!dctx->bytes) { in ghash_update()
74 ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, in ghash_update()
83 ret = crypt_s390_kimd(KIMD_GHASH, dctx, src, n); in ghash_update()
91 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
98 static int ghash_flush(struct ghash_desc_ctx *dctx) in ghash_flush() argument
100 u8 *buf = dctx->buffer; in ghash_flush()
103 if (dctx->bytes) { in ghash_flush()
104 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_flush()
106 memset(pos, 0, dctx->bytes); in ghash_flush()
108 ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, GHASH_BLOCK_SIZE); in ghash_flush()
112 dctx->bytes = 0; in ghash_flush()
120 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_final() local
123 ret = ghash_flush(dctx); in ghash_final()
125 memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE); in ghash_final()