• Home
  • Raw
  • Download

Lines Matching refs:dctx

47 	struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc);  in p8_ghash_init()  local
49 dctx->bytes = 0; in p8_ghash_init()
50 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init()
76 struct p8_ghash_desc_ctx *dctx) in __ghash_block() argument
82 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_block()
83 dctx->buffer, GHASH_DIGEST_SIZE); in __ghash_block()
88 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block()
89 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_block()
94 struct p8_ghash_desc_ctx *dctx, in __ghash_blocks() argument
101 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_blocks()
108 crypto_xor((u8 *)dctx->shash, src, GHASH_BLOCK_SIZE); in __ghash_blocks()
109 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_blocks()
121 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_update() local
123 if (dctx->bytes) { in p8_ghash_update()
124 if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { in p8_ghash_update()
125 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
127 dctx->bytes += srclen; in p8_ghash_update()
130 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
131 GHASH_DIGEST_SIZE - dctx->bytes); in p8_ghash_update()
133 __ghash_block(ctx, dctx); in p8_ghash_update()
135 src += GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
136 srclen -= GHASH_DIGEST_SIZE - dctx->bytes; in p8_ghash_update()
137 dctx->bytes = 0; in p8_ghash_update()
141 __ghash_blocks(ctx, dctx, src, len); in p8_ghash_update()
146 memcpy(dctx->buffer, src, srclen); in p8_ghash_update()
147 dctx->bytes = srclen; in p8_ghash_update()
156 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_final() local
158 if (dctx->bytes) { in p8_ghash_final()
159 for (i = dctx->bytes; i < GHASH_DIGEST_SIZE; i++) in p8_ghash_final()
160 dctx->buffer[i] = 0; in p8_ghash_final()
161 __ghash_block(ctx, dctx); in p8_ghash_final()
162 dctx->bytes = 0; in p8_ghash_final()
164 memcpy(out, dctx->shash, GHASH_DIGEST_SIZE); in p8_ghash_final()