Lines Matching defs:hmacctx
111 return &ctx->crypto_ctx->hmacctx;
1566 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
1618 hmacctx->opad, param->alg_prm.result_size);
2197 struct hmac_ctx *hmacctx = HMAC_CTX(h_ctx(tfm));
2202 SHASH_DESC_ON_STACK(shash, hmacctx->base_hash);
2206 * ipad in hmacctx->ipad and opad in hmacctx->opad location
2208 shash->tfm = hmacctx->base_hash;
2211 hmacctx->ipad);
2216 memcpy(hmacctx->ipad, key, keylen);
2218 memset(hmacctx->ipad + keylen, 0, bs - keylen);
2219 unsafe_memcpy(hmacctx->opad, hmacctx->ipad, bs,
2223 *((unsigned int *)(&hmacctx->ipad) + i) ^= IPAD_DATA;
2224 *((unsigned int *)(&hmacctx->opad) + i) ^= OPAD_DATA;
2232 err = chcr_compute_partial_hash(shash, hmacctx->ipad,
2233 hmacctx->ipad, digestsize);
2236 chcr_change_order(hmacctx->ipad, updated_digestsize);
2238 err = chcr_compute_partial_hash(shash, hmacctx->opad,
2239 hmacctx->opad, digestsize);
2242 chcr_change_order(hmacctx->opad, updated_digestsize);
2318 struct hmac_ctx *hmacctx = HMAC_CTX(h_ctx(rtfm));
2326 memcpy(req_ctx->partial_hash, hmacctx->ipad,
2329 memcpy(req_ctx->partial_hash, hmacctx->ipad,
2332 memcpy(req_ctx->partial_hash, hmacctx->ipad,
2341 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
2347 hmacctx->base_hash = chcr_alloc_shash(digestsize);
2348 if (IS_ERR(hmacctx->base_hash))
2349 return PTR_ERR(hmacctx->base_hash);
2356 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
2358 if (hmacctx->base_hash) {
2359 chcr_free_shash(hmacctx->base_hash);
2360 hmacctx->base_hash = NULL;