Lines Matching refs:ctx
41 struct ghash_desc_ctx *ctx = shash_desc_ctx(desc); in ghash_init() local
43 *ctx = (struct ghash_desc_ctx){}; in ghash_init()
50 struct ghash_desc_ctx *ctx = shash_desc_ctx(desc); in ghash_update() local
51 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_update()
53 ctx->count += len; in ghash_update()
62 memcpy(ctx->buf + partial, src, p); in ghash_update()
71 pmull_ghash_update(blocks, ctx->digest, src, key, in ghash_update()
72 partial ? ctx->buf : NULL); in ghash_update()
78 memcpy(ctx->buf + partial, src, len); in ghash_update()
84 struct ghash_desc_ctx *ctx = shash_desc_ctx(desc); in ghash_final() local
85 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_final()
90 memset(ctx->buf + partial, 0, GHASH_BLOCK_SIZE - partial); in ghash_final()
93 pmull_ghash_update(1, ctx->digest, ctx->buf, key, NULL); in ghash_final()
96 put_unaligned_be64(ctx->digest[1], dst); in ghash_final()
97 put_unaligned_be64(ctx->digest[0], dst + 8); in ghash_final()
99 *ctx = (struct ghash_desc_ctx){}; in ghash_final()