Lines Matching refs:dctx

48 	struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc);  in p8_ghash_init()  local
50 dctx->bytes = 0; in p8_ghash_init()
51 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init()
77 struct p8_ghash_desc_ctx *dctx) in __ghash_block() argument
83 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_block()
84 dctx->buffer, GHASH_DIGEST_SIZE); in __ghash_block()
89 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block()
90 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_block()
95 struct p8_ghash_desc_ctx *dctx, in __ghash_blocks() argument
102 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_blocks()
109 crypto_xor((u8 *)dctx->shash, src, GHASH_BLOCK_SIZE); in __ghash_blocks()
110 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_blocks()
122 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_update() local
124 if (dctx->bytes) { in p8_ghash_update()
125 if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { in p8_ghash_update()
126 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
128 dctx->bytes += srclen; in p8_ghash_update()
131 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
132 GHASH_DIGEST_SIZE - dctx->bytes); in p8_ghash_update()
134 __ghash_block(ctx, dctx); in p8_ghash_update()
136 src += GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
137 srclen -= GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
138 dctx->bytes = 0; in p8_ghash_update()
142 __ghash_blocks(ctx, dctx, src, len); in p8_ghash_update()
147 memcpy(dctx->buffer, src, srclen); in p8_ghash_update()
148 dctx->bytes = srclen; in p8_ghash_update()
157 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_final() local
159 if (dctx->bytes) { in p8_ghash_final()
160 for (i = dctx->bytes; i < GHASH_DIGEST_SIZE; i++) in p8_ghash_final()
161 dctx->buffer[i] = 0; in p8_ghash_final()
162 __ghash_block(ctx, dctx); in p8_ghash_final()
163 dctx->bytes = 0; in p8_ghash_final()
165 memcpy(out, dctx->shash, GHASH_DIGEST_SIZE); in p8_ghash_final()